From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH] arch/x86/hvm: Bind xen-created event channels to building domain Date: Wed, 09 Jan 2013 08:51:13 +0000 Message-ID: References: <1357237738-17787-1-git-send-email-dgdegra@tycho.nsa.gov> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1357237738-17787-1-git-send-email-dgdegra@tycho.nsa.gov> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Daniel De Graaf , xen-devel@lists.xen.org Cc: Jan Beulich List-Id: xen-devel@lists.xenproject.org On 03/01/2013 18:28, "Daniel De Graaf" wrote: > Instead of using a hardcoded domain 0 as the endpoint for the event > channels created in hvm_vcpu_initialise, use the domain ID of the > building domain so that a domain builder in a domain other than dom0 has > the expected access to the event channels. This should be done by setting HVM_PARAM_DM_DOMAIN appropriately after the guest is created. As it is, HVM_PARAM_DM_DOMAIN can be out of sync with the event-channel bindings after this patch. I see this patch is already applied, and I propose to revert it. Is that okay with you, Jan? -- Keir > Signed-off-by: Daniel De Graaf > Cc: Keir Fraser > Cc: Jan Beulich > --- > xen/arch/x86/hvm/hvm.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c > index 40c1ab2..682d934 100644 > --- a/xen/arch/x86/hvm/hvm.c > +++ b/xen/arch/x86/hvm/hvm.c > @@ -1071,7 +1071,7 @@ int hvm_vcpu_initialise(struct vcpu *v) > goto fail3; > > /* Create ioreq event channel. */ > - rc = alloc_unbound_xen_event_channel(v, 0, NULL); > + rc = alloc_unbound_xen_event_channel(v, current->domain->domain_id, > NULL); > if ( rc < 0 ) > goto fail4; > > @@ -1081,7 +1081,7 @@ int hvm_vcpu_initialise(struct vcpu *v) > if ( v->vcpu_id == 0 ) > { > /* Create bufioreq event channel. */ > - rc = alloc_unbound_xen_event_channel(v, 0, NULL); > + rc = alloc_unbound_xen_event_channel(v, current->domain->domain_id, > NULL); > if ( rc < 0 ) > goto fail2; > v->domain->arch.hvm_domain.params[HVM_PARAM_BUFIOREQ_EVTCHN] = rc;