]> xenbits.xensource.com Git - xen.git/commit
x86: defer not-present segment checks
authorJan Beulich <jbeulich@suse.com>
Mon, 10 Oct 2016 10:16:49 +0000 (12:16 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 10 Oct 2016 10:16:49 +0000 (12:16 +0200)
commit78ff18c905318a9b1e5dd32662986f03b10a4e56
tree3e2b4d7ccea1a8b60a46d06279249887f6e9ae30
parent62c12fa3b15caf54cb8436458a86a1acf42170fd
x86: defer not-present segment checks

Following on from commits 5602e74c60 ("x86emul: correct loading of
%ss") and bdb860d01c ("x86/HVM: correct segment register loading during
task switch") the point of the non-.present checks needs to be refined:
#NP (and its #SS companion), other than suggested by the various
instruction pages in Intel's SDM, gets checked for only after all type
and permission checks. The only checks getting done even later are the
long mode specific ones for system descriptors (which we don't support
yet) and 64-bit code segments (i.e. anything touching other than the
attribute byte).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/hvm/hvm.c
xen/arch/x86/x86_emulate/x86_emulate.c