Skip to contentSkip to conversation

Disable the not fully implemented warning for e1000

PATCH Superseded Julien Duponchelle 2 participants 3 messages May 5, 2017 – May 15, 2017

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Disable the not fully implemented warning for e1000

Otherwise for image like CISCO IOSv you got a lot
of warning on the console preventing you to use
the VM because it's slow down the machine.

This fix:
https://bugs.launchpad.net/qemu/+bug/1673722

---
 hw/net/e1000.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
hw/net/e1000.c +7 -4
index f2e5072d27..095fd0133f 100644
@@ -35,6 +35,7 @@
 #include "sysemu/dma.h"
 #include "qemu/iov.h"
 #include "qemu/range.h"
+#include "qemu/log.h"
 
 #include "e1000x_common.h"
 
@@ -1264,8 +1265,9 @@ e1000_mmio_write(void *opaque, hwaddr addr, uint64_t val,
         if (!(mac_reg_access[index] & MAC_ACCESS_FLAG_NEEDED)
             || (s->compat_flags & (mac_reg_access[index] >> 2))) {
             if (mac_reg_access[index] & MAC_ACCESS_PARTIAL) {
-                DBGOUT(GENERAL, "Writing to register at offset: 0x%08x. "
-                       "It is not fully implemented.\n", index<<2);
+                qemu_log_mask(LOG_UNIMP, "e1000: "
+                        "Writing to register at offset: 0x%08x. "
+                        "It is not fully implemented.\n", index << 2);
             }
             macreg_writeops[index](s, index, val);
         } else {    /* "flag needed" bit is set, but the flag is not active */
@@ -1291,8 +1293,9 @@ e1000_mmio_read(void *opaque, hwaddr addr, unsigned size)
         if (!(mac_reg_access[index] & MAC_ACCESS_FLAG_NEEDED)
             || (s->compat_flags & (mac_reg_access[index] >> 2))) {
             if (mac_reg_access[index] & MAC_ACCESS_PARTIAL) {
-                DBGOUT(GENERAL, "Reading register at offset: 0x%08x. "
-                       "It is not fully implemented.\n", index<<2);
+                qemu_log_mask(LOG_UNIMP, "e1000: "
+                        "Reading register at offset: 0x%08x. "
+                        "It is not fully implemented.\n", index << 2);
             }
             return macreg_readops[index](s, index);
         } else {    /* "flag needed" bit is set, but the flag is not active */
Signature · 1 line
2.11.0 (Apple Git-81)
#1 lore raw

Hi Julien,

Quoted 25 lines · Julien Duponchelle

Otherwise for image like CISCO IOSv you got a lot
of warning on the console preventing you to use
the VM because it's slow down the machine.

This fix:
https://bugs.launchpad.net/qemu/+bug/1673722

---
 hw/net/e1000.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
hw/net/e1000.c +1 -0
index f2e5072d27..095fd0133f 100644
@@ -35,6 +35,7 @@
 #include "sysemu/dma.h"
 #include "qemu/iov.h"
 #include "qemu/range.h"
+#include "qemu/log.h"
 
 #include "e1000x_common.h"
 

hw/net/e1000.c e1000_mmio_write(void *opaque, hwaddr addr, uint64_t val, · line 1270

Quoted 8 lines
hw/net/e1000.c +3 -2
@@ -1264,8 +1265,9 @@ e1000_mmio_write(void *opaque, hwaddr addr, uint64_t val,
         if (!(mac_reg_access[index] & MAC_ACCESS_FLAG_NEEDED)
             || (s->compat_flags & (mac_reg_access[index] >> 2))) {
             if (mac_reg_access[index] & MAC_ACCESS_PARTIAL) {
-                DBGOUT(GENERAL, "Writing to register at offset: 0x%08x. "
-                       "It is not fully implemented.\n", index<<2);
+                qemu_log_mask(LOG_UNIMP, "e1000: "
+                        "Writing to register at offset: 0x%08x. "
+                        "It is not fully implemented.\n", index << 2);

trailing newline is no more necessary.

what about:

                qemu_log_mask(LOG_UNIMP, "%s: write to unimplemented "
                              "register addr=0x%05x val=0x%08" PRIx64,
                               __func__, index << 2, val);

hw/net/e1000.c e1000_mmio_read(void *opaque, hwaddr addr, unsigned size) · line 1298

Quoted 12 lines
hw/net/e1000.c +3 -2
             }
             macreg_writeops[index](s, index, val);
         } else {    /* "flag needed" bit is set, but the flag is not active */
@@ -1291,8 +1293,9 @@ e1000_mmio_read(void *opaque, hwaddr addr, unsigned size)
         if (!(mac_reg_access[index] & MAC_ACCESS_FLAG_NEEDED)
             || (s->compat_flags & (mac_reg_access[index] >> 2))) {
             if (mac_reg_access[index] & MAC_ACCESS_PARTIAL) {
-                DBGOUT(GENERAL, "Reading register at offset: 0x%08x. "
-                       "It is not fully implemented.\n", index<<2);
+                qemu_log_mask(LOG_UNIMP, "e1000: "
+                        "Reading register at offset: 0x%08x. "
+                        "It is not fully implemented.\n", index << 2);
                qemu_log_mask(LOG_UNIMP, "%s: read  to unimplemented "
                              "register addr=0x%05x" PRIx64, __func__,
                              index << 2);

hw/net/e1000.c e1000_mmio_read(void *opaque, hwaddr addr, unsigned size) · line 1301

Quoted 4 lines
hw/net/e1000.c +0 -0
             }
             return macreg_readops[index](s, index);
         } else {    /* "flag needed" bit is set, but the flag is not active */

Regard,

Phil.

#2 lore raw

Hi Julien,

Quoted 25 lines · Julien Duponchelle
Quoted 24 lines

Otherwise for image like CISCO IOSv you got a lot
of warning on the console preventing you to use
the VM because it's slow down the machine.

This fix:
https://bugs.launchpad.net/qemu/+bug/1673722

---
 hw/net/e1000.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
hw/net/e1000.c +1 -0
index f2e5072d27..095fd0133f 100644
@@ -35,6 +35,7 @@
 #include "sysemu/dma.h"
 #include "qemu/iov.h"
 #include "qemu/range.h"
+#include "qemu/log.h"
 
 #include "e1000x_common.h"
 
Quoted 13 lines

hw/net/e1000.c e1000_mmio_write(void *opaque, hwaddr addr, uint64_t val, · line 1270

Quoted 11 lines
hw/net/e1000.c +0 -1
@@ -1264,8 +1265,9 @@ e1000_mmio_write(void *opaque, hwaddr addr,
 uint64_t val,
         if (!(mac_reg_access[index] & MAC_ACCESS_FLAG_NEEDED)
             || (s->compat_flags & (mac_reg_access[index] >> 2))) {
             if (mac_reg_access[index] & MAC_ACCESS_PARTIAL) {
-                DBGOUT(GENERAL, "Writing to register at offset:

0x%08x. "

hw/net/e1000.c +3 -1
-                       "It is not fully implemented.\n", index<<2);
+                qemu_log_mask(LOG_UNIMP, "e1000: "
+                        "Writing to register at offset: 0x%08x. "
+                        "It is not fully implemented.\n", index << 2);

trailing newline is no more necessary.

I mistaken with error_report(), qemu_log_mask() do use trailing newline, sorry!

Quoted 34 lines

what about:

                qemu_log_mask(LOG_UNIMP, "%s: write to unimplemented "
                              "register addr=0x%05x val=0x%08" PRIx64,
                               __func__, index << 2, val);
Quoted 5 lines
             }
             macreg_writeops[index](s, index, val);
         } else {    /* "flag needed" bit is set, but the flag is not

active */

hw/net/e1000.c e1000_mmio_read(void *opaque, hwaddr addr, · line 1299

Quoted 9 lines
hw/net/e1000.c +3 -2
@@ -1291,8 +1293,9 @@ e1000_mmio_read(void *opaque, hwaddr addr,
 unsigned size)
         if (!(mac_reg_access[index] & MAC_ACCESS_FLAG_NEEDED)
             || (s->compat_flags & (mac_reg_access[index] >> 2))) {
             if (mac_reg_access[index] & MAC_ACCESS_PARTIAL) {
-                DBGOUT(GENERAL, "Reading register at offset: 0x%08x. "
-                       "It is not fully implemented.\n", index<<2);
+                qemu_log_mask(LOG_UNIMP, "e1000: "
+                        "Reading register at offset: 0x%08x. "
+                        "It is not fully implemented.\n", index << 2);
                qemu_log_mask(LOG_UNIMP, "%s: read  to unimplemented "
                              "register addr=0x%05x" PRIx64, __func__,
                              index << 2);
Quoted 5 lines
hw/net/e1000.c +0 -0
             }
             return macreg_readops[index](s, index);
         } else {    /* "flag needed" bit is set, but the flag is not

active */

Regard,

Phil.