Use kvm_read_cr4_bits() rather than directly read vcpu->arch.cr4, now that we have reg cache layer and defined this wrapper. Although, effectively for CR4.UMIP, it's the same, at present, as it's not guest owned, in case of future changes, here better to use the canonical interface. Signed-off-by: Robert Hoo <robert.hu@xxxxxxxxx> --- arch/x86/kvm/vmx/vmx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c index bec5792acffe..8853853def56 100644 --- a/arch/x86/kvm/vmx/vmx.c +++ b/arch/x86/kvm/vmx/vmx.c @@ -5435,7 +5435,7 @@ static int handle_set_cr4(struct kvm_vcpu *vcpu, unsigned long val) static int handle_desc(struct kvm_vcpu *vcpu) { - WARN_ON(!(vcpu->arch.cr4 & X86_CR4_UMIP)); + WARN_ON(!kvm_read_cr4_bits(vcpu, X86_CR4_UMIP)); return kvm_emulate_instruction(vcpu, 0); } -- 2.31.1