Re: [PATCH 3/7] KVM: Assert that a destroyed/freed vCPU is no longer visible

2025-02-25 Thread Sean Christopherson
On Tue, Feb 25, 2025, Yan Zhao wrote: > On Mon, Feb 24, 2025 at 03:55:38PM -0800, Sean Christopherson wrote: > > After freeing a vCPU, assert that it is no longer reachable, and that > > kvm_get_vcpu() doesn't return garbage or a pointer to some other vCPU. > > While KVM obviously shouldn't be atte

Re: [PATCH 3/7] KVM: Assert that a destroyed/freed vCPU is no longer visible

2025-02-24 Thread Yan Zhao
On Mon, Feb 24, 2025 at 03:55:38PM -0800, Sean Christopherson wrote: > After freeing a vCPU, assert that it is no longer reachable, and that > kvm_get_vcpu() doesn't return garbage or a pointer to some other vCPU. > While KVM obviously shouldn't be attempting to access a freed vCPU, it's > all too

[PATCH 3/7] KVM: Assert that a destroyed/freed vCPU is no longer visible

2025-02-24 Thread Sean Christopherson
After freeing a vCPU, assert that it is no longer reachable, and that kvm_get_vcpu() doesn't return garbage or a pointer to some other vCPU. While KVM obviously shouldn't be attempting to access a freed vCPU, it's all too easy for KVM to make a VM-wide request, e.g. via KVM_BUG_ON() or kvm_flush_re