linux_dsm_epyc7002/arch/arm
Marc Zyngier 92f35b751c KVM: arm/arm64: vgic: Allow more than 256 vcpus for KVM_IRQ_LINE
While parts of the VGIC support a large number of vcpus (we
bravely allow up to 512), other parts are more limited.

One of these limits is visible in the KVM_IRQ_LINE ioctl, which
only allows 256 vcpus to be signalled when using the CPU or PPI
types. Unfortunately, we've cornered ourselves badly by allocating
all the bits in the irq field.

Since the irq_type subfield (8 bit wide) is currently only taking
the values 0, 1 and 2 (and we have been careful not to allow anything
else), let's reduce this field to only 4 bits, and allocate the
remaining 4 bits to a vcpu2_index, which acts as a multiplier:

  vcpu_id = 256 * vcpu2_index + vcpu_index

With that, and a new capability (KVM_CAP_ARM_IRQ_LINE_LAYOUT_2)
allowing this to be discovered, it becomes possible to inject
PPIs to up to 4096 vcpus. But please just don't.

Whilst we're there, add a clarification about the use of KVM_IRQ_LINE
on arm, which is not completely conditionned by KVM_CAP_IRQCHIP.

Reported-by: Zenghui Yu <yuzenghui@huawei.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Zenghui Yu <yuzenghui@huawei.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
2019-09-09 12:29:09 +01:00
..
boot i.MX fixes for 5.3: 2019-07-23 10:13:24 -07:00
common docs: arm: convert docs to ReST and rename to *.rst 2019-07-15 09:20:24 -03:00
configs ARM: defconfig: u8500: Add new drivers 2019-07-23 10:13:13 -07:00
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2019-07-08 20:57:08 -07:00
include KVM: arm/arm64: vgic: Allow more than 256 vcpus for KVM_IRQ_LINE 2019-09-09 12:29:09 +01:00
kernel ARM: signal: Mark expected switch fall-through 2019-08-09 19:47:15 -05:00
kvm KVM: arm: Don't write junk to CP15 registers on reset 2019-08-09 08:07:24 +01:00
lib ARM: SoC platform updates 2019-07-19 17:05:08 -07:00
mach-actions
mach-alpine
mach-artpec
mach-asm9260
mach-aspeed
mach-at91 ARM: SoC platform updates 2019-07-19 17:05:08 -07:00
mach-axxia
mach-bcm ARM: SoC platform updates 2019-07-19 17:05:08 -07:00
mach-berlin
mach-clps711x
mach-cns3xxx
mach-davinci ARM: davinci: fix sleep.S build error on ARMv4 2019-07-23 10:12:53 -07:00
mach-digicolor
mach-dove
mach-ebsa110
mach-efm32
mach-ep93xx ARM: ep93xx: Mark expected switch fall-through 2019-08-09 19:53:35 -05:00
mach-exynos ARM: SoC platform updates 2019-07-19 17:05:08 -07:00
mach-footbridge
mach-gemini
mach-highbank ARM: SoC platform updates 2019-07-19 17:05:08 -07:00
mach-hisi
mach-imx ARM: SoC platform updates 2019-07-19 17:05:08 -07:00
mach-integrator
mach-iop13xx
mach-iop32x Merge branch 'i2c/for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2019-07-15 21:10:39 -07:00
mach-iop33x
mach-ixp4xx docs: arm: convert docs to ReST and rename to *.rst 2019-07-15 09:20:24 -03:00
mach-keystone ARM: SoC platform updates 2019-07-19 17:05:08 -07:00
mach-ks8695
mach-lpc18xx
mach-lpc32xx
mach-mediatek
mach-meson
mach-milbeaut
mach-mmp
mach-moxart
mach-mv78xx0
mach-mvebu
mach-mxs
mach-nomadik
mach-npcm
mach-nspire
mach-omap1 Driver Core and debugfs changes for 5.3-rc1 2019-07-12 12:24:03 -07:00
mach-omap2 ARM: SoC-related driver updates 2019-07-19 17:13:56 -07:00
mach-orion5x
mach-oxnas
mach-picoxcell
mach-prima2
mach-pxa ARM: SoC platform updates 2019-07-19 17:05:08 -07:00
mach-qcom
mach-rda
mach-realview
mach-rockchip
mach-rpc ARM: SoC platform updates 2019-07-19 17:05:08 -07:00
mach-s3c24xx docs: arm: convert docs to ReST and rename to *.rst 2019-07-15 09:20:24 -03:00
mach-s3c64xx Merge branch 'regulator-5.3' into regulator-next 2019-07-04 17:34:32 +01:00
mach-s5pv210
mach-sa1100 ARM: SoC platform updates 2019-07-19 17:05:08 -07:00
mach-shmobile
mach-socfpga
mach-spear
mach-sti
mach-stm32 ARM: SoC platform updates 2019-07-19 17:05:08 -07:00
mach-sunxi
mach-tango
mach-tegra ARM: tegra: Mark expected switch fall-through 2019-08-09 19:45:22 -05:00
mach-u300
mach-uniphier
mach-ux500
mach-versatile
mach-vexpress
mach-vt8500
mach-w90x900
mach-zx
mach-zynq
mm Wimplicit-fallthrough patches for 5.3-rc4 2019-08-10 10:10:33 -07:00
net
nwfpe
oprofile
plat-iop Merge branch 'i2c/for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2019-07-15 21:10:39 -07:00
plat-omap ARM: OMAP: dma: Mark expected switch fall-throughs 2019-08-09 19:45:41 -05:00
plat-orion
plat-pxa
plat-samsung docs: arm: convert docs to ReST and rename to *.rst 2019-07-15 09:20:24 -03:00
plat-versatile
probes
tools docs: arm: convert docs to ReST and rename to *.rst 2019-07-15 09:20:24 -03:00
vdso kbuild: add --hash-style= and --build-id unconditionally 2019-07-17 22:37:51 +09:00
vfp
xen
Kconfig ARM: SoC platform updates 2019-07-19 17:05:08 -07:00
Kconfig-nommu
Kconfig.debug ARM: Delete netx a second time 2019-07-21 20:03:11 -07:00
Makefile