From nobody Fri Nov 29 00:40:36 2024 Received: from mail-pj1-f74.google.com (mail-pj1-f74.google.com [209.85.216.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 744C942A93 for ; Fri, 27 Sep 2024 00:16:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727396205; cv=none; b=V6c7eIZTDNQqRdw2MwiJr4cjQNHXUm7H/aYSUUA+AvyUnHeCSDLvqwdDzZd3c+dlY9Vcx/nE43Zb7bs6B1OKZQKS2mNKRcEbGVj1WPiJ/9FS69UlCQx1qtZEcWkfQs6UqC7fV+++UWEiNYZ406eWLQ6UvHcEO1EDdgS8qYsyHCw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727396205; c=relaxed/simple; bh=eHthjJeKXXZNP/HJ44d3fT3ZNvSma+yqLbDWTWe268s=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=jjwA8Pp3ieiwcE0n6MZ67yauhBcY0p+cXSxWreX117D4HDBl6mEB0E6wJmc+j389Bnjb/DB1cq2Ev0Uo/FNbTYAZ+a+JTmJGF1LNqsrQjDerOw3asJoKRlTIF0JyZ84TbMRcQhnoG1pT2jmx2sI2CbakCyK39LO1hEAq1K1oGhQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=kskN3XVT; arc=none smtp.client-ip=209.85.216.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="kskN3XVT" Received: by mail-pj1-f74.google.com with SMTP id 98e67ed59e1d1-2e07e7be456so1537891a91.1 for ; Thu, 26 Sep 2024 17:16:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1727396204; x=1728001004; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:from:to:cc:subject:date:message-id:reply-to; bh=XLS/E/81Wzw3Za+L/Cr3978PALSFMwYPmSR0QYXFI1I=; b=kskN3XVTwZ5YI42rttRAtI71zyHwxzXFkml2vBwUHNtQR+0ZuOVofM3zjAFaMY0W6G a83zY2+SHA6gck1cwyahKVp1Hs2j4IjR8bgi7+UVlxs2AvVDVx/QSsHDFsw1H5PWzz5z xD0oDEffIgQXWfIiLfaJNsUivFbMt/IBnIJped+mudvyMuC2Tdfn+t6IuJa0qohorNZC ntWuo0qV6UUtJnruknDG0M7905juljbwfrGFyzQkxLiaaRliIX8rIdiTLm5wLojTXWEc 4nRE2Wdtng4Fu49Z6lwZoU/fx4uuKxtPqsqv6MkF8N6OxwUXFEACX3JeK5/tMbLGpypK YqRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727396204; x=1728001004; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=XLS/E/81Wzw3Za+L/Cr3978PALSFMwYPmSR0QYXFI1I=; b=KfOEwn+GqFn9RIkCWNpsOuaKyBMjE9NQ1vFM9PR6JJ6pKlp6leCiVJaEP/rewbmEf4 26bL+urjOYcGRuXBloWuFDXWQ73+I0zeJH/Pzgvq3Lywn1zTWIuWzdyuvYBh20WoM9m0 3vHV1Wt3UtRKzJGHpyMhhd2HgPOGbdGG8xU4b2NFpu9kQ6IFJVGilBLUr8sJlA5V0cOm kdEh1tQt0TUI3YBlFgoEH12uLI/UD3Yc1OWmOuRoJoNdFOdWmnRGfnq6jPIR3Ui9bD++ IN/eJ3jh9W8dc1JcBXgyQ9mQhrTyhhav/DfABQ1EzX9oMR8RxIcPfGLzm+wDXEdIF59m yi4Q== X-Forwarded-Encrypted: i=1; AJvYcCXcAvNHIeRNt/pxKCNVvG78sFUdc9taEb6IfY1Km0Gukjv7gfygz9z38wQqchhlP+4LjwXbG4jNSwjgPsI=@vger.kernel.org X-Gm-Message-State: AOJu0Yw6M7PaVVwQxxBM8miwkYwVd0ZRlBaAtMfTSiQzJEX02OQYxYun iW+ZiZvGQe9or8dEmIjPIj8kWQlnktd49bZRUjI8ofDlQNOND9Bgo3y2RMxXm4QW5xmqHctsSOY 4qw== X-Google-Smtp-Source: AGHT+IFe3o5RCNOX4D2Pw1PUnAH3Si2msLGWgXE9du5TEjEDFpFJ9cNI9ayHRXGA2vwPaFgiysbMMEpCIEE= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a17:90b:f07:b0:2c9:7616:dec5 with SMTP id 98e67ed59e1d1-2e0b8663061mr1914a91.2.1727396203647; Thu, 26 Sep 2024 17:16:43 -0700 (PDT) Reply-To: Sean Christopherson Date: Thu, 26 Sep 2024 17:16:34 -0700 In-Reply-To: <20240927001635.501418-1-seanjc@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240927001635.501418-1-seanjc@google.com> X-Mailer: git-send-email 2.46.1.824.gd892dcdcdd-goog Message-ID: <20240927001635.501418-4-seanjc@google.com> Subject: [PATCH 3/4] Revert "KVM: selftests: Test slot move/delete with slot zap quirk enabled/disabled" From: Sean Christopherson To: Paolo Bonzini , Sean Christopherson Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Kai Huang , Rick Edgecombe , Yan Zhao Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 --- .../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/t= esting/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(); } =20 -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_z= ap_quirk) =20 vm =3D spawn_vm(&vcpu, &vcpu_thread, guest_code_move_memory_region); =20 - if (disable_slot_zap_quirk) - vm_enable_cap(vm, KVM_CAP_DISABLE_QUIRKS2, KVM_X86_QUIRK_SLOT_ZAP_ALL); - hva =3D addr_gpa2hva(vm, MEM_REGION_GPA); =20 /* @@ -269,7 +266,7 @@ static void guest_code_delete_memory_region(void) GUEST_ASSERT(0); } =20 -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) =20 vm =3D spawn_vm(&vcpu, &vcpu_thread, guest_code_delete_memory_region); =20 - 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 =3D 0; =20 - if (kvm_check_cap(KVM_CAP_DISABLE_QUIRKS2) & KVM_X86_QUIRK_SLOT_ZAP_ALL) - disable_slot_zap_quirk =3D 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 =3D 10; =20 - for (j =3D 0; j <=3D 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 =3D 0; i < loops; i++) - test_move_memory_region(!!j); + pr_info("Testing MOVE of in-use region, %d loops\n", loops); + for (i =3D 0; i < loops; i++) + test_move_memory_region(); =20 - pr_info("Testing DELETE of in-use region, %d loops, slot zap quirk %s\n", - loops, j ? "disabled" : "enabled"); - for (i =3D 0; i < loops; i++) - test_delete_memory_region(!!j); - } + pr_info("Testing DELETE of in-use region, %d loops\n", loops); + for (i =3D 0; i < loops; i++) + test_delete_memory_region(); #endif =20 return 0; --=20 2.46.1.824.gd892dcdcdd-goog