@@ -175,7 +175,7 @@ static void guest_code_move_memory_region(void)
175175 GUEST_DONE ();
176176}
177177
178- static void test_move_memory_region (bool disable_slot_zap_quirk )
178+ static void test_move_memory_region (void )
179179{
180180 pthread_t vcpu_thread ;
181181 struct kvm_vcpu * vcpu ;
@@ -184,9 +184,6 @@ static void test_move_memory_region(bool disable_slot_zap_quirk)
184184
185185 vm = spawn_vm (& vcpu , & vcpu_thread , guest_code_move_memory_region );
186186
187- if (disable_slot_zap_quirk )
188- vm_enable_cap (vm , KVM_CAP_DISABLE_QUIRKS2 , KVM_X86_QUIRK_SLOT_ZAP_ALL );
189-
190187 hva = addr_gpa2hva (vm , MEM_REGION_GPA );
191188
192189 /*
@@ -269,7 +266,7 @@ static void guest_code_delete_memory_region(void)
269266 GUEST_ASSERT (0 );
270267}
271268
272- static void test_delete_memory_region (bool disable_slot_zap_quirk )
269+ static void test_delete_memory_region (void )
273270{
274271 pthread_t vcpu_thread ;
275272 struct kvm_vcpu * vcpu ;
@@ -279,9 +276,6 @@ static void test_delete_memory_region(bool disable_slot_zap_quirk)
279276
280277 vm = spawn_vm (& vcpu , & vcpu_thread , guest_code_delete_memory_region );
281278
282- if (disable_slot_zap_quirk )
283- vm_enable_cap (vm , KVM_CAP_DISABLE_QUIRKS2 , KVM_X86_QUIRK_SLOT_ZAP_ALL );
284-
285279 /* Delete the memory region, the guest should not die. */
286280 vm_mem_region_delete (vm , MEM_REGION_SLOT );
287281 wait_for_vcpu ();
@@ -559,10 +553,7 @@ int main(int argc, char *argv[])
559553{
560554#ifdef __x86_64__
561555 int i , loops ;
562- int j , disable_slot_zap_quirk = 0 ;
563556
564- if (kvm_check_cap (KVM_CAP_DISABLE_QUIRKS2 ) & KVM_X86_QUIRK_SLOT_ZAP_ALL )
565- disable_slot_zap_quirk = 1 ;
566557 /*
567558 * FIXME: the zero-memslot test fails on aarch64 and s390x because
568559 * KVM_RUN fails with ENOEXEC or EFAULT.
@@ -588,17 +579,13 @@ int main(int argc, char *argv[])
588579 else
589580 loops = 10 ;
590581
591- for (j = 0 ; j <= disable_slot_zap_quirk ; j ++ ) {
592- pr_info ("Testing MOVE of in-use region, %d loops, slot zap quirk %s\n" ,
593- loops , j ? "disabled" : "enabled" );
594- for (i = 0 ; i < loops ; i ++ )
595- test_move_memory_region (!!j );
582+ pr_info ("Testing MOVE of in-use region, %d loops\n" , loops );
583+ for (i = 0 ; i < loops ; i ++ )
584+ test_move_memory_region ();
596585
597- pr_info ("Testing DELETE of in-use region, %d loops, slot zap quirk %s\n" ,
598- loops , j ? "disabled" : "enabled" );
599- for (i = 0 ; i < loops ; i ++ )
600- test_delete_memory_region (!!j );
601- }
586+ pr_info ("Testing DELETE of in-use region, %d loops\n" , loops );
587+ for (i = 0 ; i < loops ; i ++ )
588+ test_delete_memory_region ();
602589#endif
603590
604591 return 0 ;
0 commit comments