]> xenbits.xensource.com Git - xen.git/commit
x86/PoD: prevent guest from being destroyed upon early access to its memory
authorJan Beulich <jbeulich@suse.com>
Thu, 16 Aug 2012 08:14:11 +0000 (10:14 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 16 Aug 2012 08:14:11 +0000 (10:14 +0200)
commit085c3669822399fd2fc1350c4a5db91e196d13c0
treee83af82c686cd44affcea12d1184b74360a4db90
parentefaffbc9d6277f774a7382214b3cfefae2bfd784
x86/PoD: prevent guest from being destroyed upon early access to its memory

When an external agent (e.g. a monitoring daemon) happens to access the
memory of a PoD guest prior to setting the PoD target, that access must
fail for there not being any page in the PoD cache, and only the space
above the low 2Mb gets scanned for victim pages (while only the low 2Mb
got real pages populated so far).

To accomodate for this
- set the PoD target first
- do all physmap population in PoD mode (i.e. not just large [2Mb or
  1Gb] pages)
- slightly lift the restrictions enforced by p2m_pod_set_mem_target()
  to accomodate for the changed tools behavior

Tested-by: Jürgen Groß <juergen.gross@ts.fujitsu.com>
           (in a 4.0.x based incarnation)
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
tools/libxc/xc_hvm_build_x86.c
xen/arch/x86/mm/p2m-pod.c