[PATCH v2 0/2] KVM: selftests: Use $(SRCARCH) and share definition with top-level Makefile
Sean Christopherson
seanjc at google.com
Tue Oct 7 09:40:56 PDT 2025
On Mon, Sep 15, 2025, David Matlack wrote:
> On Thu, Jul 24, 2025 at 2:31 PM David Matlack <dmatlack at google.com> wrote:
> >
> > This series switches the KVM selftests Makefile to use $(SRCARCH)
> > instead of $(ARCH) to fix a build issue when ARCH=x86_64 is specified on
> > the command line.
> >
> > v1: https://lore.kernel.org/kvm/20250430224720.1882145-1-dmatlack@google.com/
> > - Split out the revert of commit 9af04539d474 ("KVM: selftests:
> > Override ARCH for x86_64 instead of using ARCH_DIR") from the rename
> > to SRCARCH
> >
> > David Matlack (2):
> > Revert "KVM: selftests: Override ARCH for x86_64 instead of using
> > ARCH_DIR"
> > KVM: selftests: Rename $(ARCH_DIR) to $(SRCARCH)
>
> Gentle ping. Paolo and Sean do you think this could get merged
> upstream at some point?
>
> Google's kernel build tools unconditionally set ARCH=x86_64 when
> building selftests, which causes the KVM selftests to fail to build.
I'm pretty sure we can simply override the user. Does this fix things on your
end?
diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests/kvm/Makefile
index d9fffe06d3ea..f2b223072b62 100644
--- a/tools/testing/selftests/kvm/Makefile
+++ b/tools/testing/selftests/kvm/Makefile
@@ -6,7 +6,7 @@ ARCH ?= $(SUBARCH)
ifeq ($(ARCH),$(filter $(ARCH),arm64 s390 riscv x86 x86_64 loongarch))
# Top-level selftests allows ARCH=x86_64 :-(
ifeq ($(ARCH),x86_64)
- ARCH := x86
+ override ARCH := x86
endif
include Makefile.kvm
else
More information about the linux-riscv
mailing list