All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Kyle Zeng <kylebot@openai.com>
Cc: kvm@vger.kernel.org, Paolo Bonzini <pbonzini@redhat.com>,
	 Thomas Gleixner <tglx@kernel.org>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	 Dave Hansen <dave.hansen@linux.intel.com>,
	Oleg Boiko <oboiko@openai.com>
Subject: Re: [PATCH v3] KVM: x86: Restrict saved GPA writes to hardware write faults
Date: Wed, 16 Sep 2026 12:16:06 -0700	[thread overview]
Message-ID: <aqrq9kE0HnDXQKad@google.com> (raw)
In-Reply-To: <20260915222625.99965-1-kylebot@openai.com>

On Tue, Sep 15, 2026, Kyle Zeng wrote:
> diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c
> index 064ecc33b926..95b9eac9962a 100644
> --- a/arch/x86/kvm/mmu/mmu.c
> +++ b/arch/x86/kvm/mmu/mmu.c
> @@ -6632,6 +6632,9 @@ int noinline kvm_mmu_page_fault(struct kvm_vcpu *vcpu, gpa_t cr2_or_gpa, u64 err
>  		return r;
>  
>  emulate:
> +	if (direct && (error_code & PFERR_WRITE_MASK))
> +		emulation_type |= EMULTYPE_PF_WRITE;

This shouldn't be conditioned on "direct".  Yes, EMULTYPE_PF_WRITE is *currently*
only used for direct MMUs, but it's a generic flag and so should be accurate at
all times.

      parent reply	other threads:[~2026-09-16 19:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-15 22:26 [PATCH v3] KVM: x86: Restrict saved GPA writes to hardware write faults Kyle Zeng
2026-09-15 22:41 ` sashiko-bot
2026-09-15 22:56   ` Kyle Zeng
2026-09-16 19:13     ` Sean Christopherson
2026-09-18  3:33       ` Kyle Zeng
2026-09-16 19:16 ` 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=aqrq9kE0HnDXQKad@google.com \
    --to=seanjc@google.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=kylebot@openai.com \
    --cc=mingo@redhat.com \
    --cc=oboiko@openai.com \
    --cc=pbonzini@redhat.com \
    --cc=tglx@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.