Re: [PATCH 1/7] KVM: x86: Free vCPUs before freeing VM state

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 26, 2025 at 1:27 AM Sean Christopherson <seanjc@xxxxxxxxxx> wrote:
>
> On Wed, Feb 26, 2025, Paolo Bonzini wrote:
> > On 2/25/25 00:55, Sean Christopherson wrote:
> > > Free vCPUs before freeing any VM state, as both SVM and VMX may access
> > > VM state when "freeing" a vCPU that is currently "in" L2, i.e. that needs
> > > to be kicked out of nested guest mode.
> > >
> > > Commit 6fcee03df6a1 ("KVM: x86: avoid loading a vCPU after .vm_destroy was
> > > called") partially fixed the issue, but for unknown reasons only moved the
> > > MMU unloading before VM destruction.  Complete the change, and free all
> > > vCPU state prior to destroying VM state, as nVMX accesses even more state
> > > than nSVM.
> >
> > I applied this to kvm-coco-queue, I will place it in kvm/master too unless
> > you shout.
>
> Depends on what "this" is :-)
>
> My plan/hope is to land patches 1 and 2 in 6.14, i.e. in kvm/master

I meant only 1, but if you want to have 2 as well then that's fine too.

As to kvm-coco-queue, based on Yan's reply I have 1 (of course), 4 and
an extra patch to move kvm_x86_call(vm_destroy) at the very end of
kvm_arch_destroy_vm; I'll post everything as soon as I finish building
and testing.

Paolo

> rest are firmly 6.15 IMO.  And based on Yan's feedback, I'm planning on adding a
> few more cleanups (though I think they're fully additive, i.e. can go on top).
>






[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux