xen-devel
[Xen-devel] Re: [PATCH RFC V4 10/14] Introduce qemu_ram_ptr_unlock.
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@xxxxxxxxxx wrote:
From: Anthony PERARD<anthony.perard@xxxxxxxxxx>
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@xxxxxxxxxx>
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.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] [PATCH RFC V4 01/14] xen: Replace some tab-indents with spaces (clean-up)., (continued)
- [Xen-devel] [PATCH RFC V4 01/14] xen: Replace some tab-indents with spaces (clean-up)., anthony . perard
- [Xen-devel] [PATCH RFC V4 02/14] xen: Support new libxc calls from xen unstable., anthony . perard
- [Xen-devel] [PATCH RFC V4 03/14] xen: Add xen_machine_fv, anthony . perard
- [Xen-devel] [PATCH RFC V4 04/14] Introduce -accel command option., anthony . perard
- [Xen-devel] [PATCH RFC V4 05/14] xen: Add xen in -accel option., anthony . perard
- [Xen-devel] [PATCH RFC V4 07/14] piix_pci: Introduces Xen specific call for irq., anthony . perard
- [Xen-devel] [PATCH RFC V4 08/14] xen: add a 8259 Interrupt Controller, anthony . perard
- [Xen-devel] [PATCH RFC V4 10/14] Introduce qemu_ram_ptr_unlock., anthony . perard
- [Xen-devel] [PATCH RFC V4 11/14] vl.c: Introduce getter for shutdown_requested and reset_requested., anthony . perard
- [Xen-devel] [PATCH RFC V4 12/14] xen: Initialize event channels and io rings, anthony . perard
- [Xen-devel] [PATCH RFC V4 06/14] xen: Add the Xen platform pci device, anthony . perard
- [Xen-devel] [PATCH RFC V4 09/14] xen: Introduce the Xen mapcache, anthony . perard
- [Xen-devel] [PATCH RFC V4 13/14] xen: Set running state in xenstore., anthony . perard
- [Xen-devel] [PATCH RFC V4 14/14] xen: Add a Xen specific ACPI Implementation to target-xen, anthony . perard
|
|
|