From: Tim Deegan <tim@xen.org>
To: "Aravindh Puthiyaparambil (aravindp)" <aravindp@cisco.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: Creating a magic page for PV mem_access
Date: Wed, 5 Jun 2013 11:32:33 +0100 [thread overview]
Message-ID: <20130605103233.GC42977@ocelot.phlegethon.org> (raw)
In-Reply-To: <97A500D504438F4ABC02EBA81613CC6322D00336@xmb-aln-x02.cisco.com>
Hi,
At 19:11 +0000 on 03 Jun (1370286719), Aravindh Puthiyaparambil (aravindp) wrote:
> > > I am trying to create a magic / special page for the PV mem_access. I
> > > am mimicking what is being done for the console page
> > > (alloc_magic_pages()) on the tools side. On the hypervisor side, I am
> > > planning on stashing the address of this page in the pv_domain
> > > structure akin to how the special pages are stored in params[] of the
> > > hvm_domain structure.
> >
> > OK, can you back up a bit and describe what you're going to use this page
> > for? A PV domain's 'magic' pages may not be quite what you want.
> > First, they're owned by the guest, so the guest can write to them (and so
> > they can't be trusted for doing hypervisor->dom0 communications).
>
> You are right. I didn't realize magic pages are writable by the
> guest. So this is not a good option.
>
> > And second, I'm not sure that mem_access pages really need to
> > saved/restored with the rest of the VM -- I'd have thought that you could
> > just set up a new, empty ring on the far side.
>
> I am trying to mimic what is being done in the HVM side for mem_event
> pages. In setup_guest() (xc_hvm_build_x86.c), I see "special pages"
> being created for console, paging, access and sharing ring pages. Then
> xc_set_hvm_param() is used to inform the hypervisor. When a mem_event
> / mem_access client comes up, it uses xc_get_hvm_param() to get the
> pfn and maps it in. I want to do something similar for PV.
Yep. I think it might be better to invent up a new interface for those
pages, rather than using domain memory for them. We can then deprecate
the old HVM-specific params interface.
Tim.
next prev parent reply other threads:[~2013-06-05 10:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-01 1:24 Creating a magic page for PV mem_access Aravindh Puthiyaparambil (aravindp)
2013-06-03 9:23 ` Tim Deegan
2013-06-03 19:11 ` Aravindh Puthiyaparambil (aravindp)
2013-06-05 10:32 ` Tim Deegan [this message]
2013-06-06 0:14 ` Aravindh Puthiyaparambil (aravindp)
[not found] <mailman.416.1370486679.32487.xen-devel@lists.xen.org>
2013-06-06 4:07 ` Andres Lagar-Cavilla
2013-06-06 5:33 ` Aravindh Puthiyaparambil (aravindp)
2013-06-06 5:38 ` Andres Lagar-Cavilla
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=20130605103233.GC42977@ocelot.phlegethon.org \
--to=tim@xen.org \
--cc=aravindp@cisco.com \
--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;
as well as URLs for NNTP newsgroup(s).