]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: SVM: Clean up and enhance mov dr emulation
authorJan Kiszka <jan.kiszka@siemens.com>
Wed, 20 Jan 2010 17:20:20 +0000 (18:20 +0100)
committerMarcelo Tosatti <mtosatti@redhat.com>
Mon, 1 Mar 2010 15:36:02 +0000 (12:36 -0300)
commitbbd18dbaa4f448c5da6907f8e3f99ba6bd6bdcde
treee8a50babf616fa41f39a86962f60641027996d8f
parenta18250a33af527d215a9555b4e37eba19505c44c
KVM: SVM: Clean up and enhance mov dr emulation

Enhance mov dr instruction emulation used by SVM so that it properly
handles dr4/5: alias to dr6/7 if cr4.de is cleared. Otherwise return
EMULATE_FAIL which will let our only possible caller in that scenario,
ud_interception, re-inject UD.

We do not need to inject faults, SVM does this for us (exceptions take
precedence over instruction interceptions). For the same reason, the
value overflow checks can be removed.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/svm.c
arch/x86/kvm/x86.c