public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: David Matlack <dmatlack@google.com>
Cc: Jason Gunthorpe <jgg@nvidia.com>, Matt Evans <mattev@meta.com>,
	Ted Logan <tedlogan@fb.com>,  Alex Williamson <alex@shazbot.org>,
	Shuah Khan <shuah@kernel.org>,
	kvm@vger.kernel.org,  linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org,  kernel test robot <lkp@intel.com>
Subject: Re: [PATCH v2] vfio: selftests: only build tests on arm64 and x86_64
Date: Tue, 28 Apr 2026 15:03:29 -0700	[thread overview]
Message-ID: <afEusUxXDpFtZvV0@google.com> (raw)
In-Reply-To: <CALzav=ecmNh6bE88oCHdmjSKK_Zpd96b84HbtmkaiDNRcotYfw@mail.gmail.com>

On Tue, Apr 28, 2026, David Matlack wrote:
> On Tue, Apr 28, 2026 at 12:52 PM Sean Christopherson <seanjc@google.com> wrote:
> >
> > On Tue, Apr 28, 2026, David Matlack wrote:
> > > On 2026-04-27 06:55 PM, Sean Christopherson wrote:
> > > > On Mon, Apr 27, 2026, Jason Gunthorpe wrote:
> > > > > Even though this is a 64 bit build.
> > > >
> > > > Heh, it's much funnier when it's happening to someone else.  :-)
> > > >
> > > > KVM selftests went through these exact pains.  I'm pretty sure these are the
> > > > relevant commits (the empty targets one may or may not apply to VFIO).
> > > >
> > > > 9af04539d474dda4984ff4909d4568e6123c8cba KVM: selftests: Override ARCH for x86_64 instead of using ARCH_DIR
> > > > 67730e6c53d70fb31618230f81c4acee9f72eaa3 KVM: selftests: Use canonical $(ARCH) paths for KVM selftests directories
> > > > 43fbd8cd389faa9760c5152b1c58e893c812953b KVM: selftests: Provide empty 'all' and 'clean' targets for unsupported ARCHs
> > >
> > > KVM selftests don't prevent 32-bit x86 builds though,
> >
> > Yes they do?  x86 is an alias for x86_64 (or vice versa), and so the i386 target
> > gets binned into the empty target provided by tools/testing/selftests/kvm/Makefile.
> > And KVM selftests most definitely don't play nice with 32-bit.
> 
> Are you sure that x86 is an alias for x86_64?

Well, I was quite sure :-)   But scripts/subarch.include disagrees:

  SUBARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \

as does attempting to build KVM selftests on a 32-bit host.

> If it is then we don't even need the __LP64__ stuff I posted.
> 
> But when I look at the top-level Makefile and imagine running make
> without setting ARCH on the command line on a 32-bit x86 host, ARCH
> will be set to SUBARCH, which will be x86.

Yep.  So the big question is, why doesn't anyone complain about KVM selftests not
building on 32-bit?  Because they most definitely don't build.

  reply	other threads:[~2026-04-28 22:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-03  1:23 [PATCH v2] vfio: selftests: only build tests on arm64 and x86_64 Ted Logan
2026-02-06 17:54 ` David Matlack
2026-02-06 22:05 ` Alex Williamson
2026-03-17 13:55 ` Matt Evans
2026-03-17 19:05   ` Ted Logan
2026-04-27 23:12   ` Jason Gunthorpe
2026-04-28  1:55     ` Sean Christopherson
2026-04-28 19:02       ` David Matlack
2026-04-28 19:52         ` Sean Christopherson
2026-04-28 20:08           ` David Matlack
2026-04-28 22:03             ` Sean Christopherson [this message]
2026-04-28 22:53               ` David Matlack
2026-04-28 22:55                 ` Jason Gunthorpe
2026-04-28 23:02                   ` David Matlack

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=afEusUxXDpFtZvV0@google.com \
    --to=seanjc@google.com \
    --cc=alex@shazbot.org \
    --cc=dmatlack@google.com \
    --cc=jgg@nvidia.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=mattev@meta.com \
    --cc=shuah@kernel.org \
    --cc=tedlogan@fb.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