linux/arch/mips/kvm
Huacai Chen 3d9fdc252b KVM: MIPS: Fix build errors for 32bit kernel
Commit dc6d95b153 ("KVM: MIPS: Add more MMIO load/store
instructions emulation") introduced some 64bit load/store instructions
emulation which are unavailable on 32bit platform, and it causes build
errors:

arch/mips/kvm/emulate.c: In function 'kvm_mips_emulate_store':
arch/mips/kvm/emulate.c:1734:6: error: right shift count >= width of type [-Werror]
      ((vcpu->arch.gprs[rt] >> 56) & 0xff);
      ^
arch/mips/kvm/emulate.c:1738:6: error: right shift count >= width of type [-Werror]
      ((vcpu->arch.gprs[rt] >> 48) & 0xffff);
      ^
arch/mips/kvm/emulate.c:1742:6: error: right shift count >= width of type [-Werror]
      ((vcpu->arch.gprs[rt] >> 40) & 0xffffff);
      ^
arch/mips/kvm/emulate.c:1746:6: error: right shift count >= width of type [-Werror]
      ((vcpu->arch.gprs[rt] >> 32) & 0xffffffff);
      ^
arch/mips/kvm/emulate.c:1796:6: error: left shift count >= width of type [-Werror]
      (vcpu->arch.gprs[rt] << 32);
      ^
arch/mips/kvm/emulate.c:1800:6: error: left shift count >= width of type [-Werror]
      (vcpu->arch.gprs[rt] << 40);
      ^
arch/mips/kvm/emulate.c:1804:6: error: left shift count >= width of type [-Werror]
      (vcpu->arch.gprs[rt] << 48);
      ^
arch/mips/kvm/emulate.c:1808:6: error: left shift count >= width of type [-Werror]
      (vcpu->arch.gprs[rt] << 56);
      ^
cc1: all warnings being treated as errors
make[3]: *** [arch/mips/kvm/emulate.o] Error 1

So, use #if defined(CONFIG_64BIT) && defined(CONFIG_KVM_MIPS_VZ) to
guard the 64bit load/store instructions emulation.

Reported-by: kernel test robot <lkp@intel.com>
Fixes: dc6d95b153 ("KVM: MIPS: Add more MMIO load/store instructions emulation")
Signed-off-by: Huacai Chen <chenhc@lemote.com>
Message-Id: <1594365797-536-1-git-send-email-chenhc@lemote.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-07-10 06:15:38 -04:00
..
00README.txt
callback.c MIPS: KVM: Convert EXPORT_SYMBOL to _GPL 2016-01-24 03:13:24 +01:00
commpage.c mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
commpage.h MIPS: KVM: Rename files to remove the prefix "kvm_" and "kvm_mips_" 2014-06-30 16:52:03 +02:00
dyntrans.c mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
emulate.c KVM: MIPS: Fix build errors for 32bit kernel 2020-07-10 06:15:38 -04:00
entry.c KVM: MIPS: Use lddir/ldpte instructions to lookup gpa_mm.pgd 2020-06-04 13:48:55 -04:00
fpu.S MIPS: KVM: Fix fpu.S misassembly with r6 2016-07-05 16:09:11 +02:00
hypcall.c KVM: MIPS: Implement HYPCALL emulation 2017-03-28 14:53:33 +01:00
interrupt.c KVM: MIPS: Add more types of virtual interrupts 2020-06-04 13:49:13 -04:00
interrupt.h KVM: MIPS: Add more types of virtual interrupts 2020-06-04 13:49:13 -04:00
Kconfig Kbuild updates for v5.8 (2nd) 2020-06-13 13:29:16 -07:00
loongson_ipi.c KVM: MIPS: Add Loongson-3 Virtual IPI interrupt support 2020-06-04 13:50:39 -04:00
Makefile KVM: MIPS: Add Loongson-3 Virtual IPI interrupt support 2020-06-04 13:50:39 -04:00
mips.c KVM: MIPS: Fix a build error for !CPU_LOONGSON64 2020-06-15 05:24:30 -04:00
mmu.c mm: consolidate pte_index() and pte_offset_*() definitions 2020-06-09 09:39:14 -07:00
msa.S MIPS: KVM: Add base guest MSA support 2015-03-27 21:25:19 +00:00
stats.c MIPS: KVM: Clean up kvm_exit trace event 2016-06-14 11:16:23 +02:00
tlb.c MIPS: 2020-06-12 11:05:52 -07:00
trace.h KVM: MIPS/VZ: Trace guest mode changes 2017-03-28 14:54:00 +01:00
trap_emul.c MIPS: 2020-06-12 11:05:52 -07:00
vz.c KVM: MIPS: Enable KVM support for Loongson-3 2020-06-04 13:51:53 -04:00