]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: Emulator performs code segment checks on read access
authorNadav Amit <namit@cs.technion.ac.il>
Thu, 2 Oct 2014 22:10:03 +0000 (01:10 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 3 Nov 2014 11:07:25 +0000 (12:07 +0100)
commitdeecea4ea836095bc37d4fdfb32f2961d33b1b2b
tree74cbdd262839df571ed9ef86b6603fb0f1e0cb68
parent78c6c22c7f5947d0273d479b4aac5daf7e1a08fb
KVM: x86: Emulator performs code segment checks on read access

When read access is performed using a readable code segment, the "conforming"
and "non-conforming" checks should not be done.  As a result, read using
non-conforming readable code segment fails.

This is according to Intel SDM 5.6.1 ("Accessing Data in Code Segments").

The fix is not to perform the "non-conforming" checks if the access is not a
fetch; the relevant checks are already done when loading the segment.

Signed-off-by: Nadav Amit <namit@cs.technion.ac.il>
Reviewed-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/emulate.c