linux_dsm_epyc7002/arch/arm
Dave Martin 7dd32a0d01 KVM: arm/arm64: Add KVM_ARM_VCPU_FINALIZE ioctl
Some aspects of vcpu configuration may be too complex to be
completed inside KVM_ARM_VCPU_INIT.  Thus, there may be a
requirement for userspace to do some additional configuration
before various other ioctls will work in a consistent way.

In particular this will be the case for SVE, where userspace will
need to negotiate the set of vector lengths to be made available to
the guest before the vcpu becomes fully usable.

In order to provide an explicit way for userspace to confirm that
it has finished setting up a particular vcpu feature, this patch
adds a new ioctl KVM_ARM_VCPU_FINALIZE.

When userspace has opted into a feature that requires finalization,
typically by means of a feature flag passed to KVM_ARM_VCPU_INIT, a
matching call to KVM_ARM_VCPU_FINALIZE is now required before
KVM_RUN or KVM_GET_REG_LIST is allowed.  Individual features may
impose additional restrictions where appropriate.

No existing vcpu features are affected by this, so current
userspace implementations will continue to work exactly as before,
with no need to issue KVM_ARM_VCPU_FINALIZE.

As implemented in this patch, KVM_ARM_VCPU_FINALIZE is currently a
placeholder: no finalizable features exist yet, so ioctl is not
required and will always yield EINVAL.  Subsequent patches will add
the finalization logic to make use of this ioctl for SVE.

No functional change for existing userspace.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Reviewed-by: Julien Thierry <julien.thierry@arm.com>
Tested-by: zhang.lei <zhang.lei@jp.fujitsu.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2019-03-29 14:41:54 +00:00
..
boot ARM updates for 5.1-rc1 2019-03-15 14:37:46 -07:00
common ARM: 8847/1: pm: fix HYP/SVC mode mismatch when MCPM is used 2019-02-26 11:32:54 +00:00
configs configs: get rid of obsolete CONFIG_ENABLE_WARN_DEPRECATED 2019-03-07 18:32:02 -08:00
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2019-03-05 09:09:55 -08:00
firmware
include KVM: arm/arm64: Add KVM_ARM_VCPU_FINALIZE ioctl 2019-03-29 14:41:54 +00:00
kernel ARM updates for 5.1-rc1 2019-03-15 14:37:46 -07:00
kvm ARM: some cleanups, direct physical timer assignment, cache sanitization 2019-03-15 15:00:28 -07:00
lib ARM: 8844/1: use unified assembler in assembly files 2019-02-26 11:26:07 +00:00
mach-actions ARM: actions: remove boot_lock and pen_release 2019-02-01 21:59:15 +00:00
mach-alpine PCI: consolidate PCI config entry in drivers/pci 2018-11-23 11:45:34 +09:00
mach-artpec
mach-asm9260
mach-aspeed
mach-at91 treewide: add intermediate .s files to targets 2018-12-23 10:12:08 +09:00
mach-axxia
mach-bcm bcm2835-pm: Move bcm2835-watchdog's DT probe to an MFD. 2019-01-09 16:55:06 +01:00
mach-berlin
mach-clps711x
mach-cns3xxx irqchip updates for 5.1, take #2 2019-03-21 12:30:54 +01:00
mach-davinci Power management updates for 5.1-rc1 2019-03-06 12:59:46 -08:00
mach-digicolor
mach-dove
mach-ebsa110
mach-efm32
mach-ep93xx arch/arm/mach-ep93xx: Remove duplicate header 2019-01-30 22:59:53 +01:00
mach-exynos ARM updates for 5.1-rc1 2019-03-15 14:37:46 -07:00
mach-footbridge PCI: consolidate PCI config entry in drivers/pci 2018-11-23 11:45:34 +09:00
mach-gemini
mach-highbank
mach-hisi
mach-imx DMA mapping updates for 5.1 2019-03-10 11:54:48 -07:00
mach-integrator ARM: integrator: impd1: use struct_size() in devm_kzalloc() 2019-01-11 13:33:00 +01:00
mach-iop13xx
mach-iop32x ARM: iop32x/n2100: fix PCI IRQ mapping 2019-01-30 11:34:42 +01:00
mach-iop33x
mach-ixp4xx PCI: consolidate PCI config entry in drivers/pci 2018-11-23 11:45:34 +09:00
mach-keystone
mach-ks8695 ARM: 8844/1: use unified assembler in assembly files 2019-02-26 11:26:07 +00:00
mach-lpc18xx
mach-lpc32xx ARM: lpc32xx: remove platform data of ARM PL111 LCD controller 2019-02-03 21:40:41 +02:00
mach-mediatek arm: mediatek: add MT7629 smp bring up code 2019-02-07 17:59:16 +01:00
mach-meson ARM: meson: remove COMMON_CLK_AMLOGIC selection 2019-02-06 19:53:02 -08:00
mach-milbeaut ARM: milbeaut: Add basic support for Milbeaut m10v SoC 2019-03-01 15:18:26 +01:00
mach-mmp regulator: fixed/gpio: Pull inversion/OD into gpiolib 2019-02-06 15:58:29 +00:00
mach-moxart
mach-mv78xx0 PCI: consolidate PCI config entry in drivers/pci 2018-11-23 11:45:34 +09:00
mach-mvebu PCI: consolidate PCI config entry in drivers/pci 2018-11-23 11:45:34 +09:00
mach-mxs
mach-netx
mach-nomadik
mach-npcm
mach-nspire
mach-omap1 Merge branch 'i2c/for-5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2019-03-08 09:27:33 -08:00
mach-omap2 ARM updates for 5.1-rc1 2019-03-15 14:37:46 -07:00
mach-orion5x ARM: orion5x: Include platform_data/dsa.h 2019-01-17 11:31:24 -08:00
mach-oxnas ARM: oxnas: remove CPU hotplug implementation 2019-02-01 21:59:15 +00:00
mach-picoxcell
mach-prima2 ARM: smp: remove arch-provided "pen_release" 2019-02-01 22:05:23 +00:00
mach-pxa ARM: SoC platform updates for 5.1 2019-03-06 09:33:05 -08:00
mach-qcom ARM: qcom: remove unnecessary boot_lock 2019-02-01 21:59:15 +00:00
mach-rda ARM: Prepare RDA8810PL SoC 2018-12-31 13:09:39 -08:00
mach-realview ARM: vexpress/realview: consolidate immitation CPU hotplug 2018-12-14 14:44:59 +00:00
mach-rockchip
mach-rpc
mach-s3c24xx ARM: s3c24xx: Fix boolean expressions in osiris_dvs_notify 2019-01-07 20:41:01 +01:00
mach-s3c64xx
mach-s5pv210
mach-sa1100 This is the bulk of GPIO changes for the v5.1 cycle: 2019-03-08 10:09:53 -08:00
mach-shmobile ARM: shmobile: Fix R-Car Gen2 regulator quirk 2019-01-07 13:24:07 +01:00
mach-socfpga reset: socfpga: declare socfpga_reset_init in a header file 2019-01-28 11:16:04 +01:00
mach-spear ARM: smp: remove arch-provided "pen_release" 2019-02-01 22:05:23 +00:00
mach-sti ARM: sti: remove pen_release and boot_lock 2018-12-20 14:32:15 +01:00
mach-stm32
mach-sunxi reset: sunxi: declare sun6i_reset_init in a header file 2019-01-28 11:16:04 +01:00
mach-tango ARM: tango: Improve ARCH_MULTIPLATFORM compatibility 2019-01-30 11:45:10 +01:00
mach-tegra ARM updates for 5.1-rc1 2019-03-15 14:37:46 -07:00
mach-u300
mach-uniphier
mach-ux500
mach-versatile
mach-vexpress ARM: vexpress/realview: consolidate immitation CPU hotplug 2018-12-14 14:44:59 +00:00
mach-vt8500
mach-w90x900
mach-zx
mach-zynq
mm ARM updates for 5.1-rc1 2019-03-15 14:37:46 -07:00
net arm: bpf: implement jitting of JMP32 2019-01-26 13:33:02 -08:00
nwfpe
oprofile Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
plat-iop
plat-omap
plat-orion ARM: orion5x: Include platform_data/dsa.h 2019-01-17 11:31:24 -08:00
plat-pxa ARM: pxa: ssp: unneeded to free devm_ allocated data 2019-01-23 21:32:01 +01:00
plat-samsung ARM: samsung: Limit SAMSUNG_PM_DEBUG config option to non-Exynos platforms 2018-11-18 15:11:27 +01:00
plat-versatile ARM: versatile: rename and comment SMP implementation 2018-12-14 14:44:59 +00:00
probes ARM: 8834/1: Fix: kprobes: optimized kprobes illegal instruction 2019-02-12 15:20:58 +00:00
tools y2038: add 64-bit time_t syscalls to all 32-bit architectures 2019-02-07 00:13:28 +01:00
vdso
vfp Merge branches 'misc', 'sa1100-for-next' and 'spectre' into for-linus 2019-01-02 10:37:05 +00:00
xen get rid of legacy 'get_ds()' function 2019-03-04 10:50:14 -08:00
Kconfig ARM updates for 5.1-rc1 2019-03-15 14:37:46 -07:00
Kconfig-nommu ARM: 8832/1: NOMMU: Limit visibility for CONFIG_FLASH_{MEM_BASE,SIZE} 2019-02-01 21:44:46 +00:00
Kconfig.debug i.MX SoC changes for 4.21: 2018-12-12 13:52:48 -08:00
Makefile ARM updates for 5.1-rc1 2019-03-15 14:37:46 -07:00