Skip to contentSkip to conversation

ne2000 when vm stopped - network hangs after loadvm

Qemu-devel Juergen Pfennig 1 participant 1 message Feb 9, 2006

lore
Share & tools
lore
#0 lore raw

Hi,
there is still a little problem with ne2000:

(1) when the vm is in stopped state packets are still received
(2) this can fill the receive buffer before savevm ...
(3) when restarting qemu with loadvm the buffer is still full
(4) the guest OS does not get an int, so it does not know that data is in the buffer
(5) new data will be discarded (buffer full) - the guest OS waits forever.
(6) this make windows (users) unhappy.

One possible solution (but not a perfect one) is to block receiving when the vm is stopped:

8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<--- static void ne2000_receive(void *opaque, const uint8_t *buf, int size)

{
	// ... some lines skipped

    if (s->cmd & E8390_STOP || ne2000_buffer_full(s) || vm_running == 0)
        return;

	// ... some lines skipped
}
Quoted 1 line

8--->8--->8--->8--->8--->8--->8--->8--->8--->8--->8--->8--->8--->8---

Juergen