[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [Patch] the interface of invalidating qemu mapcache


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "Cui, Dexuan" <dexuan.cui@xxxxxxxxx>
  • Date: Sat, 27 Jan 2007 00:27:37 +0800
  • Delivery-date: Fri, 26 Jan 2007 08:28:31 -0800
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AcbhNpSgnLlsyleeR3aZurd/xO5mYAAmjw1QAHpYsZANUy+bAAbmp7kgAzBSt0A=
  • Thread-topic: [Patch] the interface of invalidating qemu mapcache

HVM balloon driver or something, that's under development, may decrease
or increase the machine memory that is taken by HVM guest; in IA32/IA32e
host, now Qemu maps the physical memory of HVM guest based on little
blocks of memory (the block size is 64K in IA32 host or 1M in IA32E
host). When HVM balloon driver decreases the reserved machine memory of
HVM guest, Qemu should unmap the related physical memory range of HVM
guest so that when HVM balloon driver increases the reserved machine
memory of HVM guest later, Qemu can map and access the physical memory
of HVM guest correctly.

The patch exports a function invalidate_qemu_mapcache() in
unmodified_drivers/linux-2.6/platform-pci/platform-pci.c, so HVM balloon
driver can use it directly. Note: considering IA32 guest may run on both
IA32 host and IA32E host, the size of the memory block HVM balloon
driver wants to release MUST be 1M bytes and the address of the memory
block MUST be 1M-byte boundary aligned; if there are several such 1M
memory blocks, HVM balloon driver should call invalidate_qemu_mapcache()
several times, 1 block each time. The execution of
invalidate_qemu_mapcache() is not slow -- 1000 times of invocation may
take about 0.4 second.

-- Dexuan

Signed-off-by: Dexuan Cui <dexuan.cui@xxxxxxxxx>

Attachment: interface_of_invalidating_qemu_mapcache.diff
Description: interface_of_invalidating_qemu_mapcache.diff

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.