aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlaf Hering <olaf@aepfle.de>2012-10-29 09:04:06 +0100
committerOlaf Hering <olaf@aepfle.de>2012-10-29 09:04:06 +0100
commitd4a54ee15694748d0c44faf3600d01fe3d346286 (patch)
tree0530dfa7d063bab9a163bd6be6786a36fc22cfcd
parentc6cdb76cbdf9b60e97c32cb72350c89e7026fad8 (diff)
downloadxen-d4a54ee15694748d0c44faf3600d01fe3d346286.tar.gz
xen-d4a54ee15694748d0c44faf3600d01fe3d346286.tar.bz2
xen-d4a54ee15694748d0c44faf3600d01fe3d346286.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> xen-unstable changeset: 26093:4ae08ca5500f xen-unstable date: Fri Oct 19 14:09:05 UTC 2012
-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 8caf4efb89..66cf8054d3 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -3578,6 +3578,10 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE(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;