]> xenbits.xensource.com Git - xen.git/commit
x86/hvm: Correct the position of the %cs L/D checks
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 13 Oct 2016 10:27:28 +0000 (11:27 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 14 Oct 2016 11:43:17 +0000 (12:43 +0100)
commit13b9f31751a55a96e86bd7e64b433a62a4a5b71e
tree0674f8bcdc1f6b6775a493e5e422ce883f45a814
parentb5283627de6b7ba2b8d75ecf1edf0a46bcd83edb
x86/hvm: Correct the position of the %cs L/D checks

Contrary to the description in the software manuals, in Long Mode, attempts to
load %cs check that D is not set in combination with L before the present flag
is checked.

This can be observed because the L/D check fails with #GP before the presence
check failes with #NP.

This change partially reverts c/s 78ff18c90 "x86: defer not-present segment
checks", taking it back to how it was in the v1 submission.

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