From: Sean Christopherson <seanjc@google.com>
To: Xiaoyao Li <xiaoyao.li@intel.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
kvm@vger.kernel.org, Chenyi Qiang <chenyi.qiang@intel.com>
Subject: Re: [kvm-unit-tests PATCH v3 2/2] x86/vmx: (Re)Add a nVMX test to validate load/save of DEBUGCTL
Date: Wed, 27 May 2026 08:21:14 -0700 [thread overview]
Message-ID: <ahcL6tprdOooMISu@google.com> (raw)
In-Reply-To: <d3cd9e60-3b4e-4df0-abd4-5677c30f20fc@intel.com>
On Wed, May 27, 2026, Xiaoyao Li wrote:
> On 5/27/2026 11:12 PM, Sean Christopherson wrote:
> > + for (i = 1; i <= supported_bits; i++) {
> > + if ((i & supported_bits) != i)
> > + continue;
> > +
> > + for (j = 1; j <= supported_bits; j++) {
> > + if ((j & supported_bits) != j)
> > + continue;
> > +
> > + __vmx_debugctl_test(i, j);
> > + }
> > + }
>
> What a clever idea!
>
> A minor flaw: Both i and j should start from 0, since 0 is a valid value.
Heh, I knew I should have added a comment. I deliberately started at '1', because
'0' is used as a "base" value, to be able to detect changes. I.e. '0' is getting
valiated on every test anyways.
next prev parent reply other threads:[~2026-05-27 15:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-27 15:12 [kvm-unit-tests PATCH v3 0/2] nVMX: Improve DEBUGCTL test coverage Sean Christopherson
2026-05-27 15:12 ` [kvm-unit-tests PATCH v3 1/2] nVMX: Remove the IA32_DEBUGCTLMSR access in debugctls test Sean Christopherson
2026-05-27 15:12 ` [kvm-unit-tests PATCH v3 2/2] x86/vmx: (Re)Add a nVMX test to validate load/save of DEBUGCTL Sean Christopherson
2026-05-27 15:19 ` Xiaoyao Li
2026-05-27 15:21 ` Sean Christopherson [this message]
2026-05-28 1:43 ` Chenyi Qiang
2026-05-28 7:16 ` Xiaoyao Li
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=ahcL6tprdOooMISu@google.com \
--to=seanjc@google.com \
--cc=chenyi.qiang@intel.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=xiaoyao.li@intel.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