qemu-patch-raspberry4/hw
Laurent Vivier fd0a10cd20 ohci: delay first SOF interrupt
On overcommitted CPU, kernel can be so slow that an interrupt can
be triggered by the device whereas the driver is not ready to receive
it. This drives us into an infinite loop.

This does not happen on real hardware because real hardware never send
interrupt immediately after the controller has been moved to OPERATION state.

This patch tries to delay the first SOF interrupt to let driver exits from
the critical section (which is not protected against interrupts...)

Some details:

- ohci_irq(): the OHCI interrupt handler, acknowledges the SOF IRQ
  only if the state of the driver (rh_state) is OHCI_STATE_RUNNING.
  So if this interrupt happens and the driver is not in this state,
  the function is called again and again, moving the system to a
  CPU starvation.

- ohci_rh_resume(): the driver re-enables operation with OHCI_USB_OPER.
  In QEMU this start the SOF timer and QEMU starts to send IRQs. As
  the driver is not in OHCI_STATE_RUNNING and not protected against IRQ,
  the ohci_irq() can be called and the driver never moved to
  OHCI_STATE_RUNNING.

Suggested-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-id: 1452109525-32150-2-git-send-email-lvivier@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2016-01-08 09:29:24 +01:00
..
9pfs virtio-9p: use accessor to get thread_pool 2015-12-23 10:56:58 +01:00
acpi acpi: extend aml_and() to accept target argument 2015-12-22 18:39:21 +02:00
alpha alpha: convert "naked" qemu_log to tracepoint 2015-12-17 17:33:47 +01:00
arm acpi: extend aml_and() to accept target argument 2015-12-22 18:39:21 +02:00
audio Remove macros IO_READ_PROTO and IO_WRITE_PROTO 2015-10-19 09:03:53 +02:00
block Xen 2015/12/22 2015-12-23 12:04:01 +00:00
bt bt: avoid unintended sign extension 2015-12-04 09:39:55 +03:00
char cris: avoid "naked" qemu_log 2015-12-17 17:33:47 +01:00
core pc: Move option_rom_has_mr/rom_file_has_mr globals to MachineClass 2015-12-22 17:45:12 +02:00
cpu icc_bus: drop the unused files 2015-10-02 16:22:02 -03:00
cris cris: Remove ELF_MACHINE from cpu.h 2015-09-25 12:04:43 +02:00
display xenfb: avoid reading twice the same fields from the shared page 2015-12-18 15:10:09 +00:00
dma arm: soc-dma: use hwaddr instead of target_ulong in printf 2015-12-17 13:37:13 +00:00
gpio i.MX: add support for lower and upper interrupt in GPIO. 2015-12-17 13:37:13 +00:00
i2c i.MX: Standardize i.MX I2C debug 2015-10-27 15:59:46 +00:00
i386 acpi: extend aml_and() to accept target argument 2015-12-22 18:39:21 +02:00
ide atapi: Fix code indentation 2015-11-24 14:56:49 -05:00
input qapi: Change munging of CamelCase enum values 2015-12-17 08:21:28 +01:00
intc kvm: x86: add support for KVM_CAP_SPLIT_IRQCHIP 2015-12-17 17:33:47 +01:00
ipack pci: Trivial device model conversions to realize 2015-02-26 12:42:16 +01:00
ipmi ipmi: Add a force off function 2015-12-22 18:39:19 +02:00
isa hw/isa/lpc_ich9: inject the SMI on the VCPU that is writing to APM_CNT 2015-10-22 14:39:09 +03:00
lm32 ui/opengl: Reduce build required libraries for opengl 2015-11-03 10:13:42 +01:00
m68k m68k: Remove ELF_MACHINE from cpu.h 2015-09-25 12:04:43 +02:00
mem nvdimm: implement NVDIMM device abstract 2015-12-22 18:39:20 +02:00
microblaze petalogix-ml605: Set the MicroBlaze CPU version to 8.10.a 2016-01-07 14:57:26 +01:00
mips gt64xxx: fix decoding of ISD register 2015-12-04 09:39:55 +03:00
misc hw/misc: Hyper-V test device 'hyperv-testdev' 2015-12-17 15:24:35 +01:00
moxie moxie: Remove ELF_MACHINE from cpu.h 2015-09-25 12:04:43 +02:00
net -----BEGIN PGP SIGNATURE----- 2015-12-07 14:18:31 +00:00
nvram fw_cfg: replace ioport data read with generic method 2015-12-15 11:46:13 +01:00
openrisc * First batch of MAINTAINERS updates 2015-09-25 21:52:30 +01:00
pci fix bad indentation in pcie_cap_slot_write_config() 2015-11-06 15:42:38 +03:00
pci-bridge hw/pxb: introduce pxb-pcie expander for PCIe machines 2015-12-22 17:45:13 +02:00
pci-host i440fx: print an error message if user tries to enable iommu 2015-11-17 15:41:13 +02:00
pcmcia hw: do not pass NULL to memory_region_init from instance_init 2015-10-09 15:25:56 +02:00
ppc spapr_drc: Change value of property "fdt" from null back to {} 2015-12-04 16:50:59 +11:00
s390x virtio: handle non-virtio-1-capable backend for ccw 2015-12-02 19:34:11 +02:00
scsi scsi: always call notifier on async cancellation 2015-12-17 17:33:49 +01:00
sd sdhci: add optional quirk property to disable card insertion/removal interrupts 2015-12-22 16:34:26 +08:00
sh4 Use DEFINE_MACHINE() to register all machines 2015-09-19 16:40:15 +02:00
smbios smbios: add smbios 3.0 support 2015-09-07 10:39:28 +01:00
sparc sparc: Remove ELF_MACHINE from cpu.h 2015-09-25 12:04:44 +02:00
sparc64 sun4u: split NPT and INT_DIS accesses between timer and compare registers 2016-01-07 12:21:02 +00:00
ssi arm: Use g_new() & friends where that makes obvious sense 2015-09-07 10:39:27 +01:00
timer i.MX: rename i.MX CCM get_clock() function and CLK ID enum names 2015-12-17 13:37:15 +00:00
tpm tpm: avoid clang shifting negative signed warning 2015-11-17 18:35:56 +08:00
tricore tricore: Remove ELF_MACHINE from cpu.h 2015-09-25 12:04:44 +02:00
unicore32 Use DEFINE_MACHINE() to register all machines 2015-09-19 16:40:15 +02:00
usb ohci: delay first SOF interrupt 2016-01-08 09:29:24 +01:00
vfio vfio: Use g_new() & friends where that makes obvious sense 2015-11-10 12:11:08 -07:00
virtio virtio-pci: Set the QEMU_PCI_CAP_EXPRESS capability early in its DeviceClass realize method 2015-12-02 21:51:33 +02:00
watchdog i6300esb: remove muldiv64() 2015-09-25 14:52:17 +02:00
xen xen/pass-through: correctly deal with RW1C bits 2015-12-09 15:47:28 +00:00
xenpv xen: fix usage of xc_domain_create in domain builder 2015-11-13 17:38:06 +00:00
xtensa target-xtensa: xtfpga: attach FLASH to system IO 2015-10-21 21:28:33 +03:00
Makefile.objs Add a base IPMI interface 2015-12-22 18:39:19 +02:00