Port-xen archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Watchdog timeout in NetBSD HEAD based domu (HVM)
Hi,
I have a screenshot of a NetBSD amd64 dom0 and a NetBSD amd64 Domu
running in HVM mode.
the trouble is, the re0 interface on the domu keeps posting watchdog timeout.
I wouldn't waste my time trying to get the emulated re working. It
doesn't have DMA, anyway.
Have you tried le or pcn? I've had good luck with the emulated PCnet
using HVM for FreeBSD DomUs with NetBSD dom0s.
Ok, while in this case, the original poster seems to have access to the dom0
and thus probably is able to reconfigure the emulated hardware, this may not
always be the case. E.g. on my virtual server, I'm stuck with using the re
driver. In order to get (somewhat) usable performance out of this, I had to
patch the driver (see attached).
Ciao,
Wolfgang
--
Wolfgang%Solfrank.net@localhost Wolfgang Solfrank
Index: rtl8169.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/rtl8169.c,v
retrieving revision 1.129
diff -u -r1.129 rtl8169.c
--- rtl8169.c 19 Jan 2010 22:06:25 -0000 1.129
+++ rtl8169.c 18 Mar 2010 15:00:05 -0000
@@ -110,6 +110,10 @@
* jumbo frames larger than 7.5K, so the max MTU possible with this
* driver is 7500 bytes.
*/
+/*
+ * Support for timer interrupts isn't implemented in (most versions of) QEMU!!!
+ */
+#define RTK_QEMU
#include <sys/param.h>
@@ -1362,7 +1366,9 @@
* This is done in case the transmitter has gone idle.
*/
if (sc->re_ldata.re_txq_free < RE_TX_QLEN) {
+#ifndef RTK_QEMU
CSR_WRITE_4(sc, RTK_TIMERCNT, 1);
+#endif
if ((sc->sc_quirk & RTKQ_PCIE) != 0) {
/*
* Some chips will ignore a second TX request
@@ -1427,8 +1433,13 @@
if (status & (RTK_ISR_RX_OK | RTK_ISR_RX_ERR))
re_rxeof(sc);
- if (status & (RTK_ISR_TIMEOUT_EXPIRED | RTK_ISR_TX_ERR |
- RTK_ISR_TX_DESC_UNAVAIL))
+ if (status & (
+#ifdef RTK_QEMU
+ RTK_ISR_TX_OK |
+#else
+ RTK_ISR_TIMEOUT_EXPIRED |
+#endif
+ RTK_ISR_TX_ERR | RTK_ISR_TX_DESC_UNAVAIL))
re_txeof(sc);
if (status & RTK_ISR_SYSTEM_ERR) {
@@ -1689,6 +1700,7 @@
else
CSR_WRITE_1(sc, RTK_GTXSTART, RTK_TXSTART_START);
+#ifndef RTK_QEMU
/*
* Use the countdown timer for interrupt moderation.
* 'TX done' interrupts are disabled. Instead, we reset the
@@ -1698,6 +1710,7 @@
* the timer count is reset to 0.
*/
CSR_WRITE_4(sc, RTK_TIMERCNT, 1);
+#endif
/*
* Set a timeout in case the chip goes out to lunch.
@@ -1851,6 +1864,7 @@
CSR_WRITE_1(sc, RTK_COMMAND, RTK_CMD_TX_ENB | RTK_CMD_RX_ENB);
#endif
+#ifndef RTK_QEMU
/*
* Initialize the timer interrupt register so that
* a timer interrupt will be generated once the timer
@@ -1864,6 +1878,9 @@
else {
CSR_WRITE_4(sc, RTK_TIMERINT_8169, 0x800);
+#else
+ if ((sc->sc_quirk & RTKQ_8139CPLUS) == 0) {
+#endif
/*
* For 8169 gigE NICs, set the max allowed RX packet
* size so we can receive jumbo frames.
Index: rtl81x9reg.h
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/rtl81x9reg.h,v
retrieving revision 1.40
diff -u -r1.40 rtl81x9reg.h
--- rtl81x9reg.h 5 Sep 2009 03:50:49 -0000 1.40
+++ rtl81x9reg.h 18 Mar 2010 15:00:05 -0000
@@ -232,10 +232,17 @@
RTK_ISR_RX_OVERRUN|RTK_ISR_PKT_UNDERRUN|RTK_ISR_FIFO_OFLOW| \
RTK_ISR_PCS_TIMEOUT|RTK_ISR_SYSTEM_ERR)
+#ifdef RTK_QEMU
+#define RTK_INTRS_CPLUS \
+ (RTK_ISR_RX_OK|RTK_ISR_RX_ERR|RTK_ISR_TX_ERR|RTK_ISR_TX_OK| \
+ RTK_ISR_RX_OVERRUN|RTK_ISR_PKT_UNDERRUN|RTK_ISR_FIFO_OFLOW| \
+ RTK_ISR_PCS_TIMEOUT|RTK_ISR_SYSTEM_ERR|RTK_ISR_TIMEOUT_EXPIRED)
+#else
#define RTK_INTRS_CPLUS \
(RTK_ISR_RX_OK|RTK_ISR_RX_ERR|RTK_ISR_TX_ERR| \
RTK_ISR_RX_OVERRUN|RTK_ISR_PKT_UNDERRUN|RTK_ISR_FIFO_OFLOW| \
RTK_ISR_PCS_TIMEOUT|RTK_ISR_SYSTEM_ERR|RTK_ISR_TIMEOUT_EXPIRED)
+#endif
/*
Home |
Main Index |
Thread Index |
Old Index