Skip to contentSkip to conversation

remove i386/pc dependency from non-PC world (part 1) fix

PATCH In review Philippe Mathieu-Daudé 2 participants 4 messages Dec 15, 2017

lore
Share & tools
lore
#0 lore raw

v5 cover remove i386/pc dependency from non-PC world (part 1) fix

Fix patch 42 from previous series (v4) so patchew can build, and if a maintainer is willing to take the previous series with the last 2 patches, I don't need to respam a v6.

Regards,

Phil.

Based-on: [email protected]
(remove i386/pc dependency from non-PC world v4)

Philippe Mathieu-Daudé (2):
hw/i386/vmport: replace fprintf() by trace events
misc: drop old i386 dependency

 hw/char/debugcon.c      | 1 -
 hw/i386/vmport.c        | 8 +++-----
 hw/intc/lm32_pic.c      | 1 -
 hw/moxie/moxiesim.c     | 1 -
 hw/sparc/sun4m.c        | 1 -
 hw/watchdog/wdt_ib700.c | 1 -
 hw/i386/trace-events    | 4 ++++
 7 files changed, 7 insertions(+), 10 deletions(-)
Signature · 1 line
2.15.1
#1 lore raw

PATCH v5 1/2 hw/i386/vmport: replace fprintf() by trace events

---
 hw/i386/vmport.c     | 8 +++-----
 hw/i386/trace-events | 4 ++++
 2 files changed, 7 insertions(+), 5 deletions(-)
hw/i386/vmport.c +3 -5
index eb880c6def..b5585a009a 100644
@@ -27,8 +27,7 @@
 #include "hw/i386/pc.h"
 #include "sysemu/hw_accel.h"
 #include "hw/qdev.h"
-
-/* #define VMPORT_DEBUG */
+#include "trace.h"
 
 #define VMPORT_CMD_GETVERSION 0x0a
 #define VMPORT_CMD_GETRAMSIZE 0x14
@@ -54,6 +53,7 @@ void vmport_register(unsigned char command, VMPortReadFunc *func, void *opaque)
         return;
     }
 
+    trace_vmport_register(command, func, opaque);
     port_state->func[command] = func;
     port_state->opaque[command] = opaque;
 }
@@ -80,9 +80,7 @@ static uint64_t vmport_ioport_read(void *opaque, hwaddr addr,
         return eax;
     }
     if (!s->func[command]) {
-#ifdef VMPORT_DEBUG
-        fprintf(stderr, "vmport: unknown command %x\n", command);
-#endif
+        trace_vmport_ioport_read_unknown_command(command, addr);
         return eax;
     }
 
hw/i386/trace-events +4 -0
index d43b4b6cd3..150549c15e 100644
@@ -113,3 +113,7 @@ amdvi_mode_invalid(uint8_t level, uint64_t addr)"error: translation level 0x%"PR
 amdvi_page_fault(uint64_t addr) "error: page fault accessing guest physical address 0x%"PRIx64
 amdvi_iotlb_hit(uint8_t bus, uint8_t slot, uint8_t func, uint64_t addr, uint64_t txaddr) "hit iotlb devid %02x:%02x.%x gpa 0x%"PRIx64" hpa 0x%"PRIx64
 amdvi_translation_result(uint8_t bus, uint8_t slot, uint8_t func, uint64_t addr, uint64_t txaddr) "devid: %02x:%02x.%x gpa 0x%"PRIx64" hpa 0x%"PRIx64
+
+# hw/i386/vmport.c
+vmport_register(unsigned char command, void *func, void *opaque) "command: 0x%02x func: %p opaque: %p"
+vmport_ioport_read_unknown_command(unsigned char command, hwaddr addr) "unknown command: 0x%02x addr: 0x%" HWADDR_PRIx
Signature · 1 line
2.15.1
#2 lore raw

PATCH v5 2/2 misc: drop old i386 dependency

In reply to Philippe Mathieu-Daudé
---
 hw/char/debugcon.c      | 1 -
 hw/intc/lm32_pic.c      | 1 -
 hw/moxie/moxiesim.c     | 1 -
 hw/sparc/sun4m.c        | 1 -
 hw/watchdog/wdt_ib700.c | 1 -
 5 files changed, 5 deletions(-)
hw/char/debugcon.c +0 -1
index 95ccec6f8b..e2abc61b04 100644
@@ -29,7 +29,6 @@
 #include "hw/hw.h"
 #include "chardev/char-fe.h"
 #include "hw/isa/isa.h"
-#include "hw/i386/pc.h"
 
 #define TYPE_ISA_DEBUGCON_DEVICE "isa-debugcon"
 #define ISA_DEBUGCON_DEVICE(obj) \
hw/intc/lm32_pic.c +0 -1
index 09e15115fb..db6c7afc2f 100644
@@ -20,7 +20,6 @@
 #include "qemu/osdep.h"
 
 #include "hw/hw.h"
-#include "hw/i386/pc.h"
 #include "monitor/monitor.h"
 #include "hw/sysbus.h"
 #include "trace.h"
hw/moxie/moxiesim.c +0 -1
index 3ba58481d0..3c3ba9d8c5 100644
@@ -30,7 +30,6 @@
 #include "cpu.h"
 #include "hw/sysbus.h"
 #include "hw/hw.h"
-#include "hw/i386/pc.h"
 #include "hw/isa/isa.h"
 #include "net/net.h"
 #include "sysemu/sysemu.h"
hw/sparc/sun4m.c +0 -1
index 24c2b8a555..e71648404c 100644
@@ -36,7 +36,6 @@
 #include "net/net.h"
 #include "hw/boards.h"
 #include "hw/scsi/esp.h"
-#include "hw/i386/pc.h"
 #include "hw/isa/isa.h"
 #include "hw/nvram/sun_nvram.h"
 #include "hw/nvram/chrp_nvram.h"
hw/watchdog/wdt_ib700.c +0 -1
index 532afe89e7..d045032bf4 100644
@@ -25,7 +25,6 @@
 #include "sysemu/watchdog.h"
 #include "hw/hw.h"
 #include "hw/isa/isa.h"
-#include "hw/i386/pc.h"
 
 /*#define IB700_DEBUG 1*/
 
Signature · 1 line
2.15.1
#3 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 7 lines · Philippe Mathieu-Daudé

Fix patch 42 from previous series (v4) so patchew can build, and if a maintainer is willing to take the previous series with the last 2 patches, I don't need to respam a v6.

Regards,

Phil.

I tweaked a bit patch 1 to use LOG_UNIMP instead, and queued these two patches.

Paolo

Quoted 16 lines

Based-on: [email protected]
(remove i386/pc dependency from non-PC world v4)

Philippe Mathieu-Daudé (2):
hw/i386/vmport: replace fprintf() by trace events
misc: drop old i386 dependency

 hw/char/debugcon.c      | 1 -
 hw/i386/vmport.c        | 8 +++-----
 hw/intc/lm32_pic.c      | 1 -
 hw/moxie/moxiesim.c     | 1 -
 hw/sparc/sun4m.c        | 1 -
 hw/watchdog/wdt_ib700.c | 1 -
 hw/i386/trace-events    | 4 ++++
 7 files changed, 7 insertions(+), 10 deletions(-)