xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Mukesh Rathor <mukesh.rathor@oracle.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel <xen-devel@lists.xen.org>
Subject: Re: [RFC PATCH 6/16]: PVH xen: Define pvh guest and header changes..
Date: Tue, 15 Jan 2013 16:37:24 -0800	[thread overview]
Message-ID: <20130115163724.09a5b4d1@mantra.us.oracle.com> (raw)
In-Reply-To: <50F3FC5102000078000B5400@nat28.tlf.novell.com>

On Mon, 14 Jan 2013 11:38:41 +0000
"Jan Beulich" <JBeulich@suse.com> wrote:

> >>> On 12.01.13 at 02:51, Mukesh Rathor <mukesh.rathor@oracle.com>
> >>> wrote:
> > +/* We need vcpu because during context switch, going from pure PV
> > to PVH,
> > + * in save_segments(), current has been updated to next, and no
> > longer pointing
> > + * to the pure PV. BTW, for PVH, we update regs->selectors on each
> > vmexit */ #define read_segment_register(vcpu, regs,
> > name)                 \
> 
> I can only hope that at the end of this patch set the comment
> matches reality - at this point in the series it doesn't afaict.

It's a big patch, tough to break to have things together this way.
Each has to be compilable. It may help to apply all patches to the
xen tree (c/s: 26124) and then cscope it? Just a thought. I realize
it's tough to review, but not sure how else I can break it and still
keep all parts small.

> > --- a/xen/include/asm-x86/x86_64/regs.h	Fri Jan 11 16:25:27
> > 2013 -0800 +++ b/xen/include/asm-x86/x86_64/regs.h	Fri Jan
> > 11 16:27:46 2013 -0800 @@ -11,9 +11,10 @@
> >  #define ring_3(r)    (((r)->cs & 3) == 3)
> >  
> 
> If this BUG_ON() really has to stay here, you ought to add
> white space inside the braces and around the !=.

Ok, done.

> As you add a level of parentheses, you also ought to adjust
> indentation.

It's already indented single space like the previous macro was. Do you
want me to 4 space it?

> At the very least, you want e.g.
> 
> +    do { PVH_ASSERT(!is_pvh_vcpu(v)); } while (0)

Duh! fixed.

> But the defines, if needed at all, are grossly misplaced in any case;
> there ought to be a pvh header for such stuff.

Well, I imagine those asserts while PVH is still being stabilized,
and then removed. Do you still want me to create a new header with just
3 defines that will be deleted in near future?

> > @@ -278,6 +281,7 @@ struct domain
> >  
> >      /* Is this an HVM guest? */
> >      bool_t           is_hvm;
> > +    bool_t           is_pvh;      /* see above for description */
> 
> These are mutually exclusive (also with PV), so perhaps better
> to have a single enum-type variable?

I imagine in future there would be no PV, so is_hvm==0 ==> pvh. 
Too optimistic?

thanks,
Mukesh

  reply	other threads:[~2013-01-16  0:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-12  1:51 [RFC PATCH 6/16]: PVH xen: Define pvh guest and header changes Mukesh Rathor
2013-01-14 11:38 ` Jan Beulich
2013-01-16  0:37   ` Mukesh Rathor [this message]
2013-01-16  9:53     ` Jan Beulich
2013-01-31  1:21       ` Mukesh Rathor
2013-01-24 15:34 ` Tim Deegan
2013-01-25  1:56   ` Mukesh Rathor

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=20130115163724.09a5b4d1@mantra.us.oracle.com \
    --to=mukesh.rathor@oracle.com \
    --cc=JBeulich@suse.com \
    --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).