handle_vmwrite() should use is_long_mode() instead of is_64_bit_mode() because VMWRITE opcode is invalid in compatibility mode and there is no reason for extra checking CS.L. Signed-off-by: Eugene Korenevsky <ekorenevsky@xxxxxxxxx> --- arch/x86/kvm/vmx/nested.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nested.c index a2d744427d66..b39fc075aead 100644 --- a/arch/x86/kvm/vmx/nested.c +++ b/arch/x86/kvm/vmx/nested.c @@ -4467,7 +4467,7 @@ static int handle_vmwrite(struct kvm_vcpu *vcpu) field_value = kvm_register_readl(vcpu, (((vmx_instruction_info) >> 3) & 0xf)); else { - len = is_64_bit_mode(vcpu) ? 8 : 4; + len = is_long_mode(vcpu) ? 8 : 4; if (get_vmx_mem_address(vcpu, exit_qualification, vmx_instruction_info, false, len, &gva)) return 1; -- 2.21.0