OpenCloudOS-Kernel/drivers
Jason Wang 8b4ec69d7e virtio: harden vring IRQ
This is a rework on the previous IRQ hardening that is done for
virtio-pci where several drawbacks were found and were reverted:

1) try to use IRQF_NO_AUTOEN which is not friendly to affinity managed IRQ
   that is used by some device such as virtio-blk
2) done only for PCI transport

The vq->broken is re-used in this patch for implementing the IRQ
hardening. The vq->broken is set to true during both initialization
and reset. And the vq->broken is set to false in
virtio_device_ready(). Then vring_interrupt() can check and return
when vq->broken is true. And in this case, switch to return IRQ_NONE
to let the interrupt core aware of such invalid interrupt to prevent
IRQ storm.

The reason of using a per queue variable instead of a per device one
is that we may need it for per queue reset hardening in the future.

Note that the hardening is only done for vring interrupt since the
config interrupt hardening is already done in commit 22b7050a02
("virtio: defer config changed notifications"). But the method that is
used by config interrupt can't be reused by the vring interrupt
handler because it uses spinlock to do the synchronization which is
expensive.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: "Paul E. McKenney" <paulmck@kernel.org>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Halil Pasic <pasic@linux.ibm.com>
Cc: Cornelia Huck <cohuck@redhat.com>
Cc: Vineeth Vijayan <vneethv@linux.ibm.com>
Cc: Peter Oberparleiter <oberpar@linux.ibm.com>
Cc: linux-s390@vger.kernel.org
Signed-off-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20220527060120.20964-9-jasowang@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
2022-05-31 12:45:10 -04:00
..
accessibility
acpi More power management updates for 5.19-rc1 2022-05-30 11:37:26 -07:00
amba ARM: 9192/1: amba: fix memory leak in amba_device_try_add() 2022-05-20 12:32:31 +01:00
android
ata ata changes for 5.19-rc1 2022-05-23 14:14:50 -07:00
atm
auxdisplay
base cxl for 5.19 2022-05-27 21:24:19 -07:00
bcma bcma: gpio: Switch to use fwnode instead of of_node 2022-05-09 14:41:43 +03:00
block virtio-blk: support mq_ops->queue_rqs() 2022-05-31 12:44:23 -04:00
bluetooth Bluetooth: btmtksdio: fix the reset takes too long 2022-05-13 13:19:01 +02:00
bus ARM: driver changes for 5.19 2022-05-26 10:32:47 -07:00
cdrom cdrom: remove obsolete TODO list 2022-05-15 18:31:28 -06:00
char This update includes the following changes: 2022-05-27 18:06:49 -07:00
clk dmaengine updates for v5.19-rc1 2022-05-29 11:38:27 -07:00
clocksource asm-generic changes for 5.19 2022-05-26 10:50:30 -07:00
comedi
connector
counter
cpufreq cpufreq: CPPC: Fix unused-function warning 2022-05-30 15:33:42 +02:00
cpuidle Merge branches 'pm-em' and 'pm-cpuidle' 2022-05-23 19:18:51 +02:00
crypto virtio-crypto: enable retry for virtio-crypto-dev 2022-05-31 12:45:09 -04:00
cxl cxl/port: Enable HDM Capability after validating DVSEC Ranges 2022-05-20 12:30:53 -07:00
dax dax: add .recovery_write dax_operation 2022-05-16 13:37:59 -07:00
dca
devfreq PM / devfreq: passive: Return non-error when not-supported event is required 2022-05-19 19:32:19 +02:00
dio
dma dmaengine updates for v5.19-rc1 2022-05-29 11:38:27 -07:00
dma-buf drm for 5.19-rc1 2022-05-25 16:18:27 -07:00
edac - A gargen variety of fixes which don't fit any other tip bucket: 2022-05-23 19:32:59 -07:00
eisa
extcon
firewire Merge branch 'for-linus' into for-next 2022-05-23 07:48:27 +02:00
firmware Yang Shi has improved the behaviour of khugepaged collapsing of readonly 2022-05-26 12:32:41 -07:00
fpga
fsi
gnss
gpio Pin control bulk changes for the v5.19 series: 2022-05-28 11:15:54 -07:00
gpu hyperv-next for 5.19 2022-05-28 11:39:01 -07:00
greybus
hid drm for 5.19-rc1 2022-05-25 16:18:27 -07:00
hsi
hv hv_balloon: Fix balloon_probe() and balloon_remove() error handling 2022-05-26 10:04:57 +00:00
hwmon hwmon: (aquacomputer_d5next) Fix an error handling path in aqc_probe() 2022-05-22 12:25:55 -07:00
hwspinlock
hwtracing
i2c drivers: i2c: thunderx: Allow driver to work with ACPI defined TWSI controllers 2022-05-21 13:41:28 +02:00
i3c
idle
iio Thermal control updates for 5.19-rc1 2022-05-24 16:19:30 -07:00
infiniband v5.19 pull request 2022-05-26 21:08:40 -07:00
input Input updates for 5.19 merge window: 2022-05-28 14:05:54 -07:00
interconnect
iommu dma-mapping updates for Linux 5.19 2022-05-25 19:18:36 -07:00
ipack
irqchip gpio updates for v5.19 2022-05-26 14:51:38 -07:00
isdn
leds
macintosh macintosh: via-pmu and via-cuda need RTC_LIB 2022-05-22 15:58:30 +10:00
mailbox mailbox: qcom-ipcc: Fix -Wunused-function with CONFIG_PM_SLEEP=n 2022-05-24 08:08:24 -05:00
mcb
md libnvdimm for 5.19 2022-05-27 15:49:30 -07:00
media Networking changes for 5.19. 2022-05-25 12:22:58 -07:00
memory More power management updates for 5.19-rc1 2022-05-30 11:37:26 -07:00
memstick
message
mfd mfd: rt4831: Improve error reporting for problems during .remove() 2022-05-23 15:08:04 +01:00
misc powerpc updates for 5.19 2022-05-28 11:27:17 -07:00
mmc m68knommu: changes for linux 5.19 2022-05-30 10:56:18 -07:00
most
mtd spi: Updates for v5.19 2022-05-24 15:13:30 -07:00
mux
net asm-generic changes for 5.19 2022-05-26 10:50:30 -07:00
nfc NFC: hci: fix sleep in atomic context bugs in nfc_hci_hcp_message_tx 2022-05-19 17:54:02 -07:00
ntb
nubus
nvdimm cxl for 5.19 2022-05-27 21:24:19 -07:00
nvme v5.19 pull request 2022-05-26 21:08:40 -07:00
nvmem
of drm for 5.19-rc1 2022-05-25 16:18:27 -07:00
opp OPP updates for 5.19-rc1 2022-05-25 15:02:26 +02:00
parisc
parport
pci hyperv-next for 5.19 2022-05-28 11:39:01 -07:00
pcmcia
peci
perf arm64 updates for 5.19: 2022-05-23 21:06:11 -07:00
phy
pinctrl Pin control bulk changes for the v5.19 series: 2022-05-28 11:15:54 -07:00
platform Cleanups and fixes 2022-05-30 11:01:50 -07:00
pnp
power
powercap Merge branches 'pm-em' and 'pm-cpuidle' 2022-05-23 19:18:51 +02:00
pps
ps3
ptp ptp: ocp: Add firmware header checks 2022-05-24 11:39:54 -07:00
pwm
rapidio
ras
regulator Merge back reboot/poweroff notifiers rework for 5.19-rc1. 2022-05-25 14:38:29 +02:00
remoteproc
reset TI Driver updates for v5.19 2022-05-09 23:09:10 +02:00
rpmsg
rtc m68k updates for v5.19 2022-05-23 20:56:17 -07:00
s390 virtio: harden vring IRQ 2022-05-31 12:45:10 -04:00
sbus
scsi hyperv-next for 5.19 2022-05-28 11:39:01 -07:00
sh
siox
slimbus slimbus: qcom: Fix IRQ check in qcom_slim_probe 2022-05-09 16:00:20 +02:00
soc More power management updates for 5.19-rc1 2022-05-30 11:37:26 -07:00
soundwire
spi ARM: ARMv4T/v5 multiplatform support for v5.19, part 1 2022-05-26 10:43:09 -07:00
spmi
ssb ssb: remove unreachable code 2022-05-11 08:29:11 +03:00
staging sound updates for 5.19-rc1 2022-05-25 16:55:16 -07:00
target SCSI misc on 20220524 2022-05-25 19:09:48 -07:00
tc
tee ARM: driver changes for 5.19 2022-05-26 10:32:47 -07:00
thermal Additional thermal control update for 5.19-rc1 2022-05-30 11:34:13 -07:00
thunderbolt
tty Not a lot of material this cycle. Many singleton patches against various 2022-05-27 11:22:03 -07:00
uio
usb More ACPI updates for 5.19-rc1 2022-05-30 11:30:16 -07:00
vdpa vdpasim: allow to enable a vq repeatedly 2022-05-31 12:45:09 -04:00
vfio Merge tag 'drm-intel-next-2022-05-06' of git://anongit.freedesktop.org/drm/drm-intel into drm-next 2022-05-11 11:00:15 +10:00
vhost vhost-vdpa: support ASID based IOTLB API 2022-05-31 12:44:32 -04:00
video fbdev fixes and updates for kernel v5.19-rc1 2022-05-30 12:46:49 -07:00
virt Misc hardening changes for 5.19-rc1 2022-05-25 13:56:57 -07:00
virtio virtio: harden vring IRQ 2022-05-31 12:45:10 -04:00
visorbus
vlynq
vme
w1
watchdog
xen dma-mapping updates for Linux 5.19 2022-05-25 19:18:36 -07:00
zorro
Kconfig
Makefile