From: Mukesh Rathor <mukesh.rathor@oracle.com>
To: Mukesh Rathor <mukesh.rathor@oracle.com>
Cc: "Xen-devel@lists.xensource.com" <Xen-devel@lists.xensource.com>,
Ian Campbell <Ian.Campbell@citrix.com>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: [PATCH v1 3/8]: PVH startup changes (enlighten.c)
Date: Tue, 2 Oct 2012 19:03:23 -0700 [thread overview]
Message-ID: <20121002190323.2e16f6ff@mantra.us.oracle.com> (raw)
In-Reply-To: <20121002183619.70734b7a@mantra.us.oracle.com>
On Tue, 2 Oct 2012 18:36:19 -0700
Mukesh Rathor <mukesh.rathor@oracle.com> wrote:
> On Wed, 26 Sep 2012 12:33:39 +0100
> Stefano Stabellini <stefano.stabellini@eu.citrix.com> wrote:
>
> > > Wish it was simple. But for PV and PVH, domU, it's already setup
> > > the shared page. All we need to do is __va(shared_info). But for
> > > HVM domUs and PVH dom0, we need to hcall with pfn to get it
> > > remapped.
> >
> > For PVH domU is already setup as a pfn only because in
> > tools/libxc/xc_dom_x86.c:alloc_magic_pages we have this code:
> >
> > if ( xc_dom_feature_translated(dom) )
> > dom->shared_info_pfn = xc_dom_alloc_page(dom, "shared
> > info");
> >
> > and in tools/libxc/xc_dom_x86.c:start_info_x86_64 we have:
> >
> > xen_pfn_t shinfo =
> > xc_dom_feature_translated(dom) ? dom->shared_info_pfn :
> > dom-> shared_info_mfn;
> >
> > if we simply get rid of the two "if xc_dom_feature_translated(dom)"
> > wouldn't we get an mfn for PVH domU too? AFAICT all the other cases
> > would remain unmodified, but PVH domU would start getting an mfn for
> > shared_info.
> >
> > > Changing the
> > > tool to map pfn, would result in unnecessary hcall for all PV and
> > > PVH domUs. It's only two lines of code, so lets just leave it.
> > > I'll make the comment better.
> >
> > Yes, there would be one more unnecessary hypercall but we would get
> > rid of 4 "if". I think is a good trade off.
>
> Well, not really unfortunately! There are two fields in the library
> shared_info_mfn and shared_info_pfn in struct xc_dom_image. For
> xlated, pfn is set, otherwise, mfn is set. If I set mfn for auto
> xlated also, I end up changing/adding more code in the library where
> it tries to map the shared page. Moreover, it's better to stick with
> the library assumption that for auto xlated, pfn is set, otherwise,
> mfn is set.
>
> Hope that makes sense. I tried it, btw.
>
I'm not able to make a quick change to xen to just put pfn for dom0
also. get_gpfn_from_mfn() is crashing. So for now, how about, lets go
with what I've got. I'll make a note, and when I do xen patch, I'll
figure it out, and would be a very small linux patch. I want to get
linux patch in soon before the window closes.
thanks
Mukesh
next prev parent reply other threads:[~2012-10-03 2:03 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-21 19:16 [PATCH v1 3/8]: PVH startup changes (enlighten.c) Mukesh Rathor
2012-09-24 12:07 ` Stefano Stabellini
2012-09-24 22:43 ` Mukesh Rathor
2012-09-25 10:03 ` Stefano Stabellini
2012-09-26 1:04 ` Mukesh Rathor
2012-09-26 11:33 ` Stefano Stabellini
2012-09-26 11:44 ` Ian Campbell
2012-10-03 1:36 ` Mukesh Rathor
2012-10-03 2:03 ` Mukesh Rathor [this message]
2012-10-03 11:58 ` Stefano Stabellini
2012-10-03 12:05 ` Ian Campbell
2012-10-03 12:36 ` Stefano Stabellini
2012-10-05 1:35 ` Mukesh Rathor
2012-10-05 9:23 ` Ian Campbell
2012-10-08 12:41 ` Konrad Rzeszutek Wilk
2012-10-09 1:07 ` Mukesh Rathor
2012-10-03 22:37 ` Mukesh Rathor
2012-10-04 8:38 ` Ian Campbell
2012-10-05 1:25 ` 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=20121002190323.2e16f6ff@mantra.us.oracle.com \
--to=mukesh.rathor@oracle.com \
--cc=Ian.Campbell@citrix.com \
--cc=Xen-devel@lists.xensource.com \
--cc=konrad.wilk@oracle.com \
--cc=stefano.stabellini@eu.citrix.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;
as well as URLs for NNTP newsgroup(s).