1
0
Fork 0
alistair23-linux/arch
Peter Xu 654f1f13ea kvm: Check irqchip mode before assign irqfd
When assigning kvm irqfd we didn't check the irqchip mode but we allow
KVM_IRQFD to succeed with all the irqchip modes.  However it does not
make much sense to create irqfd even without the kernel chips.  Let's
provide a arch-dependent helper to check whether a specific irqfd is
allowed by the arch.  At least for x86, it should make sense to check:

- when irqchip mode is NONE, all irqfds should be disallowed, and,

- when irqchip mode is SPLIT, irqfds that are with resamplefd should
  be disallowed.

For either of the case, previously we'll silently ignore the irq or
the irq ack event if the irqchip mode is incorrect.  However that can
cause misterious guest behaviors and it can be hard to triage.  Let's
fail KVM_IRQFD even earlier to detect these incorrect configurations.

CC: Paolo Bonzini <pbonzini@redhat.com>
CC: Radim Krčmář <rkrcmar@redhat.com>
CC: Alex Williamson <alex.williamson@redhat.com>
CC: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-05-24 21:27:12 +02:00
..
alpha alpha: move arch/alpha/defconfig to arch/alpha/configs/defconfig 2019-05-18 11:49:55 +09:00
arc asm-generic: kill <asm/segment.h> and improve nommu generic uaccess helpers 2019-05-16 11:26:37 -07:00
arm KVM: arm/arm64: Move cc/it checks under hyp's Makefile to avoid instrumentation 2019-05-24 14:53:20 +01:00
arm64 KVM: arm/arm64: Move cc/it checks under hyp's Makefile to avoid instrumentation 2019-05-24 14:53:20 +01:00
c6x asm-generic: kill <asm/segment.h> and improve nommu generic uaccess helpers 2019-05-16 11:26:37 -07:00
csky arch: remove dangling asm-generic wrappers 2019-05-18 11:49:52 +09:00
h8300 arch: remove dangling asm-generic wrappers 2019-05-18 11:49:52 +09:00
hexagon asm-generic: kill <asm/segment.h> and improve nommu generic uaccess helpers 2019-05-16 11:26:37 -07:00
ia64 ia64: require -Wl,--hash-style=sysv 2019-05-18 11:29:01 +09:00
m68k Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2019-05-17 09:46:31 -07:00
microblaze Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2019-05-17 09:46:31 -07:00
mips Kbuild updates for v5.2 (2nd) 2019-05-19 11:53:58 -07:00
nds32 arch: remove dangling asm-generic wrappers 2019-05-18 11:49:52 +09:00
nios2 asm-generic: kill <asm/segment.h> and improve nommu generic uaccess helpers 2019-05-16 11:26:37 -07:00
openrisc asm-generic: kill <asm/segment.h> and improve nommu generic uaccess helpers 2019-05-16 11:26:37 -07:00
parisc Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2019-05-17 09:46:31 -07:00
powerpc Merge branch 'akpm' (patches from Andrew) 2019-05-19 12:15:32 -07:00
riscv Kbuild updates for v5.2 (2nd) 2019-05-19 11:53:58 -07:00
s390 KVM: s390: change default halt poll time to 50us 2019-05-20 09:40:39 +02:00
sh treewide: prefix header search paths with $(srctree)/ 2019-05-18 11:49:57 +09:00
sparc Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2019-05-17 09:46:31 -07:00
um Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-05-19 10:23:24 -07:00
unicore32 Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-05-19 10:23:24 -07:00
x86 kvm: Check irqchip mode before assign irqfd 2019-05-24 21:27:12 +02:00
xtensa treewide: prefix header search paths with $(srctree)/ 2019-05-18 11:49:57 +09:00
.gitignore
Kconfig Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-05-16 11:00:20 -07:00