qemu-e2k/hw/i386
Maciej S. Szmigiero ec19444a53 hyperv: fix SynIC SINT assertion failure on guest reset
Resetting a guest that has Hyper-V VMBus support enabled triggers a QEMU
assertion failure:
hw/hyperv/hyperv.c:131: synic_reset: Assertion `QLIST_EMPTY(&synic->sint_routes)' failed.

This happens both on normal guest reboot or when using "system_reset" HMP
command.

The failing assertion was introduced by commit 64ddecc88b ("hyperv: SControl is optional to enable SynIc")
to catch dangling SINT routes on SynIC reset.

The root cause of this problem is that the SynIC itself is reset before
devices using SINT routes have chance to clean up these routes.

Since there seems to be no existing mechanism to force reset callbacks (or
methods) to be executed in specific order let's use a similar method that
is already used to reset another interrupt controller (APIC) after devices
have been reset - by invoking the SynIC reset from the machine reset
handler via a new x86_cpu_after_reset() function co-located with
the existing x86_cpu_reset() in target/i386/cpu.c.
Opportunistically move the APIC reset handler there, too.

Fixes: 64ddecc88b ("hyperv: SControl is optional to enable SynIc") # exposed the bug
Signed-off-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>
Message-Id: <cb57cee2e29b20d06f81dce054cbcea8b5d497e8.1664552976.git.maciej.szmigiero@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-10-18 13:58:04 +02:00
..
kvm
xen hw/i386/xen/xen-hvm: Inline xen_piix_pci_write_config_client() and remove it 2022-06-29 00:24:59 +02:00
acpi-build.c x86: pci: acpi: consolidate PCI slots creation 2022-10-09 16:38:46 -04:00
acpi-build.h
acpi-common.c
acpi-common.h
acpi-microvm.c hw/acpi/microvm: turn on 8042 bit in FADT boot architecture flags if present 2022-03-07 17:43:14 -05:00
acpi-microvm.h
amd_iommu.c hw/i386/amd_iommu: Fix IOMMU event log encoding errors 2022-05-16 16:15:40 -04:00
amd_iommu.h
e820_memory_layout.c
e820_memory_layout.h Clean up header guards that don't match their file name 2022-05-11 16:49:06 +02:00
fw_cfg.c
fw_cfg.h
generic_event_device_x86.c
intel_iommu_internal.h intel-iommu: block output address in interrupt address range 2022-05-16 04:38:40 -04:00
intel_iommu.c Revert "intel_iommu: Fix irqchip / X2APIC configuration checks" 2022-10-09 16:38:45 -04:00
Kconfig
kvmvapic.c
meson.build
microvm-dt.c hw/rtc/mc146818rtc: QOM'ify io_base offset 2022-06-11 11:44:50 +02:00
microvm-dt.h
microvm.c hyperv: fix SynIC SINT assertion failure on guest reset 2022-10-18 13:58:04 +02:00
multiboot.c hw/i386/multiboot: Avoid dynamic stack allocation 2022-09-22 16:38:28 +01:00
multiboot.h
pc_piix.c x86: re-enable rng seeding via SetupData 2022-09-27 11:30:59 +02:00
pc_q35.c x86: re-enable rng seeding via SetupData 2022-09-27 11:30:59 +02:00
pc_sysfw_ovmf-stubs.c
pc_sysfw_ovmf.c hw/i386: Replace magic number with field length calculation 2022-03-06 05:08:23 -05:00
pc_sysfw.c i386: factor out x86_firmware_configure() 2022-04-27 07:51:01 +02:00
pc.c hyperv: fix SynIC SINT assertion failure on guest reset 2022-10-18 13:58:04 +02:00
port92.c
sgx-epc.c
sgx-stub.c
sgx.c hw/i386: add 4g boundary start to X86MachineState 2022-07-26 10:40:58 -04:00
trace-events hw: Fix misleading hexadecimal format 2022-03-24 10:38:42 +00:00
trace.h
vmmouse.c
vmport.c
x86-iommu-stub.c
x86-iommu.c
x86.c x86: re-initialize RNG seed when selecting kernel 2022-10-01 21:16:36 +02:00