File 5b0d2d91-x86-suppress-sync-when-XPTI-off.patch of Package xen.7985
# Commit b7eb9d8bd61ecdc399e8fc41ea4bbff35cbe0755
# Date 2018-05-29 12:38:09 +0200
# Author Jan Beulich <jbeulich@suse.com>
# Committer Jan Beulich <jbeulich@suse.com>
x86: suppress sync when XPTI is disabled for a domain
Now that we have a per-domain flag we can and should control sync-ing in
a more fine grained manner: Only domains having XPTI enabled need the
sync to occur.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -3723,7 +3723,7 @@ long do_mmu_update(
case PGT_l4_page_table:
rc = mod_l4_entry(va, l4e_from_intpte(req.val), mfn,
cmd == MMU_PT_UPDATE_PRESERVE_AD, v);
- if ( !rc && !cpu_has_no_xpti )
+ if ( !rc && pt_owner->arch.pv_domain.xpti )
{
bool local_in_use = false;