diff options
author | Igor Mammedov <imammedo@redhat.com> | 2018-08-27 13:07:10 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2018-09-07 17:05:18 -0400 |
commit | c2d2a81b4196984fb74276826892838b5b69d92c (patch) | |
tree | 5b47b1c92bb73e0dd3d032ca4225a3d31b943939 /hw/virtio | |
parent | 6755e618d09a81a82ab67a6163ffc9a39e743d0b (diff) |
pc: make sure that guest isn't able to unplug the first cpu
The first cpu unplug wasn't ever supported and corresponding
monitor/qmp commands refuse to unplug it. However guest is able
to issue eject request either using following command:
# echo 1 >/sys/devices/system/cpu/cpu0/firmware_node/eject
or directly writing to cpu hotplug registers, which makes
qemu crash with SIGSEGV following back trace:
kvm_flush_coalesced_mmio_buffer ()
while (ring->first != ring->last)
...
qemu_flush_coalesced_mmio_buffer
prepare_mmio_access
flatview_read_continue
flatview_read
address_space_read_full
address_space_rw
kvm_cpu_exec(cpu!0)
qemu_kvm_cpu_thread_fn
the reason for which is that ring == KVMState::coalesced_mmio_ring
happens to be a part of 1st CPU that was uplugged by guest.
Fix it by forbidding 1st cpu unplug from guest side and in addition
remove CPU0._EJ0 ACPI method to make clear that unplug of the first
CPU is not supported.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/virtio')
0 files changed, 0 insertions, 0 deletions