ports/emulators/xen-kernel/files/xsa251-4.8.patch
Roger Pau Monné 989d8dbb27 xen-kernel: fix build with clang 6 and apply pending XSA patches
This includes a band-aid for running 64bit PV guests without
compromising the whole system.

MFH:		2018Q1
Sponsored by:	Citrix Systems R&D
2018-01-23 16:23:57 +00:00

21 lines
666 B
Diff

From: Jan Beulich <jbeulich@suse.com>
Subject: x86/paging: don't unconditionally BUG() on finding SHARED_M2P_ENTRY
PV guests can fully control the values written into the P2M.
This is XSA-251.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
--- a/xen/arch/x86/mm/paging.c
+++ b/xen/arch/x86/mm/paging.c
@@ -276,7 +276,7 @@ void paging_mark_pfn_dirty(struct domain
return;
/* Shared MFNs should NEVER be marked dirty */
- BUG_ON(SHARED_M2P(pfn));
+ BUG_ON(paging_mode_translate(d) && SHARED_M2P(pfn));
/*
* Values with the MSB set denote MFNs that aren't really part of the