mirror_ubuntu-kernels/arch/mips/include/asm
Sean Christopherson 1cfc1c7bf5 KVM: MIPS: Hardcode callbacks to hardware virtualization extensions
Now that KVM no longer supports trap-and-emulate (see commit 45c7e8af4a
"MIPS: Remove KVM_TE support"), hardcode the MIPS callbacks to the
virtualization callbacks.

Harcoding the callbacks eliminates the technically-unnecessary check on
non-NULL kvm_mips_callbacks in kvm_arch_init().  MIPS has never supported
multiple in-tree modules, i.e. barring an out-of-tree module, where
copying and renaming kvm.ko counts as "out-of-tree", KVM could never
encounter a non-NULL set of callbacks during module init.

The callback check is also subtly broken, as it is not thread safe,
i.e. if there were multiple modules, loading both concurrently would
create a race between checking and setting kvm_mips_callbacks.

Given that out-of-tree shenanigans are not the kernel's responsibility,
hardcode the callbacks to simplify the code.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20221130230934.1014142-22-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-12-29 15:41:12 -05:00
..
dec DEC: Limit PMAX memory probing to R3k systems 2022-03-07 13:10:44 +01:00
fw MIPS: pic32: treat port as signed integer 2022-11-11 15:53:58 +01:00
ip32
mach-ar7 MIPS: AR7: remove orphan declarations from arch/mips/include/asm/mach-ar7/ar7.h 2022-09-19 16:37:27 +02:00
mach-ath25 MIPS: Remove TX39XX support 2022-03-01 10:07:22 +01:00
mach-ath79 MIPS: Remove TX39XX support 2022-03-01 10:07:22 +01:00
mach-au1x00 MIPS: Remove TX39XX support 2022-03-01 10:07:22 +01:00
mach-bcm47xx MIPS: BCM47XX: Add support for Netgear WNR3500L v2 2022-07-15 14:22:47 +02:00
mach-bcm63xx PCI: Add defines for normal and subtractive PCI bridges 2022-02-17 15:29:35 -06:00
mach-bmips MIPS: cleanup fixup_bigphys_addr handling 2020-04-19 16:09:44 +02:00
mach-cavium-octeon MIPS: Remove TX39XX support 2022-03-01 10:07:22 +01:00
mach-cobalt MIPS: Remove TX39XX support 2022-03-01 10:07:22 +01:00
mach-db1x00
mach-dec MIPS: Remove TX39XX support 2022-03-01 10:07:22 +01:00
mach-generic MIPS: Remove KVM_GUEST support 2021-03-10 15:18:40 +01:00
mach-ingenic MIPS: Remove TX39XX support 2022-03-01 10:07:22 +01:00
mach-ip22 MIPS: Remove mach-*/war.h 2020-09-07 22:25:27 +02:00
mach-ip27 MIPS: IP27: Remove incorrect `cpu_has_fpu' override 2022-05-04 22:23:14 +02:00
mach-ip28 MIPS: SGI-IP28: disable use of ll/sc in kernel 2020-10-08 10:33:27 +02:00
mach-ip30 MIPS: IP30: Remove incorrect `cpu_has_fpu' override 2022-05-04 22:23:18 +02:00
mach-ip32 MIPS: Remove mach-*/war.h 2020-09-07 22:25:27 +02:00
mach-jazz mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
mach-lantiq MIPS: Remove TX39XX support 2022-03-01 10:07:22 +01:00
mach-loongson2ef MIPS: Remove TX39XX support 2022-03-01 10:07:22 +01:00
mach-loongson32 MIPS: Loongson{2ef, 32, 64} convert to generic fw cmdline 2019-11-11 10:44:56 -08:00
mach-loongson64 irqchip/loongson-liointc: Add ACPI init support 2022-07-20 12:09:21 +01:00
mach-malta MIPS: malta: remove mach-malta/malta-dtshim.h header file 2020-09-21 22:16:47 +02:00
mach-n64 mips: Add N64 machine type 2021-01-22 11:40:00 +01:00
mach-pic32 MIPS: Add header files reference with path prefix 2020-03-19 13:12:27 +01:00
mach-ralink mips: ralink: mt7621: define MT7621_SYSC_BASE with __iomem 2022-12-01 13:32:42 +01:00
mach-rc32434 MIPS: rb532: move GPIOD definition into C-files 2022-03-30 20:26:26 +02:00
mach-rm MIPS: Remove mach-*/war.h 2020-09-07 22:25:27 +02:00
mach-sibyte MIPS: Remove mach-*/war.h 2020-09-07 22:25:27 +02:00
mach-tx49xx MIPS: TXX9: Remove rbtx4939 board support 2022-01-02 14:10:40 +01:00
mips-boards MIPS: launch.h: add include guard to prevent build errors 2021-05-25 15:18:59 +02:00
octeon staging: octeon: cvmx_ptr_to_phys() should return physaddr_t 2022-11-02 08:21:49 +01:00
pci MIPS: PCI: Support mapping of INTB/C/D for pci-xtalk-bridge 2020-01-09 15:30:53 -08:00
sgi MIPS: SGI-IP30: Move irq bits to better header files 2020-09-21 22:15:49 +02:00
sibyte MIPS: remove orphan sb1250_time_init() declaration 2022-09-24 11:46:58 +02:00
sn MIPS: remove define-only GDA_MAGIC, previously magic number 2022-09-24 14:17:18 +02:00
txx9 MIPS: Remove TX39XX support 2022-03-01 10:07:22 +01:00
vdso MIPS: vdso: Invalid GIC access through VDSO 2021-07-09 15:29:06 +02:00
xtalk MIPS: SGI-IP27: use generic PCI driver 2019-05-09 16:39:27 -07:00
abi.h
addrspace.h MIPS: Remove unused R8000 CPU support 2019-07-23 14:33:51 -07:00
amon.h
arch_hweight.h
asm-eva.h MIPS: Fix typo for user_ld macro definition 2020-04-16 17:30:16 +02:00
asm-offsets.h
asm-prototypes.h MIPS: Restore symbol versions for copy_page_cpu and clear_page_cpu 2022-12-01 11:46:05 +01:00
asm.h MIPS: Fix build error due to PTR used in more places 2022-01-27 09:04:19 +01:00
asmmacro-32.h
asmmacro-64.h
asmmacro.h MIPS: fix local_irq_{disable,enable} in asmmacro.h 2021-03-24 10:48:55 +01:00
atomic.h MIPS: retire "asm/llsc.h" 2022-01-05 11:16:35 +01:00
barrier.h MIPS: barrier: Make __smp_mb__before_atomic() a no-op for Loongson3 2019-10-07 09:43:08 -07:00
bcache.h
bitops.h bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
bitrev.h
bmips-spaces.h
bmips.h MIPS: bmips: mark exception vectors as char arrays 2019-10-23 21:07:28 -07:00
bootinfo.h MIPS: Ingenic: Add system type for new Ingenic SoCs. 2021-07-19 13:16:42 +02:00
branch.h MIPS: Fix the declaration conflict of mm_isBranchInstr() 2020-04-24 18:17:44 +02:00
break.h
bug.h
bugs.h MIPS: r4k-bugs64: Limit R4k bug checks to affected systems 2019-10-07 09:38:53 -07:00
cache.h treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
cacheflush.h Add linux/cacheflush.h 2021-11-17 10:36:15 -05:00
cacheops.h MIPS: Rename the "Fill" cache ops to avoid build failure 2020-04-26 15:40:50 +02:00
cdmm.h
cevt-r4k.h
checksum.h MIPS: Rewrite `csum_tcpudp_nofold' in plain C 2022-05-23 11:29:59 +02:00
clocksource.h mips: Introduce asm/vdso/clocksource.h 2020-03-21 15:23:55 +01:00
cmp.h
cmpxchg.h MIPS: retire "asm/llsc.h" 2022-01-05 11:16:35 +01:00
compat-signal.h
compat.h asm-generic: compat: Cleanup duplicate definitions 2022-04-26 13:35:54 -07:00
compiler.h MIPS: remove GCC < 4.9 support 2020-11-11 23:49:22 +01:00
cop2.h MIPS: Remove NETLOGIC support 2021-10-24 17:24:47 +02:00
cpu-features.h MIPS: adding a safety check for cpu_has_fpu 2022-05-04 22:26:02 +02:00
cpu-info.h MIPS: emulate CPUCFG instruction on older Loongson64 cores 2020-05-24 09:26:55 +02:00
cpu-type.h MIPS: Remove VR41xx support 2022-07-14 11:52:29 +02:00
cpu.h MIPS: Remove VR41xx support 2022-07-14 11:52:29 +02:00
cpufeature.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
debug.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
delay.h
div64.h MIPS: Avoid handcoded DIVU in `__div64_32' altogether 2021-04-23 13:40:31 +02:00
dma-direct.h dma-direct: rename and cleanup __phys_to_dma 2020-09-11 09:14:43 +02:00
dma-mapping.h dma-mapping: add a kconfig symbol for arch_setup_dma_ops availability 2019-02-13 19:12:33 +01:00
dma.h PCI: Move isa_dma_bridge_buggy out of asm/dma.h 2022-07-22 17:24:47 -05:00
dmi.h MIPS: Add support for Desktop Management Interface (DMI) 2020-03-23 15:44:05 +01:00
ds1287.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 1 2019-05-21 11:28:39 +02:00
dsemul.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
dsp.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
edac.h MIPS: Avoid using .set mips0 to restore ISA 2018-11-09 10:23:19 -08:00
elf.h mips compat: switch to compat_binfmt_elf.c 2021-01-06 08:42:49 -05:00
elfcore-compat.h mips compat: switch to compat_binfmt_elf.c 2021-01-06 08:42:49 -05:00
errno.h
eva.h
exec.h
extable.h
fb.h
fixmap.h mips/mm/highmem: Switch to generic kmap atomic 2020-11-06 23:14:56 +01:00
floppy.h
fpregdef.h
fpu_emulator.h MIPS: Fix the declaration conflict of mm_isBranchInstr() 2020-04-24 18:17:44 +02:00
fpu.h MIPS: Fix unreachable code issue 2021-07-13 15:08:15 -05:00
ftrace.h MIPS: Fix build error due to PTR used in more places 2022-01-27 09:04:19 +01:00
futex.h MIPS: remove asm/war.h 2022-02-22 09:35:49 +01:00
ginvt.h MIPS: Avoid macro redefinitions 2021-09-23 11:23:35 +02:00
gio_device.h MIPS: ip22-gio: Make gio_match_device() static 2020-01-13 10:55:40 -08:00
gt64120.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 182 2019-05-30 11:29:20 -07:00
hardirq.h
hazards.h MIPS: Remove NETLOGIC support 2021-10-24 17:24:47 +02:00
highmem.h MIPS: Fix PKMAP with 32-bit MIPS huge page support 2021-06-30 14:41:32 +02:00
hpet.h
hugetlb.h mm: change huge_ptep_clear_flush() to return the original pte 2022-05-13 16:48:55 -07:00
hw_irq.h
i8259.h irqchip: Add driver for Loongson-3 HyperTransport PIC controller 2020-03-25 10:56:43 +01:00
ide.h
idle.h MIPS: idle: Add prototype for function check_wait 2020-09-27 13:00:45 +02:00
inst.h MIPS: Make definitions of MIPSInst_FMA_{FUNC,FMTM} consistent with MIPS64 manual 2021-01-22 11:45:52 +01:00
io.h added support for Netgear WNR3500L v2 2022-08-06 16:47:19 -07:00
irq_cpu.h MIPS: Kill RM7K & RM9K IRQ Code 2021-01-04 11:37:27 +01:00
irq_gt641xx.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 1 2019-05-21 11:28:39 +02:00
irq_regs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
irq.h MIPS: IRQ: remove orphan allocate_irqno() declaration 2022-09-24 11:47:18 +02:00
irqflags.h mips: Implement arch_irqs_disabled() 2020-08-26 12:41:55 +02:00
isa-rev.h
isadep.h MIPS: Remove TX39XX support 2022-03-01 10:07:22 +01:00
jazz.h
jazzdma.h MIPS/jazzdma: remove the unused vdma_remap function 2020-09-11 08:13:49 +02:00
jump_label.h jump_label: make initial NOP patching the special case 2022-06-24 09:48:55 +02:00
Kbuild mips: syscalls: switch to generic syscalltbl.sh 2021-03-10 15:19:14 +01:00
kdebug.h
kexec.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 230 2019-06-19 17:09:06 +02:00
kgdb.h mips: kgdb: adjust the comment to the actual ifdef condition 2021-12-16 15:47:58 +01:00
kprobes.h mm, kprobes: generalize and rename notify_page_fault() as kprobe_page_fault() 2019-07-16 19:23:22 -07:00
kvm_host.h KVM: MIPS: Hardcode callbacks to hardware virtualization extensions 2022-12-29 15:41:12 -05:00
kvm_types.h KVM: MIPS: Use common KVM implementation of MMU memory caches 2020-07-09 13:29:44 -04:00
linkage.h
local.h MIPS: Remove duplicated include in local.h 2022-01-09 15:40:18 +01:00
maar.h mips: MAAR: Add XPA mode support 2020-05-19 17:39:32 +02:00
machine.h treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
mc146818-time.h MIPS: Convert read_persistent_clock() to read_persistent_clock64() 2018-05-14 23:58:23 +01:00
mc146818rtc.h
mips_mt.h
mips-cm.h mips: cm: Convert to bitfield API to fix out-of-bounds access 2021-11-02 10:53:52 +01:00
mips-cpc.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
mips-cps.h MIPS: CPS: Use bitfield helpers 2021-11-29 12:43:06 +01:00
mips-gic.h Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-06-29 19:36:53 +08:00
mips-r2-to-r6-emul.h
mipsmtregs.h MIPS: remove asm/war.h 2022-02-22 09:35:49 +01:00
mipsprom.h
mipsregs.h MIPS: Remove VR41xx support 2022-07-14 11:52:29 +02:00
mmiowb.h mips/mmiowb: Add unconditional mmiowb() to arch_spin_unlock() 2019-04-08 12:00:28 +01:00
mmu_context.h mips: use asm-generic/mmu_context.h for no-op implementations 2020-10-27 16:02:36 +01:00
mmu.h MIPS: MemoryMapID (MMID) Support 2019-02-04 10:56:41 -08:00
mmzone.h mm: replace CONFIG_NEED_MULTIPLE_NODES with CONFIG_NUMA 2021-06-29 10:53:55 -07:00
module.h mips: Add MIPS Warrior P5600 support 2020-05-22 09:10:53 +02:00
msa.h MIPS: Avoid macro redefinitions 2021-09-23 11:23:35 +02:00
msc01_ic.h
paccess.h
page.h mm: replace CONFIG_NEED_MULTIPLE_NODES with CONFIG_NUMA 2021-06-29 10:53:55 -07:00
pci.h PCI: Remove pci_get_legacy_ide_irq() and asm-generic/pci.h 2022-07-22 17:23:45 -05:00
perf_event.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
pgalloc.h MIPS&LoongArch&NIOS2: adjust prototypes of p?d_init() 2022-12-11 18:12:11 -08:00
pgtable-32.h added support for Netgear WNR3500L v2 2022-08-06 16:47:19 -07:00
pgtable-64.h MIPS&LoongArch&NIOS2: adjust prototypes of p?d_init() 2022-12-11 18:12:11 -08:00
pgtable-bits.h MIPS: cpu-probe: Set Ingenic's writecombine to _CACHE_CACHABLE_WA 2020-09-18 16:26:36 +02:00
pgtable.h Merge branch 'mm-hotfixes-stable' into mm-stable 2022-11-30 14:58:42 -08:00
pm-cps.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
pm.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
prefetch.h
processor.h kernel: exit: cleanup release_thread() 2022-09-11 21:55:07 -07:00
prom.h MIPS: Fix wrong comments in asm/prom.h 2022-03-14 15:09:27 +01:00
ptrace.h Revert "MIPS: Add basic support for ptrace single step" 2021-02-18 11:57:44 +01:00
r4k-timer.h MIPS: Correct the header guard of r4k-timer.h 2020-09-18 15:29:00 +02:00
r4kcache.h MIPS: Fix build error due to PTR used in more places 2022-01-27 09:04:19 +01:00
reboot.h
reg.h
regdef.h
rtlx.h
seccomp.h seccomp: Use -1 marker for end of mode 1 syscall list 2020-07-10 16:01:52 -07:00
setup.h MIPS: fix fortify panic when copying asm exception handlers 2022-03-07 13:09:28 +01:00
sgialib.h MIPS: arc: use function argument for passing argc/argv to prom_init_cmdline 2019-10-23 21:10:34 -07:00
sgiarcs.h MIPS: fw: arc: use call_o32 to call ARC prom from 64bit kernel 2019-10-09 14:55:51 -07:00
shmparam.h
sigcontext.h
signal.h
sim.h MIPS: Remove nabi_no_regargs 2018-08-01 13:20:15 -07:00
smp-cps.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
smp-ops.h MIPS: only register MT SMP ops if MT is supported 2021-12-21 13:51:39 +01:00
smp.h MIPS: arch_send_call_function_single_ipi() calling conventions change 2020-04-24 18:27:51 +02:00
sni.h MIPS: remove orphan sni_cpu_time_init() declaration 2022-09-19 16:36:55 +02:00
socket.h
sparsemem.h
spinlock_types.h
spinlock.h locking/arch: Move qrwlock.h include after qspinlock.h 2021-02-11 07:59:54 -05:00
spram.h MIPS: asm: spram: remove unneeded semicolon 2021-01-27 21:50:22 +01:00
stackframe.h MIPS: Remove TX39XX support 2022-03-01 10:07:22 +01:00
stackprotector.h stackprotector: actually use get_random_canary() 2022-11-18 02:18:10 +01:00
stacktrace.h
string.h MIPS: Drop 32-bit asm string functions 2019-10-09 12:48:05 -07:00
switch_to.h MIPS: context switch: Use save/restore instead of set/clear for Status.CU2 2020-09-21 22:14:47 +02:00
sync.h MIPS: cavium_octeon: Fix syncw generation. 2020-02-15 12:44:03 -08:00
syscall.h MIPS/ptrace: Update mips_get_syscall_arg's return type 2019-08-11 21:44:30 -07:00
thread_info.h MIPS: Only use current_stack_pointer on GCC 2022-03-14 15:02:53 +01:00
time.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
timex.h mips: use fallback for random_get_entropy() instead of just c0 random 2022-05-13 23:59:23 +02:00
tlb.h arch/tlb: Clean up simple architectures 2019-04-03 10:32:54 +02:00
tlbdebug.h
tlbex.h MIPS: Consistently declare TLB functions 2018-08-10 17:27:53 -07:00
tlbflush.h MIPS: mm: Remove local_flush_tlb_mm() 2019-02-04 10:56:24 -08:00
tlbmisc.h
topology.h
traps.h MIPS: Allow modules to set board_be_handler 2021-11-09 16:07:26 +01:00
txx9irq.h MIPS: Remove TX39XX support 2022-03-01 10:07:22 +01:00
txx9pio.h
txx9tmr.h MIPS: Remove TX39XX support 2022-03-01 10:07:22 +01:00
types.h mips: Remove #include <uapi/asm/types.h> from <asm/types.h> 2020-11-11 23:45:46 +01:00
uaccess.h uaccess: generalize access_ok() 2022-02-25 09:36:05 +01:00
uasm.h mips, uasm: Add workaround for Loongson-2F nop CPU errata 2021-10-06 12:28:09 -07:00
unaligned-emul.h MIPS: Fix build error due to PTR used in more places 2022-01-27 09:04:19 +01:00
unistd.h fs: stat: compat: Add __ARCH_WANT_COMPAT_STAT 2022-04-26 13:35:45 -07:00
unroll.h treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
uprobes.h
vdso.h mips: Add support for generic vDSO 2019-07-25 21:45:05 -07:00
vermagic.h MIPS: Remove VR41xx support 2022-07-14 11:52:29 +02:00
vga.h
vmalloc.h mm/vmalloc: Add empty <asm/vmalloc.h> headers and use them from <linux/vmalloc.h> 2019-12-10 10:12:55 +01:00
vpe.h MIPS: vpe: Remove vpe_getcwd 2021-01-27 21:49:16 +01:00
watch.h
wbflush.h
yamon-dt.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00