From: Manali Shukla <manali.shukla@amd.com>
To: <kvm@vger.kernel.org>, <linux-kselftest@vger.kernel.org>
Cc: <pbonzini@redhat.com>, <seanjc@google.com>, <shuah@kernel.org>,
<nikunj@amd.com>, <thomas.lendacky@amd.com>,
<vkuznets@redhat.com>, <bp@alien8.de>, <manali.shukla@amd.com>
Subject: [PATCH v1 3/5] tools: Add KVM exit reason for the Idle HLT
Date: Thu, 7 Mar 2024 05:46:21 +0000 [thread overview]
Message-ID: <20240307054623.13632-4-manali.shukla@amd.com> (raw)
In-Reply-To: <20240307054623.13632-1-manali.shukla@amd.com>
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 hypervisor only if there are no pending
V_INR and V_NMI events for the vCPU. The Idle HLT intercept will not be
triggerred when vCPU is expected to service pending events (V_INTR and
V_NMI).
The new SVM_EXIT_IDLE_HLT is introduced as part of the Idle HLT
intercept feature. Add it to SVM_EXIT_REASONS, so that the
SVM_EXIT_IDLE_HLT type of VMEXIT is recognized by tools like perf etc.
Signed-off-by: Manali Shukla <Manali.Shukla@amd.com>
---
tools/arch/x86/include/uapi/asm/svm.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/arch/x86/include/uapi/asm/svm.h b/tools/arch/x86/include/uapi/asm/svm.h
index 80e1df482337..5bf1ad15e1ee 100644
--- a/tools/arch/x86/include/uapi/asm/svm.h
+++ b/tools/arch/x86/include/uapi/asm/svm.h
@@ -95,6 +95,7 @@
#define SVM_EXIT_CR14_WRITE_TRAP 0x09e
#define SVM_EXIT_CR15_WRITE_TRAP 0x09f
#define SVM_EXIT_INVPCID 0x0a2
+#define SVM_EXIT_IDLE_HLT 0x0a6
#define SVM_EXIT_NPF 0x400
#define SVM_EXIT_AVIC_INCOMPLETE_IPI 0x401
#define SVM_EXIT_AVIC_UNACCELERATED_ACCESS 0x402
@@ -224,6 +225,7 @@
{ SVM_EXIT_CR8_WRITE_TRAP, "write_cr8_trap" }, \
{ SVM_EXIT_INVPCID, "invpcid" }, \
{ SVM_EXIT_NPF, "npf" }, \
+ { SVM_EXIT_IDLE_HLT, "idle-halt" }, \
{ SVM_EXIT_AVIC_INCOMPLETE_IPI, "avic_incomplete_ipi" }, \
{ SVM_EXIT_AVIC_UNACCELERATED_ACCESS, "avic_unaccelerated_access" }, \
{ SVM_EXIT_VMGEXIT, "vmgexit" }, \
--
2.34.1
next prev parent reply other threads:[~2024-03-07 5:46 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-07 5:46 [PATCH v1 0/5] Add support for the Idle HLT intercept feature Manali Shukla
2024-03-07 5:46 ` [PATCH v1 1/5] x86/cpufeatures: Add CPUID feature bit for Idle HLT intercept Manali Shukla
2024-03-07 5:46 ` [PATCH v1 2/5] KVM: SVM: Add Idle HLT intercept support Manali Shukla
2024-03-07 5:46 ` Manali Shukla [this message]
2024-03-07 14:30 ` [PATCH v1 3/5] tools: Add KVM exit reason for the Idle HLT Sean Christopherson
2024-03-12 6:10 ` Manali Shukla
2024-03-07 5:46 ` [PATCH v1 4/5] selftests: Add an interface to read the data of named vcpu stat Manali Shukla
2024-03-07 5:46 ` [PATCH v1 5/5] selftests: KVM: SVM: Add Idle HLT intercept test Manali Shukla
2024-03-07 18:22 ` Sean Christopherson
2024-03-07 18:24 ` Sean Christopherson
2024-03-14 5:35 ` Manali Shukla
2024-03-14 15:06 ` Sean Christopherson
2024-03-22 16:03 ` 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=20240307054623.13632-4-manali.shukla@amd.com \
--to=manali.shukla@amd.com \
--cc=bp@alien8.de \
--cc=kvm@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=nikunj@amd.com \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox