From: Sean Christopherson <seanjc@google.com>
To: Jim Mattson <jmattson@google.com>
Cc: Tina Zhang <zhang_wei@open-hieco.net>,
mlevitsk@redhat.com, Paolo Bonzini <pbonzini@redhat.com>,
kvm@vger.kernel.org, Shuah Khan <shuah@kernel.org>,
zhouyanjing@hygon.cn, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/2] KVM: nSVM: Expose DecodeAssists to L1
Date: Tue, 7 Jul 2026 08:47:57 -0700 [thread overview]
Message-ID: <ak0frVw7GZ3HTwJV@google.com> (raw)
In-Reply-To: <CALMp9eTK-Dg24geFN6tnkoD3rc4ct6eZcHCBv3EvPYOhBvaFaw@mail.gmail.com>
On Tue, Jul 07, 2026, Jim Mattson wrote:
> On Tue, Jul 7, 2026 at 7:42 AM Sean Christopherson <seanjc@google.com> wrote:
> >
> > On Mon, Jul 06, 2026, Jim Mattson wrote:
> > > On Mon, Jul 6, 2026 at 8:25 PM Jim Mattson <jmattson@google.com> wrote:
> > > >
> > > > On Mon, Jul 6, 2026 at 8:21 PM Sean Christopherson <seanjc@google.com> wrote:
> > > > >
> > > > > On Tue, Jul 07, 2026, Tina Zhang wrote:
> > > > > >
> > > > > >
> > > > > > On 7/7/2026 9:32 AM, Jim Mattson wrote:
> > > > > > > On Mon, Jul 6, 2026 at 5:02 PM Tina Zhang <zhang_wei@open-hieco.net> wrote:
> > > > > > >
> > > > > > > > I will take another look for the next version and try to handle the
> > > > > > > > remaining pieces properly, while also making sure we don't expose stale
> > > > > > > > or incorrectly synthesized decode-assist state for emulated exits.
> > > > > > >
> > > > > > > Naples erratum 1096 seems to imply that the instruction bytes stored
> > > > > > > in the VMCB are not necessarily the same instruction bytes that were
> > > > > > > fetched and decoded to lead to the #PF/#NPF. Hence, in the case of
> > > > > > > emulation, it might be sufficient to read the instruction bytes quite
> > > > > > > late in nested_svm_vmexit(). That would certainly simplify the
> > > > > > > plumbing.
> > > > >
> > > > > The plumbing doesn't seem all that complex though.
> > >
> > > What about the case of a userspace-injected #PF while running L2, when
> > > L1 intercepts #PF?
> >
> > That can/will be handled by the fallback logic of reading the code stream on-demand?
>
> Could be, but I would prefer consistency.
Not sure I follow. Consistency with what? If userspace injects a #PF in response
to an exit from emulator proper, the emulator context will still be valid. If the
#PF is injected for something like X86_WRMSR, X86_RDMSR, or MEMORY_FAULT, KVM will
fetch the bytes on-demand, same as it would if KVM itself synthesized a #PF that
didn't originate in hardware.
next prev parent reply other threads:[~2026-07-07 15:47 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-29 12:52 [PATCH 0/2] KVM: nSVM: Expose DecodeAssists to L1 Tina Zhang
2026-06-29 12:52 ` [PATCH 1/2] KVM: nSVM: Virtualize DecodeAssists for nested guests Tina Zhang
2026-06-29 13:12 ` sashiko-bot
2026-06-30 15:11 ` Jim Mattson
2026-06-29 12:52 ` [PATCH 2/2] KVM: selftests: Add nested SVM DecodeAssists test Tina Zhang
2026-06-30 15:52 ` [PATCH 0/2] KVM: nSVM: Expose DecodeAssists to L1 Jim Mattson
2026-07-06 22:10 ` mlevitsk
2026-07-07 0:01 ` Tina Zhang
2026-07-07 1:32 ` Jim Mattson
2026-07-07 2:44 ` Tina Zhang
2026-07-07 3:21 ` Sean Christopherson
2026-07-07 3:25 ` Jim Mattson
2026-07-07 3:32 ` Jim Mattson
2026-07-07 14:42 ` Sean Christopherson
2026-07-07 15:19 ` Jim Mattson
2026-07-07 15:47 ` Sean Christopherson [this message]
2026-07-07 18:56 ` Jim Mattson
2026-07-07 14:41 ` Sean Christopherson
2026-07-07 15:24 ` Jim Mattson
2026-07-07 15:37 ` Sean Christopherson
2026-07-07 18:23 ` Jim Mattson
2026-07-07 19:16 ` Sean Christopherson
2026-07-08 23:21 ` Venkatesh Srinivas
2026-07-09 14:08 ` Sean Christopherson
2026-07-07 22:34 ` Yosry Ahmed
2026-07-08 0:53 ` Tina Zhang
2026-07-08 14:04 ` Sean Christopherson
2026-07-08 17:47 ` Yosry Ahmed
2026-07-09 1:00 ` Tina Zhang
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=ak0frVw7GZ3HTwJV@google.com \
--to=seanjc@google.com \
--cc=jmattson@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mlevitsk@redhat.com \
--cc=pbonzini@redhat.com \
--cc=shuah@kernel.org \
--cc=zhang_wei@open-hieco.net \
--cc=zhouyanjing@hygon.cn \
/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.