[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <172442179509.3955684.3431419416456573954.b4-ty@google.com>
Date: Fri, 23 Aug 2024 16:47:39 -0700
From: Sean Christopherson <seanjc@...gle.com>
To: Sean Christopherson <seanjc@...gle.com>, Paolo Bonzini <pbonzini@...hat.com>
Cc: kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] KVM: x86: Acquire kvm->srcu when handling KVM_SET_VCPU_EVENTS
On Tue, 23 Jul 2024 16:20:55 -0700, Sean Christopherson wrote:
> Grab kvm->srcu when processing KVM_SET_VCPU_EVENTS, as KVM will forcibly
> leave nested VMX/SVM if SMM mode is being toggled, and leaving nested VMX
> reads guest memory.
>
> Note, kvm_vcpu_ioctl_x86_set_vcpu_events() can also be called from KVM_RUN
> via sync_regs(), which already holds SRCU. I.e. trying to precisely use
> kvm_vcpu_srcu_read_lock() around the problematic SMM code would cause
> problems. Acquiring SRCU isn't all that expensive, so for simplicity,
> grab it unconditionally for KVM_SET_VCPU_EVENTS.
>
> [...]
Applied to kvm-x86 fixes, thanks!
[1/1] KVM: x86: Acquire kvm->srcu when handling KVM_SET_VCPU_EVENTS
https://github.com/kvm-x86/linux/commit/4bcdd831d9d0
--
https://github.com/kvm-x86/linux/tree/next
Powered by blists - more mailing lists