]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: vmx: vmx instructions handling does not consider cs.l
authorNadav Amit <namit@cs.technion.ac.il>
Wed, 18 Jun 2014 14:19:26 +0000 (17:19 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 19 Jun 2014 10:52:15 +0000 (12:52 +0200)
commit1dfbb6100b574dbd5168b9b72213dd22c456b00d
treea70eb57477af54459b6d97f9e34156eaf01ed6b2
parent032f8ca4b16ac45461092ddb35e8b098325a86b2
KVM: vmx: vmx instructions handling does not consider cs.l

VMX instructions use 32-bit operands in 32-bit mode, and 64-bit operands in
64-bit mode.  The current implementation is broken since it does not use the
register operands correctly, and always uses 64-bit for reads and writes.
Moreover, write to memory in vmwrite only considers long-mode, so it ignores
cs.l. This patch fixes this behavior.

Signed-off-by: Nadav Amit <namit@cs.technion.ac.il>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx.c
arch/x86/kvm/x86.h