@@ -316,12 +316,12 @@ static void kvm_arm_gic_put(GICState *s)
num_cpu = ((reg & 0xe0) >> 5) + 1;
if (num_irq < s->num_irq) {
- fprintf(stderr, "Restoring %u IRQs, but kernel supports max %d\n",
- s->num_irq, num_irq);
+ error_report("Restoring %u IRQs, but kernel supports max %d",
+ s->num_irq, num_irq);
abort();
} else if (num_cpu != s->num_cpu) {
- fprintf(stderr, "Restoring %u CPU interfaces, kernel only has %d\n",
- s->num_cpu, num_cpu);
+ error_report("Restoring %u CPU interfaces, kernel only has %d",
+ s->num_cpu, num_cpu);
/* Did we not create the VCPUs in the kernel yet? */
abort();
}
@@ -411,8 +411,8 @@ static void kvm_arm_gic_get(GICState *s)
s->num_cpu = ((reg & 0xe0) >> 5) + 1;
if (s->num_irq > GIC_MAXIRQ) {
- fprintf(stderr, "Too many IRQs reported from the kernel: %d\n",
- s->num_irq);
+ error_report("Too many IRQs reported from the kernel: %d",
+ s->num_irq);
abort();
}
@@ -539,8 +539,8 @@ static void omap2_inth_write(void *opaque, hwaddr addr,
/* TODO: Make a bitmap (or sizeof(char)map) of access privileges
* for every register, see Chapter 3 and 4 for privileged mode. */
if (value & 1)
- fprintf(stderr, "%s: protection mode enable attempt\n",
- __func__);
+ error_report("%s: protection mode enable attempt",
+ __func__);
return;
case 0x50: /* INTC_IDLE */
@@ -34,6 +34,7 @@
*
*/
#include "qemu/osdep.h"
+#include "qemu/error-report.h"
#include "hw/hw.h"
#include "hw/ppc/mac.h"
#include "hw/pci/pci.h"
@@ -150,8 +150,8 @@ static void kvm_openpic_region_add(MemoryListener *listener,
ret = ioctl(opp->fd, KVM_SET_DEVICE_ATTR, &attr);
if (ret < 0) {
- fprintf(stderr, "%s: %s %" PRIx64 "\n", __func__,
- strerror(errno), reg_base);
+ error_report("%s: %s %" PRIx64 "", __func__,
+ strerror(errno), reg_base);
}
}
@@ -184,8 +184,8 @@ static void kvm_openpic_region_del(MemoryListener *listener,
ret = ioctl(opp->fd, KVM_SET_DEVICE_ATTR, &attr);
if (ret < 0) {
- fprintf(stderr, "%s: %s %" PRIx64 "\n", __func__,
- strerror(errno), reg_base);
+ error_report("%s: %s %" PRIx64 "", __func__,
+ strerror(errno), reg_base);
}
}
@@ -83,7 +83,7 @@ static void flic_enable_pfault(KVMS390FLICState *flic)
rc = ioctl(flic->fd, KVM_SET_DEVICE_ATTR, &attr);
if (rc) {
- fprintf(stderr, "flic: couldn't enable pfault\n");
+ error_report("flic: couldn't enable pfault");
}
}
@@ -97,7 +97,7 @@ static void flic_disable_wait_pfault(KVMS390FLICState *flic)
rc = ioctl(flic->fd, KVM_SET_DEVICE_ATTR, &attr);
if (rc) {
- fprintf(stderr, "flic: couldn't disable pfault\n");
+ error_report("flic: couldn't disable pfault");
}
}