[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] arch/x86/hvm: Bind xen-created event channels to building domain


  • To: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxx>
  • From: Keir Fraser <keir@xxxxxxx>
  • Date: Wed, 09 Jan 2013 08:51:13 +0000
  • Cc: Jan Beulich <jbeulich@xxxxxxxx>
  • Delivery-date: Wed, 09 Jan 2013 08:51:40 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>
  • Thread-index: Ac3uRnpDltWhmRtNVkyV3ABSWymSOQ==
  • Thread-topic: [PATCH] arch/x86/hvm: Bind xen-created event channels to building domain

On 03/01/2013 18:28, "Daniel De Graaf" <dgdegra@xxxxxxxxxxxxx> 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 <dgdegra@xxxxxxxxxxxxx>
> Cc: Keir Fraser <keir@xxxxxxx>
> Cc: Jan Beulich <jbeulich@xxxxxxxx>
> ---
>  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;



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.