mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yan Zhao <yan.y.zhao@intel.com>
To: pbonzini@redhat.com, seanjc@google.com
Cc: rick.p.edgecombe@intel.com, linux-kernel@vger.kernel.org,
	kvm@vger.kernel.org, Yan Zhao <yan.y.zhao@intel.com>
Subject: [PATCH 0/4] Small changes related to prefetch and spurious faults
Date: Fri,  7 Feb 2025 11:06:40 +0800	[thread overview]
Message-ID: <20250207030640.1585-1-yan.y.zhao@intel.com> (raw)

Hi,

This series contains some small changes related to prefetch/prefault and
spurious faults.

Patch 1 checks if a shadow-present old SPTE is leaf to determine a
        prefetch fault is spurious.

Patch 2 merges the case of prefetch into the case of is_access_allowed().

Patch 3 is according to the previous discussion at [1].

Patch 4 always free obsolete roots before reload mmu.

With below scenario
1. add a memslot with size 4K
2. prefault GPA A in the memslot
3. delete the memslot
4. re-add the memslot with size 2M
5. prefault GPA A again.

Patch 1 is required if zap all quirk is disabled in step 3.
Patch 5 is required if zap all is performed in step 3 and if step 2/5 are
        executed before any vcpu_run().

The series can be applied to both
f7bafceba76e9ab475b413578c1757ee18c3e44b and
eb723766b1030a23c38adf2348b7c3d1409d11f0.

Thanks
Yan

[1] https://lore.kernel.org/kvm/Z2WTZGHmPDXHSrTA@google.com/

Yan Zhao (4):
  KVM: x86/mmu: Further check old SPTE is leaf for spurious prefetch
    fault
  KVM: x86/tdp_mmu: Merge the prefetch into the is_access_allowed()
    check
  KVM: x86/mmu: Make sure pfn is not changed for spurious fault
  KVM: x86/mmu: Free obsolete roots when pre-faulting SPTEs

 arch/x86/kvm/mmu/mmu.c     | 8 +++++++-
 arch/x86/kvm/mmu/tdp_mmu.c | 6 ++----
 2 files changed, 9 insertions(+), 5 deletions(-)

-- 
2.43.2


             reply	other threads:[~2025-02-07  3:07 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-07  3:06 Yan Zhao [this message]
2025-02-07  3:07 ` [PATCH 1/4] KVM: x86/mmu: Further check old SPTE is leaf for spurious prefetch fault Yan Zhao
2025-02-07  3:08 ` [PATCH 2/4] KVM: x86/tdp_mmu: Merge the prefetch into the is_access_allowed() check Yan Zhao
2025-02-07 15:03   ` Sean Christopherson
2025-02-08  2:29     ` Yan Zhao
2025-02-10 22:17       ` Sean Christopherson
2025-02-07  3:09 ` [PATCH 3/4] KVM: x86/mmu: Make sure pfn is not changed for spurious fault Yan Zhao
2025-02-07 15:07   ` Sean Christopherson
2025-02-08  2:37     ` Yan Zhao
2025-02-10 22:23       ` Sean Christopherson
2025-02-11  6:48         ` Yan Zhao
2025-02-07  3:09 ` [PATCH 4/4] KVM: x86/mmu: Free obsolete roots when pre-faulting SPTEs Yan Zhao
2025-02-07 15:12   ` Sean Christopherson
2025-02-08  3:01     ` Yan Zhao
2025-02-10 22:41       ` Sean Christopherson
2025-02-11  5:38         ` Yan Zhao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250207030640.1585-1-yan.y.zhao@intel.com \
    --to=yan.y.zhao@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=rick.p.edgecombe@intel.com \
    --cc=seanjc@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®