cloud-hypervisor/fuzz/fuzz_targets
Rob Bradford 06dc708515 vmm: Only return from reset driven I/O once event received
The reset system is asynchronous with an I/O event (PIO or MMIO) for
ACPI/i8042/CMOS triggering a write to the reset_evt event handler. The
VMM thread will pick up this event on the VMM main loop and then trigger
a shutdown in the CpuManager. However since there is some delay between
the CPU threads being marked to be killed (through the
CpuManager::cpus_kill_signalled bool) it is possible for the guest vCPU
that triggered the exit to be re-entered when the vCPU KVM_RUN is called
after the I/O exit is completed.

This is undesirable and in particular the Linux kernel will attempt to
jump to real mode after a CMOS based exit - this is unsupported in
nested KVM on AMD on Azure and will trigger an error in KVM_RUN.

Solve this problem by spinning in the device that has triggered the
reset until the vcpus_kill_signalled boolean has been updated
indicating that the VMM thread has received the event and called
CpuManager::shutdown(). In particular if this bool is set then the vCPU
threads will not re-enter the guest.

Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
2023-08-04 09:57:25 +08:00
..
balloon.rs vmm: virtio-devices: Restore every VirtioDevice upon creation 2022-10-24 14:17:08 +02:00
block.rs block: merge qcow, vhdx and block_util into block crate 2023-07-19 13:52:43 +01:00
cmos.rs vmm: Only return from reset driven I/O once event received 2023-08-04 09:57:25 +08:00
console.rs fuzz: Add fuzzer for virtio-console 2022-11-03 09:10:41 -07:00
http_api.rs vmm: api: Use 'BTreeMap' for 'HttpRoutes' 2022-08-03 10:18:24 +01:00
iommu.rs vmm: virtio-devices: Restore every VirtioDevice upon creation 2022-10-24 14:17:08 +02:00
linux_loader_cmdline.rs fuzz: Add fuzzer for 'linux loader' cmdline 2022-12-12 13:50:28 +00:00
linux_loader.rs fuzz: Add fuzzer for 'linux loader' 2022-12-12 13:50:28 +00:00
mem.rs vmm: Make Transparent Huge Pages controllable (default on) 2022-11-09 16:51:21 +00:00
net.rs vmm: add configuration for network offloading features 2023-01-12 09:05:45 +00:00
pmem.rs vmm: virtio-devices: Restore every VirtioDevice upon creation 2022-10-24 14:17:08 +02:00
qcow.rs block: merge qcow, vhdx and block_util into block crate 2023-07-19 13:52:43 +01:00
rng.rs vmm: virtio-devices: Restore every VirtioDevice upon creation 2022-10-24 14:17:08 +02:00
serial.rs vm-device: support batch update interrupt source group GSI 2023-08-03 15:58:36 +01:00
vhdx.rs block: merge qcow, vhdx and block_util into block crate 2023-07-19 13:52:43 +01:00
watchdog.rs vmm: virtio-devices: Restore every VirtioDevice upon creation 2022-10-24 14:17:08 +02:00