x86/altp2m: propagate ept.ad changes to all active altp2ms
authorRazvan Cojocaru <rcojocaru@bitdefender.com>
Thu, 15 Nov 2018 12:35:08 +0000 (13:35 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 15 Nov 2018 12:35:08 +0000 (13:35 +0100)
commit303cee10a677dd8c5c130e50ddad6517c12e0276
tree84ddc24d68bd92f2b16fa635307da52e78b55ca2
parent32a5ea00ec75ef53e1f5e095786a34f98fd2e22b
x86/altp2m: propagate ept.ad changes to all active altp2ms

This patch is a pre-requisite for fixing the logdirty VGA issue
(display freezes when switching to a new altp2m view early in a
domain's lifetime).

The new ept_set_ad_sync() function has been added to update all
active altp2ms' ept.ad. New altp2ms will inherit the hostp2m's
ept.ad value.

The p2m_{en,dis}able_hardware_log_dirty() hostp2m locking has
been moved to the new ept_{en,dis}able_hardware_log_dirty()
functions as part of the code refactoring, while locks for the
individual altp2ms are taken in ept_set_ad_sync() (called by
ept_{en,dis}able_pml()).

Suggested-by: George Dunlap <george.dunlap@citrix.com>
Signed-off-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
Tested-by: Tamas K Lengyel <tamas@tklengyel.com>
Acked-by: George Dunlap <george.dunlap@citrix.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
xen/arch/x86/mm/p2m-ept.c
xen/arch/x86/mm/p2m.c