From: Sean Christopherson <seanjc@google.com>
To: Borislav Petkov <bp@alien8.de>
Cc: Manali Shukla <manali.shukla@amd.com>,
kvm@vger.kernel.org, linux-kselftest@vger.kernel.org,
pbonzini@redhat.com, shuah@kernel.org, nikunj@amd.com,
thomas.lendacky@amd.com, vkuznets@redhat.com,
babu.moger@amd.com
Subject: Re: [PATCH v4 1/4] x86/cpufeatures: Add CPUID feature bit for Idle HLT intercept
Date: Tue, 22 Oct 2024 08:08:34 -0700 [thread overview]
Message-ID: <Zxe-lhHmVUz-8lYw@google.com> (raw)
In-Reply-To: <20241022093236.GAZxdxNCTki88ttFmy@fat_crate.local>
On Tue, Oct 22, 2024, Borislav Petkov wrote:
> On Tue, Oct 22, 2024 at 05:48:07AM +0000, Manali Shukla wrote:
> > From: Manali Shukla <Manali.Shukla@amd.com>
> >
> > The Idle HLT Intercept feature allows for the HLT instruction
> > execution by a vCPU to be intercepted by the hypervisor only if there
> > are no pending events (V_INTR and V_NMI) for the vCPU. When the vCPU
> > is expected to service the pending events (V_INTR and V_NMI), the Idle
> > HLT intercept won’t trigger. The feature allows the hypervisor to
> > determine if the vCPU is idle and reduces wasteful VMEXITs.
> >
> > In addition to the aforementioned use case, the Idle HLT intercept
> > feature is also used for enlightened guests who aim to securely manage
> > events without the hypervisor’s awareness. If a HLT occurs while
> > a virtual event is pending and the hypervisor is unaware of this
> > pending event (as could be the case with enlightened guests), the
> > absence of the Idle HLT intercept feature could result in a vCPU being
> > suspended indefinitely.
> >
> > Presence of Idle HLT intercept feature for guests is indicated via CPUID
> > function 0x8000000A_EDX[30].
> >
> > Signed-off-by: Manali Shukla <Manali.Shukla@amd.com>
> > Acked-by: Borislav Petkov (AMD) <bp@alien8.de>
> > ---
> > arch/x86/include/asm/cpufeatures.h | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h
> > index dd4682857c12..7461a49e1045 100644
> > --- a/arch/x86/include/asm/cpufeatures.h
> > +++ b/arch/x86/include/asm/cpufeatures.h
> > @@ -382,6 +382,7 @@
> > #define X86_FEATURE_V_SPEC_CTRL (15*32+20) /* "v_spec_ctrl" Virtual SPEC_CTRL */
> > #define X86_FEATURE_VNMI (15*32+25) /* "vnmi" Virtual NMI */
> > #define X86_FEATURE_SVME_ADDR_CHK (15*32+28) /* SVME addr check */
> > +#define X86_FEATURE_IDLE_HLT (15*32+30) /* "" IDLE HLT intercept */
>
> Whoever commits this, you can remove the "" in the comment now as they're not
> needed anymore.
Ya, will do.
next prev parent reply other threads:[~2024-10-22 15:08 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-22 5:48 [PATCH v4 0/4] Add support for the Idle HLT intercept feature Manali Shukla
2024-10-22 5:48 ` [PATCH v4 1/4] x86/cpufeatures: Add CPUID feature bit for Idle HLT intercept Manali Shukla
2024-10-22 9:32 ` Borislav Petkov
2024-10-22 15:08 ` Sean Christopherson [this message]
2024-10-22 5:48 ` [PATCH v4 2/4] KVM: SVM: Add Idle HLT intercept support Manali Shukla
2024-10-22 5:48 ` [PATCH v4 3/4] KVM: nSVM: implement the nested idle halt intercept Manali Shukla
2024-12-20 1:01 ` Sean Christopherson
2024-12-30 7:05 ` Manali Shukla
2024-12-30 7:14 ` Manali Shukla
2024-10-22 5:48 ` [PATCH v4 4/4] KVM: selftests: KVM: SVM: Add Idle HLT intercept test Manali Shukla
2024-12-20 1:24 ` Sean Christopherson
2024-12-30 7:10 ` Manali Shukla
2024-11-28 15:09 ` [PATCH v4 0/4] Add support for the Idle HLT intercept feature Manali Shukla
2024-12-12 16:37 ` Manali Shukla
2024-12-23 9:13 ` Manali Shukla
2024-12-23 9:27 ` Manali Shukla
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=Zxe-lhHmVUz-8lYw@google.com \
--to=seanjc@google.com \
--cc=babu.moger@amd.com \
--cc=bp@alien8.de \
--cc=kvm@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=manali.shukla@amd.com \
--cc=nikunj@amd.com \
--cc=pbonzini@redhat.com \
--cc=shuah@kernel.org \
--cc=thomas.lendacky@amd.com \
--cc=vkuznets@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 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.