aboutsummaryrefslogtreecommitdiffstats
path: root/xen/xsm/dummy.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-08-27 14:53:39 +0100
committerKeir Fraser <keir.fraser@citrix.com>2008-08-27 14:53:39 +0100
commitd818f3cb7c0c03edb1f46874fc78aa895075b3d9 (patch)
treea87991f3ba15c9742bf5b994b39ff0cd71da274a /xen/xsm/dummy.c
parent1583e7e4483c6b9e7ec6c4f36f096dc1cf858d44 (diff)
downloadxen-d818f3cb7c0c03edb1f46874fc78aa895075b3d9.tar.gz
xen-d818f3cb7c0c03edb1f46874fc78aa895075b3d9.tar.bz2
xen-d818f3cb7c0c03edb1f46874fc78aa895075b3d9.zip
hvm: Use main memory for video memory.
When creating an HVM domain, if e.g. another domain is created before qemu allocates video memory, the extra 8MB memory ballooning is not available any more, because it got consumed by the other domain. This fixes it by taking video memory from the main memory: - make hvmloader use e820_malloc to reserve some of the main memory and notify ioemu of its address through the Xen platform PCI card. - add XENMAPSPACE_mfn to the xen_add_to_physmap memory op, to allow ioemu to move the MFNs between the original position and the PCI mapping, when LFB acceleration is disabled/enabled - add a remove_from_physmap memory op, to allow ioemu to unmap it completely for the case of old guests with acceleration disabled. - add xc_domain_memory_translate_gpfn_list to libxc to allow ioemu to get the MFNs of the video memory. - have xend save the PCI memory space instead of ioemu: if a memory page is there, the guest can access it like usual memory, so xend can safely be responsible to save it. The extra benefit is that live migration will apply the logdirty optimization there too. - handle old saved images, populating the video memory from ioemu if really needed. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Diffstat (limited to 'xen/xsm/dummy.c')
-rw-r--r--xen/xsm/dummy.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/xen/xsm/dummy.c b/xen/xsm/dummy.c
index b9ff510b42..345172283a 100644
--- a/xen/xsm/dummy.c
+++ b/xen/xsm/dummy.c
@@ -385,6 +385,11 @@ static int dummy_add_to_physmap (struct domain *d1, struct domain *d2)
{
return 0;
}
+
+static int dummy_remove_from_physmap (struct domain *d1, struct domain *d2)
+{
+ return 0;
+}
#endif
struct xsm_operations dummy_xsm_ops;
@@ -484,5 +489,6 @@ void xsm_fixup_ops (struct xsm_operations *ops)
set_to_dummy_if_null(ops, mmu_machphys_update);
set_to_dummy_if_null(ops, update_va_mapping);
set_to_dummy_if_null(ops, add_to_physmap);
+ set_to_dummy_if_null(ops, remove_from_physmap);
#endif
}