[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [XEN][RFC PATCH V2 04/17] hvm: Change initialization/destru
From: |
Julien Grall |
Subject: |
[Qemu-devel] [XEN][RFC PATCH V2 04/17] hvm: Change initialization/destruction of an hvm |
Date: |
Wed, 22 Aug 2012 13:31:50 +0100 |
Prepare/Release structure for multiple ioreq servers.
Signed-off-by: Julien Grall <address@hidden>
---
xen/arch/x86/hvm/hvm.c | 33 ++++++++++-----------------------
1 files changed, 10 insertions(+), 23 deletions(-)
diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index 687e480..292d57b 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -567,10 +567,13 @@ int hvm_domain_initialise(struct domain *d)
rtc_init(d);
hvm_init_ioreq_page(d, &d->arch.hvm_domain.ioreq);
- hvm_init_ioreq_page(d, &d->arch.hvm_domain.buf_ioreq);
+ hvm_init_ioreq_servers(d);
register_portio_handler(d, 0xe9, 1, hvm_print_line);
+ if ( hvm_init_pci_emul(d) )
+ goto fail2;
+
rc = hvm_funcs.domain_initialise(d);
if ( rc != 0 )
goto fail2;
@@ -645,8 +648,8 @@ static void hvm_destroy_ioreq_servers(struct domain *d)
void hvm_domain_relinquish_resources(struct domain *d)
{
- hvm_destroy_ioreq_page(d, &d->arch.hvm_domain.ioreq);
- hvm_destroy_ioreq_page(d, &d->arch.hvm_domain.buf_ioreq);
+ hvm_destroy_ioreq_servers(d);
+ hvm_destroy_pci_emul(d);
msixtbl_pt_cleanup(d);
@@ -1104,27 +1107,11 @@ int hvm_vcpu_initialise(struct vcpu *v)
&& (rc = nestedhvm_vcpu_initialise(v)) < 0 )
goto fail3;
- /* Create ioreq event channel. */
- rc = alloc_unbound_xen_event_channel(v, 0, NULL);
- if ( rc < 0 )
- goto fail4;
-
- /* Register ioreq event channel. */
- v->arch.hvm_vcpu.xen_port = rc;
-
- if ( v->vcpu_id == 0 )
- {
- /* Create bufioreq event channel. */
- rc = alloc_unbound_xen_event_channel(v, 0, NULL);
- if ( rc < 0 )
- goto fail2;
- v->domain->arch.hvm_domain.params[HVM_PARAM_BUFIOREQ_EVTCHN] = rc;
- }
+ rc = hvm_ioreq_servers_new_vcpu(v);
+ if ( rc != 0 )
+ goto fail3;
- spin_lock(&v->domain->arch.hvm_domain.ioreq.lock);
- if ( v->domain->arch.hvm_domain.ioreq.va != NULL )
- get_ioreq(v)->vp_eport = v->arch.hvm_vcpu.xen_port;
- spin_unlock(&v->domain->arch.hvm_domain.ioreq.lock);
+ v->arch.hvm_vcpu.ioreq = &v->domain->arch.hvm_domain.ioreq;
spin_lock_init(&v->arch.hvm_vcpu.tm_lock);
INIT_LIST_HEAD(&v->arch.hvm_vcpu.tm_list);
--
Julien Grall
- Re: [Qemu-devel] [Xen-devel] [XEN][RFC PATCH V2 12/17] xl: Add interface to handle qemu disaggregation, (continued)
- [Qemu-devel] [XEN][RFC PATCH V2 15/17] xl: support spawn/destroy on multiple device model, Julien Grall, 2012/08/22
- [Qemu-devel] [XEN][RFC PATCH V2 13/17] xl: add device model id to qmp functions, Julien Grall, 2012/08/22
- [Qemu-devel] [XEN][RFC PATCH V2 04/17] hvm: Change initialization/destruction of an hvm,
Julien Grall <=
- [Qemu-devel] [XEN][RFC PATCH V2 14/17] xl-parsing: Parse new device_models option, Julien Grall, 2012/08/22
- [Qemu-devel] [XEN][RFC PATCH V2 03/17] hvm-pci: Handle PCI config space in Xen, Julien Grall, 2012/08/22
- [Qemu-devel] [XEN][RFC PATCH V2 17/17] xl: implement save/restore for multiple device models, Julien Grall, 2012/08/22
- [Qemu-devel] [XEN][RFC PATCH V2 16/17] xl: Fix PCI library, Julien Grall, 2012/08/22
- [Qemu-devel] [XEN][RFC PATCH V2 07/17] hvm-io: send invalidate map cache to each registered servers, Julien Grall, 2012/08/22