SHA256
1
0
forked from pool/xen

Renamed 26093-hvm_handle_PoD_and_grant_pages_in_HVMOP_get_mem_type.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=213
This commit is contained in:
Charles Arnold 2012-11-19 15:28:27 +00:00 committed by Git OBS Bridge
parent 646cd8897b
commit d06b74f681
2 changed files with 1 additions and 31 deletions

View File

@ -1,31 +0,0 @@
changeset: 26093:4ae08ca5500f
user: Olaf Hering <olaf@aepfle.de>
date: Fri Oct 19 16:09:05 2012 +0200
files: xen/arch/x86/hvm/hvm.c
description:
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>
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -4135,6 +4135,10 @@ long do_hvm_op(unsigned long op, XEN_GUE
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;

View File

@ -15,6 +15,7 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via http://bugs.opensuse.org/
# #
Name: xen Name: xen
ExclusiveArch: %ix86 x86_64 ExclusiveArch: %ix86 x86_64
%define xvers 4.2 %define xvers 4.2