diff options
author | Nadav Amit <namit@cs.technion.ac.il> | 2014-10-03 01:10:05 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-11-03 12:07:26 +0100 |
commit | 16f8a6f9798ab9a1fd593b06b78925d02525ab81 (patch) | |
tree | bacce115367ea875e4549d535fba9fbf429a2760 /Documentation | |
parent | c49c759f7a68b70d2fed019760a66843b3df39b8 (diff) | |
download | op-kernel-dev-16f8a6f9798ab9a1fd593b06b78925d02525ab81.zip op-kernel-dev-16f8a6f9798ab9a1fd593b06b78925d02525ab81.tar.gz |
KVM: vmx: Unavailable DR4/5 is checked before CPL
If DR4/5 is accessed when it is unavailable (since CR4.DE is set), then #UD
should be generated even if CPL>0. This is according to Intel SDM Table 6-2:
"Priority Among Simultaneous Exceptions and Interrupts".
Note, that this may happen on the first DR access, even if the host does not
sets debug breakpoints. Obviously, it occurs when the host debugs the guest.
This patch moves the DR4/5 checks from __kvm_set_dr/_kvm_get_dr to handle_dr.
The emulator already checks DR4/5 availability in check_dr_read. Nested
virutalization related calls to kvm_set_dr/kvm_get_dr would not like to inject
exceptions to the guest.
As for SVM, the patch follows the previous logic as much as possible. Anyhow,
it appears the DR interception code might be buggy - even if the DR access
may cause an exception, the instruction is skipped.
Signed-off-by: Nadav Amit <namit@cs.technion.ac.il>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions