Re: [RFC PATCH 06/12] KVM: TDX: Return -EIO, not -EINVAL, on a KVM_BUG_ON() condition

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

 



On Thu, 2025-08-28 at 14:00 -0700, Sean Christopherson wrote:
> But that's not actually what the code does.  The lockdep assert won't trip because
> KVM never removes S-EPT entries under read-lock:

Right

> 
> 		if (is_mirror_sp(sp)) {
> 			KVM_BUG_ON(shared, kvm);
> 			remove_external_spte(kvm, gfn, old_spte, level);
> 		}
> 
> Not because KVM actually guarantees -EBUSY is avoided.  So the current code is
> flawed, it just doesn't cause problems.

Flawed, as in the lockdep should assert regardless of EBUSY? Seems good to me.
Probably if we wanted to try to call tdx_sept_remove_private_spte() under read
lock with special plans to avoid EBUSY we should think twice anyway.




[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