All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Sasha Levin <sashal@kernel.org>
Cc: stable@vger.kernel.org, Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH 6.1.y 1/2] KVM: x86/mmu: Use EMULTYPE flag to track write #PFs to shadow pages
Date: Mon, 8 Dec 2025 10:46:40 -0800	[thread overview]
Message-ID: <aTcdEG0tHMSRbxAE@google.com> (raw)
In-Reply-To: <20251208061727.249698-1-sashal@kernel.org>

On Mon, Dec 08, 2025, Sasha Levin wrote:
> From: Sean Christopherson <seanjc@google.com>
> 
> [ Upstream commit 258d985f6eb360c9c7aacd025d0dbc080a59423f ]
> 
> Use a new EMULTYPE flag, EMULTYPE_WRITE_PF_TO_SP, to track page faults
> on self-changing writes to shadowed page tables instead of propagating
> that information to the emulator via a semi-persistent vCPU flag.  Using
> a flag in "struct kvm_vcpu_arch" is confusing, especially as implemented,
> as it's not at all obvious that clearing the flag only when emulation
> actually occurs is correct.
> 
> E.g. if KVM sets the flag and then retries the fault without ever getting
> to the emulator, the flag will be left set for future calls into the
> emulator.  But because the flag is consumed if and only if both
> EMULTYPE_PF and EMULTYPE_ALLOW_RETRY_PF are set, and because
> EMULTYPE_ALLOW_RETRY_PF is deliberately not set for direct MMUs, emulated
> MMIO, or while L2 is active, KVM avoids false positives on a stale flag
> since FNAME(page_fault) is guaranteed to be run and refresh the flag
> before it's ultimately consumed by the tail end of reexecute_instruction().
> 
> Signed-off-by: Sean Christopherson <seanjc@google.com>
> Message-Id: <20230202182817.407394-2-seanjc@google.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> Stable-dep-of: 4da3768e1820 ("KVM: SVM: Don't skip unrelated instruction if INT3/INTO is replaced")
> Signed-off-by: Sasha Levin <sashal@kernel.org>
> ---

Acked-by: Sean Christopherson <seanjc@google.com>

      parent reply	other threads:[~2025-12-08 18:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-08  3:22 FAILED: patch "[PATCH] KVM: SVM: Don't skip unrelated instruction if INT3/INTO is" failed to apply to 6.1-stable tree gregkh
2025-12-08  6:17 ` [PATCH 6.1.y 1/2] KVM: x86/mmu: Use EMULTYPE flag to track write #PFs to shadow pages Sasha Levin
2025-12-08  6:17   ` [PATCH 6.1.y 2/2] KVM: SVM: Don't skip unrelated instruction if INT3/INTO is replaced Sasha Levin
2025-12-08 18:48     ` Sean Christopherson
2025-12-08 18:46   ` Sean Christopherson [this message]

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=aTcdEG0tHMSRbxAE@google.com \
    --to=seanjc@google.com \
    --cc=pbonzini@redhat.com \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.