x86: don't allow clearing of TF_kernel_mode for other than 64-bit PV
authorJan Beulich <jbeulich@suse.com>
Fri, 5 Apr 2019 13:40:42 +0000 (15:40 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 5 Apr 2019 13:40:42 +0000 (15:40 +0200)
commitc5985168152c7d990a9deb03193e66cbcc7281d9
treeb4430c68fb875877b6131521b323410dc575bc0e
parentf8303458ae80062dfc60d0efd36198cc17a12ecf
x86: don't allow clearing of TF_kernel_mode for other than 64-bit PV

The flag is really only meant for those, both HVM and 32-bit PV tell
kernel from user mode based on CPL/RPL. Remove the all-question-marks
comment and let's be on the safe side here and also suppress clearing
for 32-bit PV (this isn't a fast path after all).

Remove no longer necessary is_pv_32bit_*() from sh_update_cr3() and
sh_walk_guest_tables(). Note that shadow_one_bit_disable() already
assumes the new behavior.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: George Dunlap <george.dunlap@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/domain.c
xen/arch/x86/mm/shadow/multi.c