History

Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm

Pull kvm fixes from Paolo Bonzini: "ARM64: - Fix pKVM error path on init, making sure we do not change critical system registers as we're about to fail - Make sure that the host's vector length is at capped by a value common to all CPUs - Fix kvm_has_feat*() handling of "negative" features, as the current code is pretty broken - Promote Joey to the status of official reviewer, while James steps down -- hopefully only temporarly x86: - Fix compilation with KVM_INTEL=KVM_AMD=n - Fix disabling KVM_X86_QUIRK_SLOT_ZAP_ALL when shadow MMU is in use Selftests: - Fix compilation on non-x86 architectures" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: x86/reboot: emergency callbacks are now registered by common KVM code KVM: x86: leave kvm.ko out of the build if no vendor module is requested KVM: x86/mmu: fix KVM_X86_QUIRK_SLOT_ZAP_ALL for shadow MMU KVM: arm64: Fix kvm_has_feat*() handling of negative features KVM: selftests: Fix build on architectures other than x86_64 KVM: arm64: Another reviewer reshuffle KVM: arm64: Constrain the host to the maximum shared SVE VL with pKVM KVM: arm64: Fix __pkvm_init_vcpu cptr_el2 error path

Linus Torvalds committed 2 years ago

Commit 45632432 parents b3ce5c3 c8d430d12 files · +91 −43Browse files

Showing the changes to tools (2 of 12 files). Show all

Unified · Split

2 files
  1. tools/testing/selftests/kvm/memslot_modification_stress_test.c +2 −0
  2. tools/testing/selftests/kvm/memslot_perf_test.c +6 −0
tools/testing/selftests/kvm/memslot_modification_stress_test.c+2−0
@@ -169,12 +169,14 @@ int main(int argc, char *argv[]) · 168 unmodified lines
169169 case 'i':
170170 p.nr_iterations = atoi_positive("Number of iterations", optarg);
171171 break;
172+#ifdef __x86_64__
172173 case 'q':
173174 p.disable_slot_zap_quirk = true;
174175
175176 TEST_REQUIRE(kvm_check_cap(KVM_CAP_DISABLE_QUIRKS2) &
176177 KVM_X86_QUIRK_SLOT_ZAP_ALL);
177178 break;
179+#endif
178180 case 'h':
179181 default:
180182 help(argv[0]);
tools/testing/selftests/kvm/memslot_perf_test.c+6−0
@@ -113,7 +113,9 @@ static_assert(ATOMIC_BOOL_LOCK_FREE == 2, "atomic bool is not lockless"); · 112 unmodified lines
113113 static sem_t vcpu_ready;
114114
115115 static bool map_unmap_verify;
116+#ifdef __x86_64__
116117 static bool disable_slot_zap_quirk;
118+#endif
117119
118120 static bool verbose;
119121 #define pr_info_v(...) \
@@ -579,8 +581,10 @@ static bool test_memslot_move_prepare(struct vm_data *data, · 459 unmodified lines
579581 uint32_t guest_page_size = data->vm->page_size;
580582 uint64_t movesrcgpa, movetestgpa;
581583
584+#ifdef __x86_64__
582585 if (disable_slot_zap_quirk)
583586 vm_enable_cap(data->vm, KVM_CAP_DISABLE_QUIRKS2, KVM_X86_QUIRK_SLOT_ZAP_ALL);
587+#endif
584588
585589 movesrcgpa = vm_slot2gpa(data, data->nslots - 1);
586590
@@ -971,11 +975,13 @@ static bool parse_args(int argc, char *argv[], · 384 unmodified lines
971975 case 'd':
972976 map_unmap_verify = true;
973977 break;
978+#ifdef __x86_64__
974979 case 'q':
975980 disable_slot_zap_quirk = true;
976981 TEST_REQUIRE(kvm_check_cap(KVM_CAP_DISABLE_QUIRKS2) &
977982 KVM_X86_QUIRK_SLOT_ZAP_ALL);
978983 break;
984+#endif
979985 case 's':
980986 targs->nslots = atoi_paranoid(optarg);
981987 if (targs->nslots <= 1 && targs->nslots != -1) {