aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/hvm/hvm.c
diff options
context:
space:
mode:
Diffstat (limited to 'xen/arch/x86/hvm/hvm.c')
-rw-r--r--xen/arch/x86/hvm/hvm.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index b118195c94..29452a2daf 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -985,6 +985,16 @@ int hvm_vcpu_initialise(struct vcpu *v)
/* 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);
+ if ( rc < 0 )
+ goto fail2;
+ v->domain->arch.hvm_domain.params[HVM_PARAM_BUFIOREQ_EVTCHN] = rc;
+ }
+
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;
@@ -3597,6 +3607,9 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE(void) arg)
if ( rc == 0 )
rc = nestedhvm_vcpu_initialise(v);
break;
+ case HVM_PARAM_BUFIOREQ_EVTCHN:
+ rc = -EINVAL;
+ break;
}
if ( rc == 0 )