Re: [PATCH RESEND] KVM: X86: Grab KVM's srcu lock when accessing hv assist page
From: Wanpeng Li
Date: Fri Feb 14 2020 - 03:59:31 EST
On Fri, 14 Feb 2020 at 16:58, Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote:
>
> On 14/02/20 09:51, Wanpeng Li wrote:
> > From: Wanpeng Li <wanpengli@xxxxxxxxxxx>
> >
> > Acquire kvm->srcu for the duration of mapping eVMCS to fix a bug where accessing
> > hv assist page derefences ->memslots without holding ->srcu or ->slots_lock.
>
> Perhaps nested_sync_vmcs12_to_shadow should be moved to
> prepare_guest_switch, where the SRCU is already taken.
Will do.
Wanpeng