diff options
Diffstat (limited to 'hw')
-rw-r--r-- | hw/net/e1000.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/hw/net/e1000.c b/hw/net/e1000.c index 0387fa0646..8e79b550e6 100644 --- a/hw/net/e1000.c +++ b/hw/net/e1000.c @@ -357,6 +357,14 @@ set_interrupt_cause(E1000State *s, int index, uint32_t val) } mit_update_delay(&mit_delay, s->mac_reg[ITR]); + /* + * According to e1000 SPEC, the Ethernet controller guarantees + * a maximum observable interrupt rate of 7813 interrupts/sec. + * Thus if mit_delay < 500 then the delay should be set to the + * minimum delay possible which is 500. + */ + mit_delay = (mit_delay < 500) ? 500 : mit_delay; + if (mit_delay) { s->mit_timer_on = 1; timer_mod(s->mit_timer, qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) + @@ -448,11 +456,6 @@ static void e1000_reset(void *opaque) e1000_link_down(d); } - /* Throttle interrupts to prevent guest (e.g Win 2012) from - * reinjecting interrupts endlessly. TODO: fix non ITR case. - */ - d->mac_reg[ITR] = 250; - /* Some guests expect pre-initialized RAH/RAL (AddrValid flag + MACaddr) */ d->mac_reg[RA] = 0; d->mac_reg[RA + 1] = E1000_RAH_AV; |