mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
vmnet: stop recieving events when VM is stopped
When the VM is stopped using the HMP command "stop", soon the handler will stop reading from the vmnet interface. This causes a flood of `VMNET_INTERFACE_PACKETS_AVAILABLE` events to arrive and puts the host CPU at 100%. We fix this by removing the event handler from vmnet when the VM is no longer in a running state and restore it when we return to a running state. Signed-off-by: Joelle van Dyne <j@getutm.app> Signed-off-by: Jason Wang <jasowang@redhat.com>
This commit is contained in:
parent
0c65ef4fbb
commit
993f71ee33
2 changed files with 37 additions and 13 deletions
|
@ -45,6 +45,8 @@ typedef struct VmnetState {
|
|||
int packets_send_end_pos;
|
||||
|
||||
struct iovec iov_buf[VMNET_PACKETS_LIMIT];
|
||||
|
||||
VMChangeStateEntry *change;
|
||||
} VmnetState;
|
||||
|
||||
const char *vmnet_status_map_str(vmnet_return_t status);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue