All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Peng Hao" <flyingpenghao@gmail.com>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH 2/2] KVM: selftests: Test that an NMI-window single-step preserves the guest's RF
Date: Wed, 25 Nov 2026 06:39:00 +0000	[thread overview]
Message-ID: <sashiko-outbox-232723@kernel.org> (raw)
In-Reply-To: <20261125063000.92971-2-flyingpeng@tencent.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] KVM: selftests: standalone nmi_iret_rf_test duplicates
  debug_regs harness
--

commit 3aebfc62612be05298e4bd8add5fc7086d476fc4
Author: Peng Hao <flyingpenghao@gmail.com>

KVM: selftests: Test that an NMI-window single-step preserves the guest's RF

This commit adds a standalone KVM x86 selftest verifying that RFLAGS.RF is
preserved across an NMI handler's IRET when KVM single-steps the IRET to
detect the end of NMI blocking.

> diff --git a/tools/testing/selftests/kvm/Makefile.kvm b/tools/testing/selftests/kvm/Makefile.kvm
> index 95867977beb3c..2ca17a1cb275a 100644
> --- a/tools/testing/selftests/kvm/Makefile.kvm
> +++ b/tools/testing/selftests/kvm/Makefile.kvm
> @@ -154,6 +154,7 @@ TEST_GEN_PROGS_x86 += x86/xapic_tpr_test
>  TEST_GEN_PROGS_x86 += x86/xcr0_cpuid_test
>  TEST_GEN_PROGS_x86 += x86/xss_msr_test
>  TEST_GEN_PROGS_x86 += x86/debug_regs
> +TEST_GEN_PROGS_x86 += x86/nmi_iret_rf_test
>  TEST_GEN_PROGS_x86 += x86/tsc_msrs_test
>  TEST_GEN_PROGS_x86 += x86/vmx_pmu_caps_test
>  TEST_GEN_PROGS_x86 += x86/xen_shinfo_test

[Severity: Low]
Could this test case be folded into tools/testing/selftests/kvm/x86/debug_regs.c
instead of adding a standalone x86/nmi_iret_rf_test binary?

debug_regs.c already sets up a single-vCPU VM with x2apic_enable() and a
DB_VECTOR exception handler to test hardware instruction breakpoints and
guest-handled #DB interactions with interrupt delivery and IRET.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261125063000.92971-1-flyingpeng@tencent.com?part=2

      reply	other threads:[~2026-11-25  6:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25  6:29 [PATCH 1/2] KVM: SVM: Don't clobber RFLAGS.RF loaded by a single-stepped IRET Peng Hao
2026-11-25  6:30 ` [PATCH 2/2] KVM: selftests: Test that an NMI-window single-step preserves the guest's RF Peng Hao
2026-11-25  6:39   ` sashiko-bot [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=sashiko-outbox-232723@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=flyingpenghao@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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.