From: Roger Pau Monne <roger.pau@citrix.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: xen-devel@lists.xenproject.org, Jan Beulich <jbeulich@suse.com>
Subject: Re: [PATCH RFC 04/12] xen/x86: split Dom0 build into PV and PVHv2
Date: Mon, 1 Aug 2016 13:36:17 +0200 [thread overview]
Message-ID: <20160801113617.3ziilts6z4zy6fbd@mac> (raw)
In-Reply-To: <97321f02-c391-3c71-fb09-0786cdedcf52@citrix.com>
On Fri, Jul 29, 2016 at 06:57:08PM +0100, Andrew Cooper wrote:
> On 29/07/16 17:28, Roger Pau Monne wrote:
> > Split the Dom0 builder into two different functions, one for PV (and classic
> > PVH), and another one for PVHv2. Introduce a new command line parameter,
> > dom0hvm in order to request the creation of a PVHv2 Dom0.
> >
> > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> > ---
> > Cc: Jan Beulich <jbeulich@suse.com>
> > Cc: Andrew Cooper <andrew.cooper3@citrix.com>
> > ---
> > xen/arch/x86/domain_build.c | 27 ++++++++++++++++++++++++++-
> > xen/arch/x86/setup.c | 9 +++++++++
>
> A patch to docs/misc/xen-command-line.markdown please.
OK, I wasn't really sure if we want to introduce a new command line option,
or just use dom0pvh. In any case I will add it, we can always alias dom0pvh
to dom0pvh (or the other way around) when classic PVH support is
removed.
> > 2 files changed, 35 insertions(+), 1 deletion(-)
> >
> > diff --git a/xen/arch/x86/domain_build.c b/xen/arch/x86/domain_build.c
> > index 09d79be..c0ef40f 100644
> > --- a/xen/arch/x86/domain_build.c
> > +++ b/xen/arch/x86/domain_build.c
> > @@ -952,7 +952,7 @@ static int __init setup_permissions(struct domain *d)
> > return rc;
> > }
> >
> > -int __init construct_dom0(
> > +static int __init construct_dom0_pv(
> > struct domain *d,
> > const module_t *image, unsigned long image_headroom,
> > module_t *initrd,
> > @@ -1647,6 +1647,31 @@ out:
> > return rc;
> > }
> >
> > +static int __init construct_dom0_hvm(struct domain *d, const module_t *image,
> > + unsigned long image_headroom,
> > + module_t *initrd,
> > + void *(*bootstrap_map)(const module_t *),
> > + char *cmdline)
> > +{
> > +
> > + printk("** Building a PVH Dom0 **\n");
>
> Some naming curiosities here, especially given the parameter name.
Hm, AFAIK we agreed on keeping the 'PVH' naming, but since internally Xen
has no concept of 'PVH' I think the constructor is better named as HVM (and
in fact if PVH wasn't there before I would just consider this a HVM Dom0).
If people prefer HVM I can certainly change it, but I think it's going to
get messy.
> > +
> > + return 0;
> > +}
> > +
> > +int __init construct_dom0(struct domain *d, const module_t *image,
> > + unsigned long image_headroom, module_t *initrd,
> > + void *(*bootstrap_map)(const module_t *),
> > + char *cmdline)
> > +{
> > +
> > + return is_hvm_domain(d) ?
> > + construct_dom0_hvm(d, image, image_headroom, initrd,
> > + bootstrap_map, cmdline) :
> > + construct_dom0_pv(d, image, image_headroom, initrd, bootstrap_map,
> > + cmdline);
>
> This could be slightly less awkwardly split as:
>
> (is_hvm_domain(d) ? construct_dom0_hvm : construct_dom0_pv)
> (d, image, image_headroom, initrd, bootstrap_map, cmdline);
>
> with some appropriate indentation/alignment.
Done, thanks!
Roger.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-08-01 11:36 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-29 16:28 [PATCH RFC 01/12] PVHv2 Dom0 Roger Pau Monne
2016-07-29 16:28 ` [PATCH RFC 01/12] x86/paging: introduce paging_set_allocation Roger Pau Monne
2016-07-29 16:47 ` Andrew Cooper
2016-08-02 9:47 ` Roger Pau Monne
2016-08-02 15:49 ` Roger Pau Monne
2016-08-02 16:12 ` Jan Beulich
2016-08-03 15:11 ` George Dunlap
2016-08-03 15:25 ` Jan Beulich
2016-08-03 15:28 ` George Dunlap
2016-08-03 15:37 ` Jan Beulich
2016-08-03 15:59 ` George Dunlap
2016-08-03 16:00 ` Roger Pau Monne
2016-08-03 16:15 ` Jan Beulich
2016-08-03 16:24 ` Roger Pau Monne
2016-08-04 6:19 ` Jan Beulich
2016-08-01 8:57 ` Tim Deegan
2016-07-29 16:28 ` [PATCH RFC 02/12] xen/x86: split the setup of Dom0 permissions to a function Roger Pau Monne
2016-07-29 16:28 ` [PATCH RFC 03/12] xen/x86: allow the emulated APICs to be enbled for the hardware domain Roger Pau Monne
2016-07-29 17:50 ` Andrew Cooper
2016-08-01 11:23 ` Roger Pau Monne
2016-07-29 16:28 ` [PATCH RFC 04/12] xen/x86: split Dom0 build into PV and PVHv2 Roger Pau Monne
2016-07-29 17:57 ` Andrew Cooper
2016-08-01 11:36 ` Roger Pau Monne [this message]
2016-08-04 18:28 ` Andrew Cooper
2016-07-29 16:29 ` [PATCH RFC 05/12] xen/x86: make print_e820_memory_map global Roger Pau Monne
2016-07-29 17:57 ` Andrew Cooper
2016-07-29 16:29 ` [PATCH RFC 06/12] xen/x86: populate PVHv2 Dom0 physical memory map Roger Pau Monne
2016-07-29 19:04 ` Andrew Cooper
2016-08-02 9:19 ` Roger Pau Monne
2016-08-04 18:43 ` Andrew Cooper
2016-08-05 9:40 ` Roger Pau Monne
2016-08-11 18:28 ` Andrew Cooper
2016-07-29 16:29 ` [PATCH RFC 07/12] xen/x86: parse Dom0 kernel for PVHv2 Roger Pau Monne
2016-09-26 16:16 ` Jan Beulich
2016-09-26 17:11 ` Roger Pau Monne
2016-07-29 16:29 ` [PATCH RFC 08/12] xen/x86: setup PVHv2 Dom0 CPUs Roger Pau Monne
2016-09-26 16:19 ` Jan Beulich
2016-09-26 17:05 ` Roger Pau Monne
2016-09-27 8:10 ` Jan Beulich
2016-07-29 16:29 ` [PATCH RFC 09/12] xen/x86: setup PVHv2 Dom0 ACPI tables Roger Pau Monne
2016-09-26 16:21 ` Jan Beulich
2016-07-29 16:29 ` [PATCH RFC 10/12] xen/dcpi: add a dpci passthrough handler for hardware domain Roger Pau Monne
2016-07-29 16:29 ` [PATCH RFC 11/12] xen/x86: allow a PVHv2 Dom0 to register PCI devices with Xen Roger Pau Monne
2016-07-29 16:29 ` [PATCH RFC 12/12] xen/x86: route legacy PCI interrupts to Dom0 Roger Pau Monne
2016-07-29 16:38 ` [PATCH RFC 01/12] PVHv2 Dom0 Roger Pau Monne
2016-09-26 16:25 ` Jan Beulich
2016-09-26 17:12 ` Roger Pau Monne
2016-09-26 17:55 ` Konrad Rzeszutek Wilk
2016-09-27 8:11 ` 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=20160801113617.3ziilts6z4zy6fbd@mac \
--to=roger.pau@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=xen-devel@lists.xenproject.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).