x86/EPT: don't walk entire page tables when globally changing types
authorJan Beulich <jbeulich@suse.com>
Fri, 2 May 2014 09:50:43 +0000 (11:50 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 2 May 2014 09:50:43 +0000 (11:50 +0200)
commit90ac32559bfbd08127638ba13f99b5ed565cfc2b
tree112188f06772e1788d64140886ce5c1b4018e5a3
parentec62113c632e9c23b989cdbe30e3a105658e3364
x86/EPT: don't walk entire page tables when globally changing types

Instead leverage the EPT_MISCONFIG VM exit by marking just the top
level entries as needing recalculation of their type, propagating the
the recalculation state down as necessary such that the actual
recalculation gets done upon access.

For this to work, we have to
- restrict the types between which conversions can be done (right now
  only the two types involved in log dirty tracking need to be taken
  care of)
- remember the ranges that log dirty tracking was requested for as well
  as whether global log dirty tracking is in effect

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Tim Deegan <tim@xen.org>
xen/arch/x86/mm/hap/hap.c
xen/arch/x86/mm/p2m-ept.c
xen/arch/x86/mm/p2m.c
xen/include/asm-x86/hvm/vmx/vmx.h
xen/include/asm-x86/p2m.h