From: Anthony Liguori <anthony@codemonkey.ws>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Anthony Perard <anthony.perard@citrix.com>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: [Qemu-devel] Re: [PATCH RFC V4 10/14] Introduce qemu_ram_ptr_unlock.
Date: Tue, 28 Sep 2010 11:01:30 -0500 [thread overview]
Message-ID: <4CA2115A.8030005@codemonkey.ws> (raw)
In-Reply-To: <alpine.DEB.2.00.1009281616350.2864@kaball-desktop>
On 09/28/2010 10:25 AM, Stefano Stabellini wrote:
> On Tue, 28 Sep 2010, Anthony Liguori wrote:
>
>> On 09/28/2010 10:01 AM, anthony.perard@citrix.com wrote:
>>
>>> From: Anthony PERARD<anthony.perard@citrix.com>
>>>
>>> This function allows to unlock a ram_ptr give by qemu_get_ram_ptr. After
>>> a call to qemu_ram_ptr_unlock, the pointer may be unmap from QEMU when
>>> used with Xen.
>>>
>>> Signed-off-by: Anthony PERARD<anthony.perard@citrix.com>
>>>
>>>
>> Why isn't hooking cpu_physical_memory_{map,unmap}() not enough? That's
>> really the intention of the API.
>>
>> You only really care about guest RAM, not device memory, correct?
>>
> Yes, however at the moment all the calls to qemu_get_ram_ptr imply the
> mapping in qemu address space to remain valid for an unlimited amount of
> time.
>
Yes, but qemu_get_ram_ptr() is not a general purpose API. It really
should only have one use--within exec.c to implement
cpu_physical_memory_* functions. There are a few uses in hw/* but
they're all wrong and should be removed. Fortunately, for the purposes
of the Xen machine, almost none of them actually matter.
What I'm thinking is that RAM in Xen should not be backed at all from a
RAMBlock. Instead, cpu_physical_memory_* functions should call an
explicit map/unmap() function that can be implemented as
qemu_get_ram_ptr() and a nop in the TCG/KVM case and as explicit map
cache operations in the Xen case.
Regards,
Anthony Liguori
> While we can do that because now the mapcache allows to "lock" a
> mapping, it would be nice if an explicit qemu_ram_ptr_unlock would be
> provided. It is not required for xen support though.
>
>
>
next prev parent reply other threads:[~2010-09-28 16:01 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-28 15:01 [Qemu-devel] [PATCH RFC V4 00/14] xen device model support anthony.perard
2010-09-28 15:01 ` [Qemu-devel] [PATCH RFC V4 01/14] xen: Replace some tab-indents with spaces (clean-up) anthony.perard
2010-09-28 15:01 ` [Qemu-devel] [PATCH RFC V4 02/14] xen: Support new libxc calls from xen unstable anthony.perard
2010-09-28 15:01 ` [Qemu-devel] [PATCH RFC V4 03/14] xen: Add xen_machine_fv anthony.perard
2010-09-28 15:01 ` [Qemu-devel] [PATCH RFC V4 04/14] Introduce -accel command option anthony.perard
2010-09-28 15:01 ` [Qemu-devel] [PATCH RFC V4 05/14] xen: Add xen in -accel option anthony.perard
2010-09-28 15:01 ` [Qemu-devel] [PATCH RFC V4 06/14] xen: Add the Xen platform pci device anthony.perard
2010-09-28 15:01 ` [Qemu-devel] [PATCH RFC V4 07/14] piix_pci: Introduces Xen specific call for irq anthony.perard
2010-09-28 15:01 ` [Qemu-devel] [PATCH RFC V4 08/14] xen: add a 8259 Interrupt Controller anthony.perard
2010-09-28 15:01 ` [Qemu-devel] [PATCH RFC V4 09/14] xen: Introduce the Xen mapcache anthony.perard
2010-09-28 15:01 ` [Qemu-devel] [PATCH RFC V4 10/14] Introduce qemu_ram_ptr_unlock anthony.perard
2010-09-28 15:14 ` [Qemu-devel] " Anthony Liguori
2010-09-28 15:25 ` Stefano Stabellini
2010-09-28 16:01 ` Anthony Liguori [this message]
2010-09-28 18:04 ` Stefano Stabellini
2010-09-29 7:38 ` Gerd Hoffmann
2010-09-28 15:01 ` [Qemu-devel] [PATCH RFC V4 11/14] vl.c: Introduce getter for shutdown_requested and reset_requested anthony.perard
2010-09-28 15:01 ` [Qemu-devel] [PATCH RFC V4 12/14] xen: Initialize event channels and io rings anthony.perard
2010-09-28 15:01 ` [Qemu-devel] [PATCH RFC V4 13/14] xen: Set running state in xenstore anthony.perard
2010-09-28 15:01 ` [Qemu-devel] [PATCH RFC V4 14/14] xen: Add a Xen specific ACPI Implementation to target-xen anthony.perard
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=4CA2115A.8030005@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=anthony.perard@citrix.com \
--cc=qemu-devel@nongnu.org \
--cc=stefano.stabellini@eu.citrix.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).