From patchwork Thu Nov 28 00:55:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Christopherson X-Patchwork-Id: 13887652 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 B1546D6D255 for ; Thu, 28 Nov 2024 02:22:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Reply-To:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:Message-ID :References:Mime-Version:In-Reply-To:Date:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=jtKwRHV5qxAEYSxcyJNJ2D7noOlsnRI3cy+0LP+UohA=; b=cMJ5s3CfrdEFWJ FnqA1c4XhLHKsG0v0pznRbeBm8NQQ3MK5o7S+GsezVmg4aOwofwOHFtYlSDhHuH+6rMa/at4hqdYe lvPWCqMRiz8SkE8sbl2NJNeiAuwkNNfWDkTnOdEV7XX9bHxeXLP+FIl9r89MjdgFDxSm6InAmuLX6 Jy2C7r+6i5mwuz3Ld72QSk6ULF8xDwxhaqdSr5Q36juLrZ9Sc73JyS9tY9Pvx4WLWnNN2vcNUG9vm nZJkc+p8TjUfzScIlkt4LvpK2iqOFL9ee/VzyEJnaQkS1fPgG8PmA/jy0xTKuv+jauOzwT3UTgNG4 jtho83sKdwhe4m1T5vYA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tGUAN-0000000EWmM-3NHQ; Thu, 28 Nov 2024 02:22:03 +0000 Received: from mail-pj1-x1049.google.com ([2607:f8b0:4864:20::1049]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tGSpP-0000000EM5y-0Twk for linux-riscv@lists.infradead.org; Thu, 28 Nov 2024 00:56:21 +0000 Received: by mail-pj1-x1049.google.com with SMTP id 98e67ed59e1d1-2ea1c9416fcso251317a91.1 for ; Wed, 27 Nov 2024 16:56:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1732755378; x=1733360178; 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=SIrOHFdLU07PpaXHI/YgxGMl42ASMs52y5wmlleZ1JI=; b=M6vk/+wtzRQ9mJsAu5jModq/HTmYYPJ3NKHx2tQ9fA0ScmnfgodZXVzRsWeWQngD4o pWAn0D6OylHcr7gaqzykIH4LFCLjfHy/FlMpKcf30+CJbTa4E3eZJr+SE1OSpUupaZtn /QioM8hhDwpOLRmx+9yGyzWcJe6PqCYYqBy9sY+yoTwX+rGHXaB8TUwezlJORM+MjKde DfZU+usdfqYsFFvLvATr8kSy7r4CehguZUkfajr3l5zhgqiKIeT56npspwoXmYHJSH7Z Lm/LNTaEUta7bA5TxgP8P9xdFQSLtxmdob2BhlK126os/my3j21G/hMUcPZFuiycaHH7 QxwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732755378; x=1733360178; 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=SIrOHFdLU07PpaXHI/YgxGMl42ASMs52y5wmlleZ1JI=; b=T7LbrtCUiQgCo8VAkeJda4Tvaor9LMFEE6FmoKwcXvrILhl0QYxizsyGViHKIXtjya c/0Oma3NTn9WdUo2cUCQ1wW7c0WmVv395zHqD079XvUOxDusUVKBRKMyKPOf8GLBBs8s XmO+iv739/O2XG9JPEbsN3CTWQQVU4YI4t2d/Po+1G9YgbJiveu+Gdu32DSGslCn7Ifl 651Zhuecw8D3ppXKzaHGUrNQWLZzp2kUjbHFAJ3VZEFPWY9cmsBIYx5mUxTFnJLqVT8B eP6QSsT/Z/793ok1EJES2vBr0dTnAbiduCZkFDPKht+64fG4oDuZLah63J453psX7Ovh X4Rw== X-Forwarded-Encrypted: i=1; AJvYcCWZHrR59LZx8KVsCWJGXOZEBBi586Vw3FRWTwDDZC0gvjOPq+PGqMqJdX/q2HpOqWpUF2hAFGDAs6gfpA==@lists.infradead.org X-Gm-Message-State: AOJu0YwvgntN50LkskyN3+NVT2wOTeJMlpavsye2mutt8N/RRuPaSX4k 7JH1sa2UojvVkyR2MKpCC82aVzM6nEO5H0QNdxGKbk/Bg89gTe0Iv8hEtDpVOx/55//qWNs4uHs KRw== X-Google-Smtp-Source: AGHT+IEWNoqxkKJEuSCYYZMRl85uBIjfdRzypvum78dwg9LOBi3REl5p9HlxVwSIxD2wnWKazGYBZqWzZwk= X-Received: from pjbst14.prod.google.com ([2002:a17:90b:1fce:b0:2ea:9d23:79a0]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90a:9f93:b0:2ea:5658:9ed6 with SMTP id 98e67ed59e1d1-2ee25b38db4mr2121026a91.12.1732755377809; Wed, 27 Nov 2024 16:56:17 -0800 (PST) Date: Wed, 27 Nov 2024 16:55:47 -0800 In-Reply-To: <20241128005547.4077116-1-seanjc@google.com> Mime-Version: 1.0 References: <20241128005547.4077116-1-seanjc@google.com> X-Mailer: git-send-email 2.47.0.338.g60cca15819-goog Message-ID: <20241128005547.4077116-17-seanjc@google.com> Subject: [PATCH v4 16/16] KVM: selftests: Override ARCH for x86_64 instead of using ARCH_DIR From: Sean Christopherson To: Marc Zyngier , Oliver Upton , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Paolo Bonzini , Christian Borntraeger , Janosch Frank , Claudio Imbrenda , Sean Christopherson Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Andrew Jones , James Houghton , Muhammad Usama Anjum X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241127_165619_158697_48031980 X-CRM114-Status: UNSURE ( 7.95 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@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-riscv" Errors-To: linux-riscv-bounces+linux-riscv=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 Reviewed-by: Muhammad Usama Anjum --- 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 9bc2eba1af1c..20af35a91d6f 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 9888dd6bb483..4277b983cace 100644 --- a/tools/testing/selftests/kvm/Makefile.kvm +++ b/tools/testing/selftests/kvm/Makefile.kvm @@ -207,10 +207,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 @@ -222,14 +222,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 -fno-strict-aliasing \ -I$(LINUX_TOOL_INCLUDE) -I$(LINUX_TOOL_ARCH_INCLUDE) \ - -I$(LINUX_HDR_PATH) -Iinclude -I$(