1
0
Fork 0
alistair23-linux/drivers/xen
Juergen Gross e99502f762 xen/events: defer eoi in case of excessive number of events
In case rogue guests are sending events at high frequency it might
happen that xen_evtchn_do_upcall() won't stop processing events in
dom0. As this is done in irq handling a crash might be the result.

In order to avoid that, delay further inter-domain events after some
time in xen_evtchn_do_upcall() by forcing eoi processing into a
worker on the same cpu, thus inhibiting new events coming in.

The time after which eoi processing is to be delayed is configurable
via a new module parameter "event_loop_timeout" which specifies the
maximum event loop time in jiffies (default: 2, the value was chosen
after some tests showing that a value of 2 was the lowest with an
only slight drop of dom0 network throughput while multiple guests
performed an event storm).

How long eoi processing will be delayed can be specified via another
parameter "event_eoi_delay" (again in jiffies, default 10, again the
value was chosen after testing with different delay values).

This is part of XSA-332.

Cc: stable@vger.kernel.org
Reported-by: Julien Grall <julien@xen.org>
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Wei Liu <wl@xen.org>
2020-10-20 10:22:16 +02:00
..
events xen/events: defer eoi in case of excessive number of events 2020-10-20 10:22:16 +02:00
xen-pciback xen/pciback: use lateeoi irq binding 2020-10-20 10:22:08 +02:00
xenbus xen: branch for v5.9-rc4 2020-09-06 09:59:27 -07:00
xenfs Merge branch 'work.mount0' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2019-07-19 10:42:02 -07:00
Kconfig xen: branch for v5.9-rc4 2020-09-06 09:59:27 -07:00
Makefile xen: branch for v5.9-rc4 2020-09-06 09:59:27 -07:00
acpi.c
arm-device.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 201 2019-05-30 11:29:52 -07:00
balloon.c xen: branch for v5.9-rc4 2020-09-06 09:59:27 -07:00
biomerge.c block: pass page to xen_biovec_phys_mergeable 2019-04-01 12:11:13 -06:00
cpu_hotplug.c xen/cpuhotplug: Fix initial CPU offlining for PV(H) guests 2020-05-21 13:01:45 -05:00
dbgp.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
efi.c xen/efi: have a common runtime setup function 2019-10-02 10:31:07 -04:00
evtchn.c xen/events: switch user event channels to lateeoi model 2020-10-20 10:22:11 +02:00
features.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
gntalloc.c mm: treewide: remove GFP_TEMPORARY allocation flag 2017-09-13 18:53:16 -07:00
gntdev-common.h xen: Use evtchn_type_t as a type for event channels 2020-04-07 12:12:54 +02:00
gntdev-dmabuf.c xen/gntdev: Fix dmabuf import with non-zero sgt offset 2020-08-13 12:50:22 +02:00
gntdev-dmabuf.h xen/gntdev: Do not destroy context while dma-bufs are in use 2019-02-18 06:50:03 +01:00
gntdev.c xen/gntdev.c: Convert get_user_pages*() to pin_user_pages*() 2020-10-04 18:41:33 -05:00
grant-table.c xen: add helpers to allocate unpopulated memory 2020-09-04 10:00:01 +02:00
manage.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
mcelog.c xen/mcelog: add PPIN to record when available 2019-11-14 10:01:57 +01:00
mem-reservation.c xen/balloon: add runtime control for scrubbing ballooned out pages 2018-09-14 08:51:10 -04:00
pci.c xen/pci: reserve MCFG areas earlier 2019-09-12 15:02:55 -04:00
pcpu.c
platform-pci.c xen-platform: Constify dev_pm_ops 2020-05-21 13:00:39 -05:00
privcmd-buf.c xen/privcmd-buf.c: convert to use vm_map_pages_zero() 2019-05-14 09:47:50 -07:00
privcmd.c xen: branch for v5.9-rc4 2020-09-06 09:59:27 -07:00
privcmd.h xen: add new hypercall buffer mapping device 2018-06-22 08:26:42 +02:00
pvcalls-back.c xen/pvcallsback: use lateeoi irq binding 2020-10-20 10:22:07 +02:00
pvcalls-front.c xen: remove redundant initialization of variable ret 2020-10-04 18:41:33 -05:00
pvcalls-front.h xen: fix poll misannotation 2018-02-01 10:07:32 -05:00
swiotlb-xen.c xen/arm: introduce phys/dma translations in xen_dma_sync_for_* 2020-08-04 07:53:52 +02:00
sys-hypervisor.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
time.c READ_ONCE: Enforce atomicity for {READ,WRITE}_ONCE() memory accesses 2020-04-16 12:28:07 +01:00
unpopulated-alloc.c xen: add helpers to allocate unpopulated memory 2020-09-04 10:00:01 +02:00
xen-acpi-cpuhotplug.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 12 2019-05-21 11:28:45 +02:00
xen-acpi-memhotplug.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
xen-acpi-pad.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 288 2019-06-05 17:36:37 +02:00
xen-acpi-processor.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 288 2019-06-05 17:36:37 +02:00
xen-balloon.c xen/balloon: Support xend-based toolstack take two 2020-01-22 08:58:16 -06:00
xen-front-pgdir-shbuf.c xen: Introduce shared buffer helpers for page directory... 2018-12-18 12:15:55 -05:00
xen-scsiback.c xen/scsiback: use lateeoi irq binding 2020-10-20 10:22:04 +02:00
xen-stub.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 12 2019-05-21 11:28:45 +02:00
xlate_mmu.c xen: add helpers to allocate unpopulated memory 2020-09-04 10:00:01 +02:00