From patchwork Mon Aug 26 19:01:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Christopherson X-Patchwork-Id: 13778352 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0B030C5321D for ; Mon, 26 Aug 2024 19:05:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Reply-To:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:Cc:To: From:Subject:Message-ID:References:Mime-Version:In-Reply-To:Date: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=wlfMvk8YP/kQvzhrtnMiI9Fgfb/TBne1V0LIqcoAt2M=; b=1RA74K/EJDl5eKSei6WVhRCgWC P12HHiGRPYUYNEJ2ZtyKmQkxNKkt836Mvju5wdeOeCCN8Iwre0VyisinAFKieRwc7V7HidsHSBHhH C2OG9Lg6iUd96q3+sqZ7S1ayQpYPIrTUJJuk2FrpGpp+rcNPqSbYRu1aVSLzUwNKec/uJNcgi/r2Q o37UcBYrg+W9OFBiD8J2+S0wLEq8drl2IQojPs9UXCWh/8iNvIs1TU0LpZYoxiawtSar7yaq8gHa/ OArmJQLllXxTvrOwUJxfIhvWnmdcqc1k3Hy6Knd9g6RJqIdvQ3sIS6HiTVTI4BPE/o6vgO+YaIAqK KfL7RFaw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sif1T-00000008RkO-3mzE; Mon, 26 Aug 2024 19:05:03 +0000 Received: from mail-yb1-xb4a.google.com ([2607:f8b0:4864:20::b4a]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1siey1-00000008Qfw-1gz5 for linux-arm-kernel@lists.infradead.org; Mon, 26 Aug 2024 19:01:32 +0000 Received: by mail-yb1-xb4a.google.com with SMTP id 3f1490d57ef6-e116c697904so9218431276.1 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=lists.infradead.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=T/KoBh7Ynvx+A39G1ynmAqLkTZz1CU6cmRQpzLGd0Fy2NWtBoKSpbtbMwa8ncaxw5W 6kPqvlcl71LRXaw4M9WqdGbAeyGCCSkyfbqNN2wPWe/5DWmJhQcxSTFc2qJO/ShnPDIg 9NpkD9PtK8vmWPZOB0g6m9aPNfUsHzF3ofIbleRwc0ZJJjB1cqJN+2H/nIxrDPnZYvoK aoLH+MFx8d6+/CbJVdS+kzRbVXec39YarXUE9AuOmODv+exndc5OlWZaPcQTb/igN2EV z2PUh62Y5jIM0wppYGGP+waUdSok/iJt8eiPASg9W2lGsUSEj2WJy2ij04F2y8V0zsNq Mkjg== 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=Z3Av7AbnJ+1PqkFk2AKPtB42U/xPMupWwOT1PzDMYqfYqwE3xDYX/YpoTnvkIU8wx5 HNM7p1hfvdLbojKJVd8c7qOifyIgM9jX1jRrZzdkPZ6ouTzsaHAuQXHxXd4sXInwShXP NylMreEHWdZ+nHFZ16kjldoM3y51xAVfKkacJbvZcduGHhpUBwe4+Zm07RvrLN6Ytp2j 35ZZk52yg4z3jHlY0A7SwvIZ7XcEYazp3Vuu3AF0UtsvT667UjgRPvFDefQVovx2Uarb 3NZDginFMlS9U38lJGP2AHPkoqd/rtrr7HoF+RBdHGToo/tShPqnVFFhm1OEIH3J8jhN iUMQ== X-Forwarded-Encrypted: i=1; AJvYcCWRpW8JJEL9m7IFqEhw1f0wS5m3CGullVosFlPFsA/msB/+D6LLwEJQ9axc7MznR5SFCXmLhok7/Q84k0ypejsd@lists.infradead.org X-Gm-Message-State: AOJu0YwtVo61iCom56tBrkoCBry5YmW/TGMh5I067L48H1h2FHLtOvDF d2vSuFGb34qxcyFWJRwLSf1vy/dam6Vq/6KyieGu8XGaSE07Ylwbo++NTmdeLr8onsjLxPBb8iO Tdw== 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) Date: Mon, 26 Aug 2024 12:01:16 -0700 In-Reply-To: <20240826190116.145945-1-seanjc@google.com> 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240826_120129_499337_30E983AC X-CRM114-Status: GOOD ( 10.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Sean Christopherson Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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=>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 ?= $(SUBARCH) ifeq ($(ARCH),$(filter $(ARCH),arm64 s390 riscv x86 x86_64)) # Top-level selftests allows ARCH=x86_64 :-( ifeq ($(ARCH),x86_64) - ARCH_DIR := x86 -else - ARCH_DIR := $(ARCH) + ARCH := x86 endif include Makefile.kvm else diff --git a/tools/testing/selftests/kvm/Makefile.kvm b/tools/testing/selftests/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 += steal_time SPLIT_TESTS += arch_timer SPLIT_TESTS += get-reg-list -TEST_PROGS += $(TEST_PROGS_$(ARCH_DIR)) -TEST_GEN_PROGS += $(TEST_GEN_PROGS_$(ARCH_DIR)) -TEST_GEN_PROGS_EXTENDED += $(TEST_GEN_PROGS_EXTENDED_$(ARCH_DIR)) -LIBKVM += $(LIBKVM_$(ARCH_DIR)) +TEST_PROGS += $(TEST_PROGS_$(ARCH)) +TEST_GEN_PROGS += $(TEST_GEN_PROGS_$(ARCH)) +TEST_GEN_PROGS_EXTENDED += $(TEST_GEN_PROGS_EXTENDED_$(ARCH)) +LIBKVM += $(LIBKVM_$(ARCH)) OVERRIDE_TARGETS = 1 @@ -212,14 +212,14 @@ include ../lib.mk INSTALL_HDR_PATH = $(top_srcdir)/usr LINUX_HDR_PATH = $(INSTALL_HDR_PATH)/include/ LINUX_TOOL_INCLUDE = $(top_srcdir)/tools/include -LINUX_TOOL_ARCH_INCLUDE = $(top_srcdir)/tools/arch/$(ARCH_DIR)/include +LINUX_TOOL_ARCH_INCLUDE = $(top_srcdir)/tools/arch/$(ARCH)/include CFLAGS += -Wall -Wstrict-prototypes -Wuninitialized -O2 -g -std=gnu99 \ -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$(