All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Mukesh Rathor <mukesh.rathor@oracle.com>
Cc: "Xen-devel@lists.xensource.com" <Xen-devel@lists.xensource.com>
Subject: Re: [PATCH 10/18 V2]: PVH xen: introduce vmx_pvh.c and pvh.c
Date: Wed, 3 Apr 2013 10:40:18 -0400	[thread overview]
Message-ID: <20130403144018.GB6044@phenom.dumpdata.com> (raw)
In-Reply-To: <20130402182918.7def26d2@mantra.us.oracle.com>

On Tue, Apr 02, 2013 at 06:29:18PM -0700, Mukesh Rathor wrote:
> On Tue, 2 Apr 2013 10:10:12 -0400
> Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> wrote:
> 
> > On Mon, Apr 01, 2013 at 06:26:45PM -0700, Mukesh Rathor wrote:
> > > On Mon, 18 Mar 2013 12:32:06 -0400
> > > Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> wrote:
> > > 
> > > No, hide the X96EMUL_* from the caller of this function which deals
> > > with rc or non-zero.
> > 
> > In that case please make that part of the comment at the start. It
> > says: 0 success. But nothing about the failure path.
> 
> it's better to have it say some thing than nothing! failure paths are
> many and change over time, but when debugging its good to know right
> away if a function succeeded.

Sure. I am not saying that the comment is bad. I am just saying add
also the error conditions.

I don't think the error return values (whether they are positive or
negative) is going to change over time. But if they are, then the
comments can be updated at that time too.

> 
> > > >  - HYPERVISOR_set_segment_base
> > > >  - HYPERVISOR_set_gdt
> > > >  - HYPERVISOR_tmem
> > > >  .. and host of other.
> > > > 
> > > > This should be documented somewhere in docs?
> > > > Perhaps in docs/misc/pvh.txt and just outline which ones are not
> > > > to be used anymore?
> > > 
> > > I am keeping track of all doc stuff, lets document in the end when
> > > I enable PVH. We'll be changing stuff for a short while.
> > 
> > Why not make this 'doc stuff' part of the patches? That way when you
> > are done with one item you can have a patch to remove it out the TODO
> > list. Also this way other folks can look at it and if they have time
> > help you on some of the TODOs.
> 
> Lets keep things manageable. I have fixme's in the code, and also documentd
> in the cover what needs to be done. When we enable PVH, we'll know what
> got done and what didn't, and we can document it properly.

Kind off. We forgot about the 32-bit until Jan realized it. That should be
part of a TODO.

I am a big proponent of putting out a list of 'these are things that
are busted'. That way if somebody is trying to get familiar with this
they can work on off the bugs or items without having to stumble trying
to find the TODOs.

In other words - making it easier for other folks to help you with this.

> 
> > > 
> > > > Could you use 'cpuid' macro defined in processor.h?
> > > 
> > > since we know in this fucntion we are on intel, we can just do
> > > cpuid. the macro has somw quirks for cyrix cpus, and clears rcx.
> > > Besides this is user mode cpuid that will exactly be like this on a
> > > pure PV guest.
> > 
> > I am not following you. Is the reason you are doing this b/c the
> > macro clears rcx?
> 
> Correct.

Please state that as a comment in the code then. It helps as in a couple
of years (months?) somebody will notice this and say: Geey, why not
just use the #define cpuid.

This will give them enough information to make the proper decision
(which might be making the macro _not_ clear the rcx).

> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
> 

  reply	other threads:[~2013-04-03 14:40 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-16  0:41 [PATCH 10/18 V2]: PVH xen: introduce vmx_pvh.c and pvh.c Mukesh Rathor
2013-03-18 12:16 ` Jan Beulich
2013-04-02  0:08   ` Mukesh Rathor
2013-04-02  7:00     ` Jan Beulich
2013-03-18 16:32 ` Konrad Rzeszutek Wilk
2013-04-02  1:26   ` Mukesh Rathor
2013-04-02 14:10     ` Konrad Rzeszutek Wilk
2013-04-03  1:29       ` Mukesh Rathor
2013-04-03 14:40         ` Konrad Rzeszutek Wilk [this message]
2013-04-03  1:45       ` Mukesh Rathor
2013-04-03  1:42   ` Mukesh Rathor
2013-04-04  1:01   ` Mukesh Rathor
2013-04-04  8:23     ` Jan Beulich
2013-03-21 16:49 ` Tim Deegan
2013-03-22  8:32   ` Jan Beulich
2013-03-22 10:06     ` Tim Deegan
2013-04-03  1:37   ` Mukesh Rathor
2013-04-03  8:06     ` Jan Beulich
2013-04-03 23:38       ` Mukesh Rathor
2013-04-04  9:12     ` Tim Deegan
2013-04-04 23:00       ` 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=20130403144018.GB6044@phenom.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=Xen-devel@lists.xensource.com \
    --cc=mukesh.rathor@oracle.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.