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>
Šī revīzija ir iekļauta:

revīziju iesūtīja
Paolo Bonzini

vecāks
1e32c07955
revīzija
27e6fb5dae
@@ -126,6 +126,15 @@ static inline unsigned long kvm_register_readl(struct kvm_vcpu *vcpu,
|
||||
return is_64_bit_mode(vcpu) ? val : (u32)val;
|
||||
}
|
||||
|
||||
static inline void kvm_register_writel(struct kvm_vcpu *vcpu,
|
||||
enum kvm_reg reg,
|
||||
unsigned long val)
|
||||
{
|
||||
if (!is_64_bit_mode(vcpu))
|
||||
val = (u32)val;
|
||||
return kvm_register_write(vcpu, reg, val);
|
||||
}
|
||||
|
||||
void kvm_before_handle_nmi(struct kvm_vcpu *vcpu);
|
||||
void kvm_after_handle_nmi(struct kvm_vcpu *vcpu);
|
||||
int kvm_inject_realmode_interrupt(struct kvm_vcpu *vcpu, int irq, int inc_eip);
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user