[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [XEN][RFC PATCH 04/15] hvm: Change initialization/destructi
From: |
Julien Grall |
Subject: |
[Qemu-devel] [XEN][RFC PATCH 04/15] hvm: Change initialization/destruction of an hvm |
Date: |
Thu, 22 Mar 2012 15:59:25 +0000 |
This patch modifies initialization and the destruction of an hvm
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 e7a8f18..1b38762 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -601,10 +601,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;
@@ -626,8 +629,8 @@ int hvm_domain_initialise(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);
@@ -1085,27 +1088,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 01/15] hvm: Modify interface to support multiple ioreq server, (continued)
- [Qemu-devel] [XEN][RFC PATCH 05/15] hvm: Modify hvm_op, Julien Grall, 2012/03/22
- [Qemu-devel] [XEN][RFC PATCH 11/15] xc: Fix python build, Julien Grall, 2012/03/22
- [Qemu-devel] [XEN][RFC PATCH 07/15] hvm-io: send invalidate map cache to each registered servers, Julien Grall, 2012/03/22
- [Qemu-devel] [XEN][RFC PATCH 13/15] xl-qmp: add device model id to qmp function, Julien Grall, 2012/03/22
- [Qemu-devel] [XEN][RFC PATCH 09/15] xc: Add the hypercall for multiple servers, Julien Grall, 2012/03/22
- [Qemu-devel] [XEN][RFC PATCH 02/15] hvm: Add functions to handle ioreq servers, Julien Grall, 2012/03/22
- [Qemu-devel] [XEN][RFC PATCH 04/15] hvm: Change initialization/destruction of an hvm,
Julien Grall <=
- [Qemu-devel] [XEN][RFC PATCH 06/15] hvm-io: IO refactoring with ioreq server, Julien Grall, 2012/03/22
- [Qemu-devel] [XEN][RFC PATCH 08/15] hvm-io: Handle server in buffered IO, Julien Grall, 2012/03/22
- [Qemu-devel] [XEN][RFC PATCH 10/15] xc: Add argument to allocate more special pages, Julien Grall, 2012/03/22
- [Qemu-devel] [XEN][RFC PATCH 14/15] xl-parsing: Parse the new option device_models, Julien Grall, 2012/03/22
- [Qemu-devel] [XEN][RFC PATCH 12/15] xl: Add interface to handle multiple device models, Julien Grall, 2012/03/22
- [Qemu-devel] [XEN][RFC PATCH 15/15] xl: Launch and destroy all device models, Julien Grall, 2012/03/22