Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: Manali Shukla <manali.shukla@amd.com>
To: Muhammad Usama Anjum <usama.anjum@collabora.com>,
	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,
	Manali Shukla <manali.shukla@amd.com>
Subject: Re: [PATCH v1 3/3] KVM: selftests: Add a test case for KVM_X86_DISABLE_EXITS_HLT
Date: Mon, 1 Apr 2024 11:57:18 +0530	[thread overview]
Message-ID: <52357c8d-2e1a-75c6-9f73-2da7b510b711@amd.com> (raw)
In-Reply-To: <5d667c81-56a8-95bd-4aa1-4df16c42dabf@amd.com>

On 4/1/2024 10:58 AM, Manali Shukla wrote:
> Hi Muhammad Usama Anjum,
> 
> Thank you for reviewing my patch.
> 
> On 3/30/2024 1:43 AM, Muhammad Usama Anjum wrote:
>> On 3/27/24 10:42 AM, Manali Shukla wrote:
>>> By default, HLT instruction executed by guest is intercepted by hypervisor.
>>> However, KVM_CAP_X86_DISABLE_EXITS capability can be used to not intercept
>>> HLT by setting KVM_X86_DISABLE_EXITS_HLT.
>>>
>>> Add a test case to test KVM_X86_DISABLE_EXITS_HLT functionality.
>>>
>>> Suggested-by: Sean Christopherson <seanjc@google.com>
>>> Signed-off-by: Manali Shukla <manali.shukla@amd.com>
>> Thank you for the new test patch. We have been trying to ensure TAP
>> conformance for tests which cannot be achieved if new tests aren't using
>> TAP already. Please make your test TAP compliant.
> 
> As per my understanding about TAP interface, kvm_test_harness.h file includes a MACRO,
> which is used to create VM with one vcpu using vm_create_with_one_vcpu(), but
> halt_disable_exit_test creates a customized VM with KVM_CAP_X86_DISABLE_EXITS
> capability set and different vm_shape parameters to start a VM without in-kernel
> APIC support. AFAIU, I won't be able to use KVM_ONE_VCPU_TEST_SUITE MACRO as is.
> How do you suggest to proceed with this issue? 
> 
>>
>>> ---
>>>  tools/testing/selftests/kvm/Makefile          |   1 +
>>>  .../kvm/x86_64/halt_disable_exit_test.c       | 113 ++++++++++++++++++
>> Add generated object to .gitignore file.
> 
> Sure. I will do it.

I think adding of generated object to .gitignore is not needed because
/tools/testing/selftests/kvm/.gitignore uses pattern matching to exclude
everything except .c, .h, .S, and .sh files from Git, which was committed
via below commit.

commit 43e96957e8b87bad8e4ba666750ff0cda9e03ffb
KVM: selftests: Use pattern matching in .gitignore

>>>>>  2 files changed, 114 insertions(+)
>>>  create mode 100644 tools/testing/selftests/kvm/x86_64/halt_disable_exit_test.c
>>>
>>> diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests/kvm/Makefile
>>> index c75251d5c97c..9f72abb95d2e 100644
>>> --- a/tools/testing/selftests/kvm/Makefile
>>> +++ b/tools/testing/selftests/kvm/Makefile
>>> @@ -89,6 +89,7 @@ TEST_GEN_PROGS_x86_64 += x86_64/set_sregs_test
>>>  TEST_GEN_PROGS_x86_64 += x86_64/smaller_maxphyaddr_emulation_test
>>>  TEST_GEN_PROGS_x86_64 += x86_64/smm_test
>>>  TEST_GEN_PROGS_x86_64 += x86_64/state_test
>>> +TEST_GEN_PROGS_x86_64 += x86_64/halt_disable_exit_test
>>>  TEST_GEN_PROGS_x86_64 += x86_64/vmx_preemption_timer_test
>>>  TEST_GEN_PROGS_x86_64 += x86_64/svm_vmcall_test
>>>  TEST_GEN_PROGS_x86_64 += x86_64/svm_int_ctl_test
>>> diff --git a/tools/testing/selftests/kvm/x86_64/halt_disable_exit_test.c b/tools/testing/selftests/kvm/x86_64/halt_disable_exit_test.c
>>> new file mode 100644
>>> index 000000000000..b7279dd0eaff
>>> --- /dev/null


  reply	other threads:[~2024-04-01  6:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-27  5:42 [PATCH v1 0/3] Add a test case for KVM_X86_DISABLE_EXIT Manali Shukla
2024-03-27  5:42 ` [PATCH v1 1/3] KVM: selftests: Add safe_halt() and cli() helpers to common code Manali Shukla
2024-03-27  5:42 ` [PATCH v1 2/3] KVM: selftests: Change __vm_create() to create a vm without in-kernel APIC Manali Shukla
2024-03-27 11:27   ` Andrew Jones
2024-03-28 11:12     ` Manali Shukla
2024-03-27  5:42 ` [PATCH v1 3/3] KVM: selftests: Add a test case for KVM_X86_DISABLE_EXITS_HLT Manali Shukla
2024-03-29 20:13   ` Muhammad Usama Anjum
2024-04-01  5:28     ` Manali Shukla
2024-04-01  6:27       ` Manali Shukla [this message]
2024-04-01  9:41       ` Muhammad Usama Anjum
2024-04-01 12:31         ` 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=52357c8d-2e1a-75c6-9f73-2da7b510b711@amd.com \
    --to=manali.shukla@amd.com \
    --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=usama.anjum@collabora.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