From: Kevin Cheng <chengkev@google.com>
To: kvm@vger.kernel.org
Cc: yosryahmed@google.com, andrew.jones@linux.dev, thuth@redhat.com,
pbonzini@redhat.com, seanjc@google.com,
Kevin Cheng <chengkev@google.com>
Subject: [kvm-unit-tests PATCH 0/2] x86/svm: Add testing for L1 intercept bug
Date: Fri, 5 Dec 2025 08:02:26 +0000 [thread overview]
Message-ID: <20251205080228.4055341-1-chengkev@google.com> (raw)
If a feature is not advertised to L1, L1 intercepts for instructions
controlled by this feature should be ignored. Currently, the added test
fails due to a bug in nested vm exit handling where vmcb12 intercepts
are checked before vmcb02 intercepts, causing the #UD exception to never
be injected into L2 if the L1 intercept is set. This is fixed in [0]
The first patch just adds the missing intercepts needed for testing and
restructures the vmcb_control_area struct to make adding the missing
intercepts less ugly. The second patch adds the test which disables all
relevant features that have available instruction intercepts, and checks
that the #UD exception is correctly delivered despite the L1 intercept
being set.
[0] https://lore.kernel.org/all/20251205070630.4013452-1-chengkev@google.com/
Kevin Cheng (2):
x86/svm: Add missing svm intercepts
x86/svm: Add unsupported instruction intercept test
x86/svm.c | 6 +-
x86/svm.h | 87 ++++++++++++++++++---
x86/svm_tests.c | 188 ++++++++++++++++++++++++++++++++--------------
x86/unittests.cfg | 9 ++-
4 files changed, 220 insertions(+), 70 deletions(-)
--
2.52.0.223.gf5cc29aaa4-goog
next reply other threads:[~2025-12-05 8:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-05 8:02 Kevin Cheng [this message]
2025-12-05 8:02 ` [kvm-unit-tests PATCH 1/2] x86/svm: Add missing svm intercepts Kevin Cheng
2025-12-05 8:14 ` Kevin Cheng
2025-12-05 8:02 ` [kvm-unit-tests PATCH] x86/svm: Add unsupported instruction intercept test Kevin Cheng
2025-12-05 8:14 ` Kevin Cheng
2025-12-05 8:14 ` [kvm-unit-tests PATCH 0/2] x86/svm: Add testing for L1 intercept bug Kevin Cheng
-- strict thread matches above, loose matches on Subject: below --
2025-12-05 8:14 Kevin Cheng
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=20251205080228.4055341-1-chengkev@google.com \
--to=chengkev@google.com \
--cc=andrew.jones@linux.dev \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=thuth@redhat.com \
--cc=yosryahmed@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