From: Sean Christopherson <seanjc@google.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
Sean Christopherson <seanjc@google.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
Kai Huang <kai.huang@intel.com>,
Rick Edgecombe <rick.p.edgecombe@intel.com>,
Yan Zhao <yan.y.zhao@intel.com>
Subject: [PATCH 3/4] Revert "KVM: selftests: Test slot move/delete with slot zap quirk enabled/disabled"
Date: Thu, 26 Sep 2024 17:16:34 -0700 [thread overview]
Message-ID: <20240927001635.501418-4-seanjc@google.com> (raw)
In-Reply-To: <20240927001635.501418-1-seanjc@google.com>
Revert set_memory_region_test's KVM_X86_QUIRK_SLOT_ZAP_ALL testcase, as
the quirk is being removed, i.e. the KVM side of things is being reverted.
This reverts commit b4ed2c67d275b85b2ab07d54f88bebd5998d61d8.
Signed-off-by: Sean Christopherson <seanjc@google.com>
---
.../selftests/kvm/set_memory_region_test.c | 29 +++++--------------
1 file changed, 8 insertions(+), 21 deletions(-)
diff --git a/tools/testing/selftests/kvm/set_memory_region_test.c b/tools/testing/selftests/kvm/set_memory_region_test.c
index a8267628e9ed..bb8002084f52 100644
--- a/tools/testing/selftests/kvm/set_memory_region_test.c
+++ b/tools/testing/selftests/kvm/set_memory_region_test.c
@@ -175,7 +175,7 @@ static void guest_code_move_memory_region(void)
GUEST_DONE();
}
-static void test_move_memory_region(bool disable_slot_zap_quirk)
+static void test_move_memory_region(void)
{
pthread_t vcpu_thread;
struct kvm_vcpu *vcpu;
@@ -184,9 +184,6 @@ static void test_move_memory_region(bool disable_slot_zap_quirk)
vm = spawn_vm(&vcpu, &vcpu_thread, guest_code_move_memory_region);
- if (disable_slot_zap_quirk)
- vm_enable_cap(vm, KVM_CAP_DISABLE_QUIRKS2, KVM_X86_QUIRK_SLOT_ZAP_ALL);
-
hva = addr_gpa2hva(vm, MEM_REGION_GPA);
/*
@@ -269,7 +266,7 @@ static void guest_code_delete_memory_region(void)
GUEST_ASSERT(0);
}
-static void test_delete_memory_region(bool disable_slot_zap_quirk)
+static void test_delete_memory_region(void)
{
pthread_t vcpu_thread;
struct kvm_vcpu *vcpu;
@@ -279,9 +276,6 @@ static void test_delete_memory_region(bool disable_slot_zap_quirk)
vm = spawn_vm(&vcpu, &vcpu_thread, guest_code_delete_memory_region);
- if (disable_slot_zap_quirk)
- vm_enable_cap(vm, KVM_CAP_DISABLE_QUIRKS2, KVM_X86_QUIRK_SLOT_ZAP_ALL);
-
/* Delete the memory region, the guest should not die. */
vm_mem_region_delete(vm, MEM_REGION_SLOT);
wait_for_vcpu();
@@ -559,10 +553,7 @@ int main(int argc, char *argv[])
{
#ifdef __x86_64__
int i, loops;
- int j, disable_slot_zap_quirk = 0;
- if (kvm_check_cap(KVM_CAP_DISABLE_QUIRKS2) & KVM_X86_QUIRK_SLOT_ZAP_ALL)
- disable_slot_zap_quirk = 1;
/*
* FIXME: the zero-memslot test fails on aarch64 and s390x because
* KVM_RUN fails with ENOEXEC or EFAULT.
@@ -588,17 +579,13 @@ int main(int argc, char *argv[])
else
loops = 10;
- for (j = 0; j <= disable_slot_zap_quirk; j++) {
- pr_info("Testing MOVE of in-use region, %d loops, slot zap quirk %s\n",
- loops, j ? "disabled" : "enabled");
- for (i = 0; i < loops; i++)
- test_move_memory_region(!!j);
+ pr_info("Testing MOVE of in-use region, %d loops\n", loops);
+ for (i = 0; i < loops; i++)
+ test_move_memory_region();
- pr_info("Testing DELETE of in-use region, %d loops, slot zap quirk %s\n",
- loops, j ? "disabled" : "enabled");
- for (i = 0; i < loops; i++)
- test_delete_memory_region(!!j);
- }
+ pr_info("Testing DELETE of in-use region, %d loops\n", loops);
+ for (i = 0; i < loops; i++)
+ test_delete_memory_region();
#endif
return 0;
--
2.46.1.824.gd892dcdcdd-goog
next prev parent reply other threads:[~2024-09-27 0:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-27 0:16 [PATCH 0/4] KVM: x86: Revert SLOT_ZAP_ALL quirk Sean Christopherson
2024-09-27 0:16 ` [PATCH 1/4] Revert "KVM: selftests: Test memslot move in memslot_perf_test with quirk disabled" Sean Christopherson
2024-09-27 0:16 ` [PATCH 2/4] Revert "KVM: selftests: Allow slot modification stress test " Sean Christopherson
2024-09-27 0:16 ` Sean Christopherson [this message]
2024-09-27 0:16 ` [PATCH 4/4] Revert "KVM: x86/mmu: Introduce a quirk to control memslot zap behavior" Sean Christopherson
2024-09-27 15:43 ` [PATCH 0/4] KVM: x86: Revert SLOT_ZAP_ALL quirk Paolo Bonzini
2024-09-27 16:40 ` Sean Christopherson
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=20240927001635.501418-4-seanjc@google.com \
--to=seanjc@google.com \
--cc=kai.huang@intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=rick.p.edgecombe@intel.com \
--cc=yan.y.zhao@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