ioport: do not use CPU_LOG_IOPORT

These messages are disabled by default; a perfect usecase for tracepoints,
which in fact already exist. Add the missing information to them and
stop using qemu_log_mask.

Backports commit 6f94b7d97f7e0e486a70fb06b703442e2c04a29a from qemu
This commit is contained in:
Paolo Bonzini 2018-02-17 14:59:32 -05:00 committed by Lioncash
parent 2e6770c643
commit c2c3a800ad
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -33,14 +33,6 @@
#include "uc_priv.h"
//#define DEBUG_IOPORT
#ifdef DEBUG_IOPORT
# define LOG_IOPORT(...) qemu_log_mask(CPU_LOG_IOPORT, ## __VA_ARGS__)
#else
# define LOG_IOPORT(...) do { } while (0)
#endif
typedef struct MemoryRegionPortioList {
MemoryRegion mr;
void *portio_opaque;
@ -81,7 +73,8 @@ const MemoryRegionOps unassigned_io_ops = {
void cpu_outb(struct uc_struct *uc, pio_addr_t addr, uint8_t val)
{
//LOG_IOPORT("outb: %04"FMT_pioaddr" %02"PRIx8"\n", addr, val);
// Unicorn: commented out
//trace_cpu_out(addr, 'b', val);
// Unicorn: call registered OUT callbacks
struct hook *hook;
HOOK_FOREACH_VAR_DECLARE;
@ -93,7 +86,8 @@ void cpu_outb(struct uc_struct *uc, pio_addr_t addr, uint8_t val)
void cpu_outw(struct uc_struct *uc, pio_addr_t addr, uint16_t val)
{
//LOG_IOPORT("outw: %04"FMT_pioaddr" %04"PRIx16"\n", addr, val);
// Unicorn: commented out
//trace_cpu_out(addr, 'w', val);
// Unicorn: call registered OUT callbacks
struct hook *hook;
HOOK_FOREACH_VAR_DECLARE;
@ -105,7 +99,8 @@ void cpu_outw(struct uc_struct *uc, pio_addr_t addr, uint16_t val)
void cpu_outl(struct uc_struct *uc, pio_addr_t addr, uint32_t val)
{
//LOG_IOPORT("outl: %04"FMT_pioaddr" %08"PRIx32"\n", addr, val);
// Unicorn: commented out
//trace_cpu_out(addr, 'l', val);
// Unicorn: call registered OUT callbacks
struct hook *hook;
HOOK_FOREACH_VAR_DECLARE;
@ -117,7 +112,8 @@ void cpu_outl(struct uc_struct *uc, pio_addr_t addr, uint32_t val)
uint8_t cpu_inb(struct uc_struct *uc, pio_addr_t addr)
{
//LOG_IOPORT("inb : %04"FMT_pioaddr" %02"PRIx8"\n", addr, val);
// Unicorn: commented out
//trace_cpu_in(addr, 'b', val);
// Unicorn: call registered IN callbacks
struct hook *hook;
HOOK_FOREACH_VAR_DECLARE;
@ -131,7 +127,8 @@ uint8_t cpu_inb(struct uc_struct *uc, pio_addr_t addr)
uint16_t cpu_inw(struct uc_struct *uc, pio_addr_t addr)
{
//LOG_IOPORT("inw : %04"FMT_pioaddr" %04"PRIx16"\n", addr, val);
// Unicorn: commented out
//trace_cpu_in(addr, 'w', val);
// Unicorn: call registered IN callbacks
struct hook *hook;
HOOK_FOREACH_VAR_DECLARE;
@ -145,7 +142,8 @@ uint16_t cpu_inw(struct uc_struct *uc, pio_addr_t addr)
uint32_t cpu_inl(struct uc_struct *uc, pio_addr_t addr)
{
//LOG_IOPORT("inl : %04"FMT_pioaddr" %08"PRIx32"\n", addr, val);
// Unicorn: commented out
//trace_cpu_in(addr, 'l', val);
// Unicorn: call registered IN callbacks
struct hook *hook;
HOOK_FOREACH_VAR_DECLARE;