aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/hvm/hvm.c
diff options
context:
space:
mode:
authorOlaf Hering <olaf@aepfle.de>2012-10-19 16:09:05 +0200
committerOlaf Hering <olaf@aepfle.de>2012-10-19 16:09:05 +0200
commit55cc7f063053ccf88d945a7480de12b3bc67f8c3 (patch)
treec7007a75e35fd23bb6041d3a45150ca7f95b2987 /xen/arch/x86/hvm/hvm.c
parent497f6ad7f0b04b265bcccf2624f798556ab3cafb (diff)
downloadxen-55cc7f063053ccf88d945a7480de12b3bc67f8c3.tar.gz
xen-55cc7f063053ccf88d945a7480de12b3bc67f8c3.tar.bz2
xen-55cc7f063053ccf88d945a7480de12b3bc67f8c3.zip
hvm: handle PoD and grant pages in HVMOP_get_mem_type
During kexec in a ballooned PVonHVM guest the new kernel needs to check each pfn if its backed by a mfn to find ballooned pages. Currently all PoD and grant pages will appear as HVMMEM_mmio_dm, so the new kernel has to assume they are ballooned. This is wrong: PoD pages may turn into real RAM at runtime, grant pages are also RAM. Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Tim Deegan <tim@xen.org>
Diffstat (limited to 'xen/arch/x86/hvm/hvm.c')
-rw-r--r--xen/arch/x86/hvm/hvm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index b83e33664e..c7ce8104c7 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -4086,6 +4086,10 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
a.mem_type = HVMMEM_ram_ro;
else if ( p2m_is_ram(t) )
a.mem_type = HVMMEM_ram_rw;
+ else if ( p2m_is_magic(t) )
+ a.mem_type = HVMMEM_ram_rw;
+ else if ( p2m_is_grant(t) )
+ a.mem_type = HVMMEM_ram_rw;
else
a.mem_type = HVMMEM_mmio_dm;
rc = copy_to_guest(arg, &a, 1) ? -EFAULT : 0;