]> xenbits.xensource.com Git - xen.git/commit
x86/shim: fix build with PV_SHIM_EXCLUSIVE and SHADOW_PAGING
authorJan Beulich <jbeulich@suse.com>
Fri, 2 Oct 2020 06:34:28 +0000 (08:34 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 2 Oct 2020 06:34:28 +0000 (08:34 +0200)
commit23d4e0d17b764a404e1e43db04c56a714932b666
tree4e0752fa83dcfb2ebe9198c7362e4381e1212d45
parentbdb380e1dbdc6b76576ab6db0b8e946cc95edc1c
x86/shim: fix build with PV_SHIM_EXCLUSIVE and SHADOW_PAGING

While there's little point in enabling both, the combination ought to at
least build correctly. Drop the direct PV_SHIM_EXCLUSIVE conditionals
and instead zap PG_log_dirty to zero under the right conditions, and key
other #ifdef-s off of that.

While there also expand on ded576ce07e9 ("x86/shadow: dirty VRAM
tracking is needed for HVM only"): There was yet another is_hvm_domain()
missing, and code touching the struct fields needs to be guarded by
suitable #ifdef-s as well. While there also guard shadow-mode-only
fields accordingly.

Fixes: 8b5b49ceb3d9 ("x86: don't include domctl and alike in shim-exclusive builds")
Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
xen/arch/x86/mm/paging.c
xen/arch/x86/mm/shadow/common.c
xen/arch/x86/mm/shadow/multi.c
xen/include/asm-x86/paging.h