public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: David Matlack <dmatlack@google.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	 Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	 Alexandre Ghiti <alex@ghiti.fr>,
	Muhammad Usama Anjum <usama.anjum@collabora.com>,
	kvm@vger.kernel.org,  linux-riscv@lists.infradead.org
Subject: Re: [PATCH] KVM: selftests: Use $(SRCARCH) instead of $(ARCH)
Date: Wed, 7 May 2025 06:27:23 -0700	[thread overview]
Message-ID: <aBtfuy82Ze7G4vdm@google.com> (raw)
In-Reply-To: <aBOznhkrLZ0Z_3Xw@google.com>

On Thu, May 01, 2025, David Matlack wrote:
> On 2025-04-30 03:47 PM, David Matlack wrote:
> > Use $(SRCARCH) in Makefile.kvm instead of $(ARCH). The former may have
> > been set on the command line and thus make will ignore the variable
> > assignment to convert x86_64 to x86.
> > 
> > Introduce $(SRCARCH) rather than just reverting commit 9af04539d474
> > ("KVM: selftests: Override ARCH for x86_64 instead of using ARCH_DIR")
> > to keep KVM selftests consistent with the top-level kernel Makefile,
> > which uses $(SRCARCH) for the exact same purpose.
> > 
> > While here, drop the comment about the top-level selftests allowing
> > ARCH=x86_64. The kernel itself allows/expects ARCH=x86_64 so it's
> > reasonable to expect the KVM selftests to handle it as well.
> > 
> > Fixes: 9af04539d474 ("KVM: selftests: Override ARCH for x86_64 instead of using ARCH_DIR")
> > Signed-off-by: David Matlack <dmatlack@google.com>
> 
> If this approach seems reasonable I can also send another patch to share
> the definitions of $(ARCH) and $(SRCARCH) with the top-level Makefile so
> that we don't need any custom Makefile code in KVM selftests for this.
> 
> e.g.
> 
> From: David Matlack <dmatlack@google.com>
> Date: Thu, 1 May 2025 10:30:26 -0700
> Subject: [PATCH v2] kbuild: Share $(ARCH) and $(SRCARCH) with tools/
> 
> Pull out the definitions for $(ARCH), $(SRCARCH), and $(SUBARCH) into a
> scripts/arch.include and use it to reduce duplication in Makefiles under
> tools/.

Yes, please.  However, SRCARCH might be going away in the kernel's Makefile[*].
I recommend holding off on anything until that discussion is fully resolved.

[*] https://lore.kernel.org/all/cd541739-4ec5-4772-9cef-e3527fc69e26@app.fastmail.com

      reply	other threads:[~2025-05-07 13:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-30 22:47 [PATCH] KVM: selftests: Use $(SRCARCH) instead of $(ARCH) David Matlack
2025-05-01  0:34 ` David Matlack
2025-05-01 17:47 ` David Matlack
2025-05-07 13:27   ` Sean Christopherson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aBtfuy82Ze7G4vdm@google.com \
    --to=seanjc@google.com \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=dmatlack@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=pbonzini@redhat.com \
    --cc=usama.anjum@collabora.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox