]> xenbits.xensource.com Git - people/sstabellini/xen-unstable.git/.git/commit
hvm: Use main memory for video memory.
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 27 Aug 2008 13:53:39 +0000 (14:53 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 27 Aug 2008 13:53:39 +0000 (14:53 +0100)
commitd818f3cb7c0c03edb1f46874fc78aa895075b3d9
treea87991f3ba15c9742bf5b994b39ff0cd71da274a
parent1583e7e4483c6b9e7ec6c4f36f096dc1cf858d44
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>
22 files changed:
tools/firmware/hvmloader/32bitbios_support.c
tools/firmware/hvmloader/acpi/build.c
tools/firmware/hvmloader/hvmloader.c
tools/firmware/hvmloader/util.c
tools/firmware/hvmloader/util.h
tools/ioemu/hw/cirrus_vga.c
tools/ioemu/hw/vga.c
tools/ioemu/hw/vga_int.h
tools/ioemu/hw/xen_platform.c
tools/ioemu/vl.c
tools/ioemu/vl.h
tools/libxc/xc_domain.c
tools/libxc/xc_domain_save.c
tools/libxc/xenctrl.h
xen/arch/ia64/xen/mm.c
xen/arch/x86/mm.c
xen/arch/x86/x86_64/compat/mm.c
xen/include/public/memory.h
xen/include/xlat.lst
xen/include/xsm/xsm.h
xen/xsm/dummy.c
xen/xsm/flask/hooks.c