From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Cc: Keir Fraser <keir@xen.org>,
Ian Campbell <ian.campbell@citrix.com>, Tim Deegan <tim@xen.org>,
Ian Jackson <ian.jackson@eu.citrix.com>,
xen-devel@lists.xen.org, Jan Beulich <jbeulich@suse.com>
Subject: Re: [PATCH v5 2/2] allow hardware domain != dom0
Date: Wed, 16 Apr 2014 20:06:56 +0100 [thread overview]
Message-ID: <534ED4D0.6070906@citrix.com> (raw)
In-Reply-To: <1397674562-3444-2-git-send-email-dgdegra@tycho.nsa.gov>
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
next prev parent reply other threads:[~2014-04-16 19:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-16 18:56 [PATCH v5 1/2] implement is_hardware_domain using hardware_domain global Daniel De Graaf
2014-04-16 18:56 ` [PATCH v5 2/2] allow hardware domain != dom0 Daniel De Graaf
2014-04-16 19:06 ` Andrew Cooper [this message]
2014-04-16 19:13 ` Daniel De Graaf
2014-04-17 7:24 ` Jan Beulich
2014-04-17 14:19 ` Daniel De Graaf
2014-04-17 15:00 ` Jan Beulich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=534ED4D0.6070906@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=dgdegra@tycho.nsa.gov \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=keir@xen.org \
--cc=tim@xen.org \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).