Re: lib/x86_64/handlers.S:20: Error: unrecognized instruction `call route_exception'

From: Sean Christopherson
Date: Tue Jul 27 2021 - 12:07:55 EST


On Tue, Jul 27, 2021, kernel test robot wrote:
> Hi Aaron,
>
> First bad commit (maybe != root cause):
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: ff1176468d368232b684f75e82563369208bc371
> commit: 29faeb9632012d6c3fa4aa33c3d589b9ff18b206 selftests: kvm: Add exception handling to selftests
> date: 9 months ago
> config: openrisc-randconfig-s031-20210726 (attached as .config)
> compiler: or1k-linux-gcc (GCC) 10.3.0
> reproduce:
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # apt-get install sparse
> # sparse version: v0.6.3-341-g8af24329-dirty
> # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=29faeb9632012d6c3fa4aa33c3d589b9ff18b206
> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> git fetch --no-tags linus master
> git checkout 29faeb9632012d6c3fa4aa33c3d589b9ff18b206
> # save the attached .config to linux build tree
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross C=1
> CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=openrisc
> SHELL=/bin/bash -C tools/testing/selftests install

KVM's selftests don't play nice with cross-compiles for unsupported architectures.
arm64 and s390 have expilict x86_64 -> {arm64,s390} support from commit 66d69e081b52
("selftests: fix kvm relocatable native/cross builds and installs"), but for
anything else the Makefile assumes an x86_64 target.

Realistically, only test bots are going to run afoul of our laziness. Do we care
enough to fix this up properly?