From nobody Fri Dec 19 15:17:00 2025 Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.201]) (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 21331198E81 for ; Mon, 26 Aug 2024 19:01:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724698889; cv=none; b=q5R6XfTjW2rDLYWQaGGufB2GGUeJJD3kjW99A6dJo0KP+J1pUDgwaoo8HnBLmsnLq/FNiLEIz2t/EtkqyQw9jLtpCgmXOBX9k25xkVzFbvaFnkivuwiGshKqfYS+IEHm5GxdUWTEFpjZ0A6cV2EZdlkQRk+0UQwIzxk+5QFkKNA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724698889; c=relaxed/simple; bh=Lk53fKPoiIBMswuBHQk1iCnTGbDOOstP2qQpL1OIsUI=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=ULOXG8mE3HpenzeoqJf7veEggrGvSLqzxq1qvcOhMWvNTnm3WkQQBAVxu+Lnk3l2z6kFZPLX4IoVd6VrPncjnj3N+XlgEdizF9HmAzKUps9pA9+Zxepr5DoDrQbIc56l0pdWWmzUMeqn3CDoNv7a0DGAa8hHTi13FFOTo4jjzJY= 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=NPhetXZS; arc=none smtp.client-ip=209.85.219.201 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="NPhetXZS" Received: by mail-yb1-f201.google.com with SMTP id 3f1490d57ef6-e164ceba5ffso7783029276.3 for ; Mon, 26 Aug 2024 12:01:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1724698887; x=1725303687; 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=wlfMvk8YP/kQvzhrtnMiI9Fgfb/TBne1V0LIqcoAt2M=; b=NPhetXZSynFxAM425vnGM2I3fircKnodtaPlREK1cFYXm8VkYZ6xIgqi/wai2M3LuC /iVK34TFwAn1DKHry+LPTWj6/EeepiqAmiBzfuG5mQo8U2uMeimA6xyiFawCMSGKh+Cp WB3aynb59QgIM7fN8cb4WbbWo9fb/DExtEykCSNJFxk5OhS7Yx/ZE8ZGtRxGmJp2jbHa fROgvXdL1QLrg21n0kKXB8AAYaTQrrp+BxMn/6elHH7z3I2OC0PC24qxkv5c4yygQ3eG 95qBBq/yh80M2UCuQ75R1e5Q9Ga9mPz5U+cfyyppvrhsYqo3JVZuTSwPz3rQ0KD5vcd/ XX7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724698887; x=1725303687; 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=wlfMvk8YP/kQvzhrtnMiI9Fgfb/TBne1V0LIqcoAt2M=; b=mLd7d7Kh24uUs9j8wijoYHjuWtcs5WbVxQZe1fPXzQ/HgDhOlpMAYDd8X71Ql23snc USp3K74k7J8jIS1XMyi9CY2B5sLOFLBq1Hr8sZa7U90Wur83H8VVXvmxQcbzzlaVAOAQ EwigqvEUwxoTAULm/0eDWJ8qPlLFYz4NDYbFzFFc6ZQJY04+sl85kss4ZL5cg4+8lMJW GKhgjONK9JpMq67tl88dVXwpUtOUOoBKnnSWFRjbXtwJtSIBviktq12qjdUY0Q5nkz83 arSRKALF2NOOfDSU2L2hkV2AE28ofRt82VhpomGVY9HKvQpqDFUR1dw9TufnJYTxkAcc EqBA== X-Forwarded-Encrypted: i=1; AJvYcCVK29/Ur4BrmQBNvUD9x/ZeqWXoCPqzXyskdV1zC/mLYqmx8jgP7FLWkwMf8OLNPNMTDY3zGyZ00Xkc4lY=@vger.kernel.org X-Gm-Message-State: AOJu0YwSb3x+mgut08O+WwjtemRRiPCNMQMP1mLhHsatOJqlo+lJG2zq 42kbquTEqzYe89JdoId9kAGq3Hr8YZVBp8VjZTSaWG6X2QSmJcSxAreogqsdYlYU8ZwvmWn1n24 vrQ== X-Google-Smtp-Source: AGHT+IEBA6sQPWzAdi8CzCDBzNF24Q7LCGUPm+EBp+JckJEMXbI5RjdBt7EA/qQscaFI/JvHbD6L23p5ztg= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a25:fc0d:0:b0:e0b:f69b:da30 with SMTP id 3f1490d57ef6-e1a2a9430d2mr615276.9.1724698887108; Mon, 26 Aug 2024 12:01:27 -0700 (PDT) Reply-To: Sean Christopherson Date: Mon, 26 Aug 2024 12:01:16 -0700 In-Reply-To: <20240826190116.145945-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: <20240826190116.145945-1-seanjc@google.com> X-Mailer: git-send-email 2.46.0.295.g3b9ea8a38a-goog Message-ID: <20240826190116.145945-4-seanjc@google.com> Subject: [PATCH 3/3] KVM: selftests: Override ARCH for x86_64 instead of using ARCH_DIR From: Sean Christopherson To: Paolo Bonzini , Marc Zyngier , Oliver Upton , Christian Borntraeger , Janosch Frank , Claudio Imbrenda , Sean Christopherson , Paul Walmsley , Palmer Dabbelt , Albert Ou Cc: kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Muhammad Usama Anjum Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Now that KVM selftests uses the kernel's canonical arch paths, directly override ARCH to 'x86' when targeting x86_64 instead of defining ARCH_DIR to redirect to appropriate paths. ARCH_DIR was originally added to deal with KVM selftests using the target triple ARCH for directories, e.g. s390x and aarch64; keeping it around just to deal with the one-off alias from x86_64=3D>x86 is unnecessary and confusing. Note, even when selftests are built from the top-level Makefile, ARCH is scoped to KVM's makefiles, i.e. overriding ARCH won't trip up some other selftests that (somehow) expects x86_64 and can't work with x86. Signed-off-by: Sean Christopherson --- tools/testing/selftests/kvm/Makefile | 4 +--- tools/testing/selftests/kvm/Makefile.kvm | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests= /kvm/Makefile index a9c1d85905d8..30b1a88aea2e 100644 --- a/tools/testing/selftests/kvm/Makefile +++ b/tools/testing/selftests/kvm/Makefile @@ -6,9 +6,7 @@ ARCH ?=3D $(SUBARCH) ifeq ($(ARCH),$(filter $(ARCH),arm64 s390 riscv x86 x86_64)) # Top-level selftests allows ARCH=3Dx86_64 :-( ifeq ($(ARCH),x86_64) - ARCH_DIR :=3D x86 -else - ARCH_DIR :=3D $(ARCH) + ARCH :=3D x86 endif include Makefile.kvm else diff --git a/tools/testing/selftests/kvm/Makefile.kvm b/tools/testing/selft= ests/kvm/Makefile.kvm index 27f4e100c6ac..c8bfd0815a57 100644 --- a/tools/testing/selftests/kvm/Makefile.kvm +++ b/tools/testing/selftests/kvm/Makefile.kvm @@ -197,10 +197,10 @@ TEST_GEN_PROGS_riscv +=3D steal_time SPLIT_TESTS +=3D arch_timer SPLIT_TESTS +=3D get-reg-list =20 -TEST_PROGS +=3D $(TEST_PROGS_$(ARCH_DIR)) -TEST_GEN_PROGS +=3D $(TEST_GEN_PROGS_$(ARCH_DIR)) -TEST_GEN_PROGS_EXTENDED +=3D $(TEST_GEN_PROGS_EXTENDED_$(ARCH_DIR)) -LIBKVM +=3D $(LIBKVM_$(ARCH_DIR)) +TEST_PROGS +=3D $(TEST_PROGS_$(ARCH)) +TEST_GEN_PROGS +=3D $(TEST_GEN_PROGS_$(ARCH)) +TEST_GEN_PROGS_EXTENDED +=3D $(TEST_GEN_PROGS_EXTENDED_$(ARCH)) +LIBKVM +=3D $(LIBKVM_$(ARCH)) =20 OVERRIDE_TARGETS =3D 1 =20 @@ -212,14 +212,14 @@ include ../lib.mk INSTALL_HDR_PATH =3D $(top_srcdir)/usr LINUX_HDR_PATH =3D $(INSTALL_HDR_PATH)/include/ LINUX_TOOL_INCLUDE =3D $(top_srcdir)/tools/include -LINUX_TOOL_ARCH_INCLUDE =3D $(top_srcdir)/tools/arch/$(ARCH_DIR)/include +LINUX_TOOL_ARCH_INCLUDE =3D $(top_srcdir)/tools/arch/$(ARCH)/include CFLAGS +=3D -Wall -Wstrict-prototypes -Wuninitialized -O2 -g -std=3Dgnu99 \ -Wno-gnu-variable-sized-type-not-at-end -MD -MP -DCONFIG_64BIT \ -fno-builtin-memcmp -fno-builtin-memcpy \ -fno-builtin-memset -fno-builtin-strnlen \ -fno-stack-protector -fno-PIE -I$(LINUX_TOOL_INCLUDE) \ -I$(LINUX_TOOL_ARCH_INCLUDE) -I$(LINUX_HDR_PATH) -Iinclude \ - -I$(