aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/vmx.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kvm/vmx.c')
-rw-r--r--arch/x86/kvm/vmx.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index f1cae7d6113d..22ab7137d1d0 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -2478,10 +2478,10 @@ static int vmx_vcpu_reset(struct kvm_vcpu *vcpu)
2478{ 2478{
2479 struct vcpu_vmx *vmx = to_vmx(vcpu); 2479 struct vcpu_vmx *vmx = to_vmx(vcpu);
2480 u64 msr; 2480 u64 msr;
2481 int ret; 2481 int ret, idx;
2482 2482
2483 vcpu->arch.regs_avail = ~((1 << VCPU_REGS_RIP) | (1 << VCPU_REGS_RSP)); 2483 vcpu->arch.regs_avail = ~((1 << VCPU_REGS_RIP) | (1 << VCPU_REGS_RSP));
2484 down_read(&vcpu->kvm->slots_lock); 2484 idx = srcu_read_lock(&vcpu->kvm->srcu);
2485 if (!init_rmode(vmx->vcpu.kvm)) { 2485 if (!init_rmode(vmx->vcpu.kvm)) {
2486 ret = -ENOMEM; 2486 ret = -ENOMEM;
2487 goto out; 2487 goto out;
@@ -2589,7 +2589,7 @@ static int vmx_vcpu_reset(struct kvm_vcpu *vcpu)
2589 vmx->emulation_required = 0; 2589 vmx->emulation_required = 0;
2590 2590
2591out: 2591out:
2592 up_read(&vcpu->kvm->slots_lock); 2592 srcu_read_unlock(&vcpu->kvm->srcu, idx);
2593 return ret; 2593 return ret;
2594} 2594}
2595 2595