[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 31/46] hw/i386/vmport: replace fprintf() by trace eve
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 31/46] hw/i386/vmport: replace fprintf() by trace events or LOG_UNIMP |
Date: |
Wed, 20 Dec 2017 18:14:43 +0100 |
From: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Message-Id: <address@hidden>
[Replace unknown command tracepoint with LOG_UNIMP, add
generic tracepoint for vmport commands. - Paolo]
Signed-off-by: Paolo Bonzini <address@hidden>
---
hw/i386/trace-events | 4 ++++
hw/i386/vmport.c | 14 +++++---------
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/hw/i386/trace-events b/hw/i386/trace-events
index d43b4b6..22d4464 100644
--- a/hw/i386/trace-events
+++ b/hw/i386/trace-events
@@ -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_command(unsigned char command) "command: 0x%02x"
diff --git a/hw/i386/vmport.c b/hw/i386/vmport.c
index eb880c6..9b8c688 100644
--- a/hw/i386/vmport.c
+++ b/hw/i386/vmport.c
@@ -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;
}
@@ -76,13 +76,9 @@ static uint64_t vmport_ioport_read(void *opaque, hwaddr addr,
}
command = env->regs[R_ECX];
- if (command >= VMPORT_ENTRIES) {
- return eax;
- }
- if (!s->func[command]) {
-#ifdef VMPORT_DEBUG
- fprintf(stderr, "vmport: unknown command %x\n", command);
-#endif
+ trace_vmport_command(command);
+ if (command >= VMPORT_ENTRIES || !s->func[command]) {
+ qemu_log_mask(LOG_UNIMP, "vmport: unknown command %x\n", command);
return eax;
}
--
1.8.3.1
- [Qemu-devel] [PULL 16/46] sockets: remove obsolete code that updated listen address, (continued)
- [Qemu-devel] [PULL 16/46] sockets: remove obsolete code that updated listen address, Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 20/46] tests/boot-serial-test: Add support for the mcf5208evb board, Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 24/46] tests/boot-serial-test: Add support for the raspi2 machine, Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 23/46] tests/boot-serial-test: Add a test for the moxiesim machine, Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 26/46] cpu: suffix cpu address spaces with cpu index, Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 25/46] cpu: refactor cpu_address_space_init(), Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 29/46] exec: Don't reuse unassigned_mem_ops for io_mem_rom, Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 27/46] block/iscsi: dont leave allocmap in an invalid state on UNMAP failure, Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 28/46] block/iscsi: only report an iSCSI Failure if we don't handle it gracefully, Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 30/46] hw/mips/boston: Remove workaround for writes to ROM aborting, Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 31/46] hw/i386/vmport: replace fprintf() by trace events or LOG_UNIMP,
Paolo Bonzini <=
- [Qemu-devel] [PULL 33/46] scsi: replace hex constants with #defines, Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 32/46] scsi: provide general-purpose functions to manage sense data, Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 37/46] i8259: generalize statistics into common code, Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 35/46] i8259: convert DPRINTFs into trace, Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 38/46] kvm-i8259: support "info pic" and "info irq", Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 36/46] i8259: use DEBUG_IRQ_COUNT always, Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 34/46] Remove legacy -no-kvm-pit option, Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 39/46] i8259: move TYPE_INTERRUPT_STATS_PROVIDER upper, Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 40/46] checkpatch: volatile with a comment or sig_atomic_t is okay, Paolo Bonzini, 2017/12/20