|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v5 2/2] allow hardware domain != dom0
On 16/04/14 19:56, Daniel De Graaf wrote:
> static unsigned int __read_mostly extra_dom0_irqs = 256;
> static unsigned int __read_mostly extra_domU_irqs = 32;
> static void __init parse_extra_guest_irqs(const char *s)
> @@ -192,7 +242,7 @@ custom_param("extra_guest_irqs", parse_extra_guest_irqs);
> struct domain *domain_create(
> domid_t domid, unsigned int domcr_flags, uint32_t ssidref)
> {
> - struct domain *d, **pd;
> + struct domain *d, **pd, *old_hwdom = NULL;
> enum { INIT_xsm = 1u<<0, INIT_watchdog = 1u<<1, INIT_rangeset = 1u<<2,
> INIT_evtchn = 1u<<3, INIT_gnttab = 1u<<4, INIT_arch = 1u<<5 };
> int err, init_status = 0;
> @@ -237,10 +287,12 @@ struct domain *domain_create(
> else if ( domcr_flags & DOMCRF_pvh )
> d->guest_type = guest_type_pvh;
>
> - if ( domid == 0 )
> + if ( domid == 0 || domid == hardware_domid )
> {
> + BUG_ON(domid >= DOMID_FIRST_RESERVED);
Domid is a signed type.
You also need ensure it is not negative, as assign_integer_param() from
the command line parsing writes all values as unsigned.
~Andrew
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |