From: Sean Christopherson <seanjc@google.com>
To: Hao Zhang <hao_zhang_kdev@163.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>, kvm@vger.kernel.org
Subject: Re: [PATCH v3] KVM: x86: Mark nested RSM-created VM-Enter as untrusted
Date: Mon, 27 Jul 2026 17:26:38 -0700 [thread overview]
Message-ID: <amf3PgliChzqL-fB@google.com> (raw)
In-Reply-To: <amcOaHsgnHjdhcsm@192.168.1.215>
On Mon, Jul 27, 2026, Hao Zhang wrote:
> On Tue, Jul 21, 2026, Sean Christopherson wrote:
> > On Tue, Jul 21, 2026, Hao Zhang wrote:
> > Do you happen to have a reproducer I can test? Either way, I'll try to add a
> > testcase to tools/testing/selftests/kvm/x86/vmx_invalid_nested_guest_state.c to
> > cover the SMRAM => RSM path.
> >
>
> I tried to capture your suggestion in a KVM selftest that covers the RSM
> path directly.
>
> The test extends vmx_invalid_nested_guest_state.c by entering SMM after L2
> has run, corrupting the 64-bit SMRAM image for TR, and then executing RSM.
> This makes KVM attempt to resume L2 with invalid guest state restored from
> SMRAM.
>
> On an unfixed kernel, the test fails in the new RSM path with KVM_RUN
> returning -EIO.
>
> Please let me know if this matches what you had in mind, or if you would
> prefer the coverage to be structured differently.
Very nice! There are some tweaks that can be done to reduce the amount of
duplicate code, but this is exactly what I was thinking.
I have this massaged into a proper set of patches, I'll post v4 shortly.
prev parent reply other threads:[~2026-07-28 0:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-21 8:40 [PATCH v3] KVM: x86: Mark nested RSM-created VM-Enter as untrusted Hao Zhang
2026-07-21 15:37 ` Sean Christopherson
2026-07-22 1:26 ` Hao Zhang
2026-07-27 7:53 ` Hao Zhang
2026-07-28 0:26 ` 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=amf3PgliChzqL-fB@google.com \
--to=seanjc@google.com \
--cc=hao_zhang_kdev@163.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.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