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

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



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


 


Rackspace

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