mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ian Campbell <Ian.Campbell@citrix.com>
To: Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [Xen-devel] [PATCH] xen: point xen_start_info to a dummy struct for PV on HVM guests
Date: Wed, 3 Oct 2012 14:54:42 +0100	[thread overview]
Message-ID: <1349272482.650.151.camel@zakaz.uk.xensource.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1210031450220.29232@kaball.uk.xensource.com>

On Wed, 2012-10-03 at 14:51 +0100, Stefano Stabellini wrote:
> On Wed, 3 Oct 2012, Ian Campbell wrote:
> > On Wed, 2012-10-03 at 14:37 +0100, Stefano Stabellini wrote:
> > > PV on HVM guests don't have a start_info page mapped by Xen, so
> > > xen_start_info is just NULL for them.
> > > That is problem because other parts of the code expect xen_start_info to
> > > point to something valid, for example xen_initial_domain() is defined as
> > > follow:
> > > 
> > > #define xen_initial_domain()    (xen_domain() && \
> > >                  xen_start_info->flags & SIF_INITDOMAIN)
> > 
> > But anyone who calls this before xen_start_info is setup is going to get
> > a bogus result, specifically in this case they will think they are domU
> > when in reality they are dom0 -- wouldn't it be better to fix those
> > callsites?
> 
> That cannot be the case because setting up xen_start_info is the very
> first thing that is done, before even calling to C.

On PV, yes, but you are trying to fix PVHVM here, no?

Otherwise if this is always set before calling into C then what is the
purpose of this patch?

> 
> 
> > Perhaps turn this into a static inline with a BUG_ON(!xen_start_info) to
> > make catching these cases easier?
> 



  reply	other threads:[~2012-10-03 13:54 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-03 13:37 Stefano Stabellini
2012-10-03 13:43 ` Konrad Rzeszutek Wilk
2012-10-03 15:48   ` Stefano Stabellini
2012-10-03 13:49 ` [Xen-devel] " Ian Campbell
2012-10-03 13:51   ` Stefano Stabellini
2012-10-03 13:54     ` Ian Campbell [this message]
2012-10-03 14:11       ` Konrad Rzeszutek Wilk
2012-10-03 15:00         ` Ian Campbell
2012-10-03 15:48           ` Stefano Stabellini
2012-10-03 15:57             ` Ian Campbell
2012-10-03 16:05               ` Stefano Stabellini
2012-10-03 16:13                 ` Ian Campbell
2012-10-03 16:41                   ` Ian Campbell
2012-10-03 17:06                     ` Stefano Stabellini
2012-10-03 17:08                     ` [PATCH] xen/xen_initial_domain: check that xen_start_info is initialized Stefano Stabellini
2012-10-04  7:43                       ` [Xen-devel] " Jan Beulich
2012-10-04 10:07                         ` Stefano Stabellini

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=1349272482.650.151.camel@zakaz.uk.xensource.com \
    --to=ian.campbell@citrix.com \
    --cc=Stefano.Stabellini@eu.citrix.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xen-devel@lists.xensource.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®