linux/include
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
..
acpi cxl for 5.19 2022-05-27 21:24:19 -07:00
asm-generic Yang Shi has improved the behaviour of khugepaged collapsing of readonly 2022-05-26 12:32:41 -07:00
clocksource
crypto
drm drm: fix EDID struct for old ARM OABI format 2022-05-28 13:06:49 -07:00
dt-bindings Pin control bulk changes for the v5.19 series: 2022-05-28 11:15:54 -07:00
keys KEYS: trusted: Introduce support for NXP CAAM-based trusted keys 2022-05-23 18:47:50 +03:00
kunit kunit: take kunit_assert as const 2022-05-16 13:23:00 -06:00
kvm Merge branch kvm-arm64/per-vcpu-host-pmu-data into kvmarm-master/next 2022-05-16 17:48:36 +01:00
linux virtio: harden vring IRQ 2022-05-31 12:45:10 -04:00
math-emu
media media: h264: Sort p/b reflist using frame_num 2022-05-17 10:02:29 +02:00
memory
misc
net Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2022-05-23 16:07:14 -07:00
pcmcia
ras
rdma RDMA/core: Fix typo in comment 2022-05-24 11:24:58 -03:00
scsi SCSI misc on 20220524 2022-05-25 19:09:48 -07:00
soc ARM: driver changes for 5.19 2022-05-26 10:32:47 -07:00
sound ASoC: Updates for v5.19 2022-05-23 16:03:04 +02:00
target SCSI misc on 20220524 2022-05-25 19:09:48 -07:00
trace NFSD 5.19 Release Notes 2022-05-26 20:52:24 -07:00
uapi vhost-vdpa: introduce uAPI to set group ASID 2022-05-31 12:44:31 -04:00
vdso
video video: fbdev: radeon: Fix spelling typo in comment 2022-05-26 13:38:59 +02:00
xen dma-mapping updates for Linux 5.19 2022-05-25 19:18:36 -07:00