public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/5] Add support for the Idle HLT intercept feature
@ 2024-03-07  5:46 Manali Shukla
  2024-03-07  5:46 ` [PATCH v1 1/5] x86/cpufeatures: Add CPUID feature bit for Idle HLT intercept Manali Shukla
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Manali Shukla @ 2024-03-07  5:46 UTC (permalink / raw)
  To: kvm, linux-kselftest
  Cc: pbonzini, seanjc, shuah, nikunj, thomas.lendacky, vkuznets, bp,
	manali.shukla

The upcoming new 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 V_INTR and V_NMI events for the vCPU.
When the vCPU is expected to service the pending V_INTR and V_NMI
events, the Idle HLT intercept won’t trigger. The feature allows the
hypervisor to determine if the vCPU is actually idle and reduces
wasteful VMEXITs.

Presence of the Idle HLT Intercept feature is indicated via CPUID
function Fn8000_000A_EDX[30].

Document for the Idle HLT intercept feature will be available in the
next version of "AMD64 Architecture Programmer’s Manual".

Testing Done: 
Added a selftest to test the Idle HLT intercept functionality.
Tested SEV and SEV-ES guest for the Idle HLT intercept functionality.

Manali Shukla (5):
  x86/cpufeatures: Add CPUID feature bit for Idle HLT intercept
  KVM: SVM: Add Idle HLT intercept support
  tools: Add KVM exit reason for the Idle HLT
  selftests: Add an interface to read the data of named vcpu stat
  selftests: KVM: SVM: Add Idle HLT intercept test

 arch/x86/include/asm/cpufeatures.h            |   1 +
 arch/x86/include/asm/svm.h                    |   1 +
 arch/x86/include/uapi/asm/svm.h               |   2 +
 arch/x86/kvm/svm/svm.c                        |  11 +-
 tools/arch/x86/include/uapi/asm/svm.h         |   2 +
 tools/testing/selftests/kvm/Makefile          |   1 +
 .../selftests/kvm/include/kvm_util_base.h     |  11 ++
 tools/testing/selftests/kvm/lib/kvm_util.c    |  41 ++++++
 .../selftests/kvm/x86_64/svm_idlehlt_test.c   | 119 ++++++++++++++++++
 9 files changed, 186 insertions(+), 3 deletions(-)
 create mode 100644 tools/testing/selftests/kvm/x86_64/svm_idlehlt_test.c


base-commit: fdd58834d132046149699b88a27a0db26829f4fb
-- 
2.34.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-03-22 16:04 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH v1 3/5] tools: Add KVM exit reason for the Idle HLT Manali Shukla
2024-03-07 14:30   ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox