WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH 3 of 7] xen: allows more hypercalls from stubdoms

To: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 3 of 7] xen: allows more hypercalls from stubdoms
From: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
Date: Mon, 12 Oct 2009 19:33:30 +0200
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 12 Oct 2009 10:33:51 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <alpine.DEB.2.00.0910121757360.4616@kaball-desktop>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Mail-followup-to: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
References: <alpine.DEB.2.00.0910121757360.4616@kaball-desktop>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.12-2006-07-14
Hello,

Stefano Stabellini, le Mon 12 Oct 2009 18:20:09 +0100, a écrit :
> Stubdoms need to be able to make all the passthrough related hypercalls
> on behalf of the guest.

Tried before, nacked by Keir :)

> diff -r 65a13cafbbef xen/arch/x86/irq.c
> --- a/xen/arch/x86/irq.c      Wed Jul 22 15:59:44 2009 +0100
> +++ b/xen/arch/x86/irq.c      Wed Jul 22 16:15:14 2009 +0100
> @@ -917,7 +917,7 @@
>      ASSERT(spin_is_locked(&pcidevs_lock));
>      ASSERT(spin_is_locked(&d->event_lock));
>  
> -    if ( !IS_PRIV(current->domain) )
> +    if ( !IS_PRIV_FOR(current->domain, d) )
>          return -EPERM;
>  
>      if ( pirq < 0 || pirq >= d->nr_pirqs || vector < 0 || vector >= 
> NR_VECTORS )

For instance, here.  It's not because a stubdomain has privilege over
another domain that it suddendly is allowed to reroute all IRQs of the
machine :)

This needs proper accounting: xend should tell the hypervisor which IRQs
domains are allowed to use. Same for physdev, pci functions, etc.

Samuel

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel