Re: [PATCH] KVM: x86/mmu: Treat TDP MMU faults as spurious if access is already allowed
From: Lei Yang
Date: Thu Dec 19 2024 - 09:56:42 EST
I tested this patch with the bug's reproducer, the problem has gone.
Tested-by: Lei Yang <leiyang@xxxxxxxxxx>
On Thu, Dec 19, 2024 at 10:41 AM Sean Christopherson <seanjc@xxxxxxxxxx> wrote:
>
> On Wed, 18 Dec 2024 13:36:11 -0800, Sean Christopherson wrote:
> > Treat slow-path TDP MMU faults as spurious if the access is allowed given
> > the existing SPTE to fix a benign warning (other than the WARN itself)
> > due to replacing a writable SPTE with a read-only SPTE, and to avoid the
> > unnecessary LOCK CMPXCHG and subsequent TLB flush.
> >
> > If a read fault races with a write fault, fast GUP fails for any reason
> > when trying to "promote" the read fault to a writable mapping, and KVM
> > resolves the write fault first, then KVM will end up trying to install a
> > read-only SPTE (for a !map_writable fault) overtop a writable SPTE.
> >
> > [...]
>
> Applied very quickly to kvm-x86 fixes, so that it can get at least one day in
> -next before I send it to Paolo.
>
> [1/1] KVM: x86/mmu: Treat TDP MMU faults as spurious if access is already allowed
> https://github.com/kvm-x86/linux/commit/55f60a6498e7
>
> --
> https://github.com/kvm-x86/linux/tree/next
>