aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure2
-rw-r--r--hw/pci/msix.c2
-rw-r--r--hw/vfio/amd-xgbe.c2
-rw-r--r--hw/vfio/ap.c2
-rw-r--r--hw/vfio/calxeda-xgmac.c2
-rw-r--r--hw/vfio/ccw.c2
-rw-r--r--hw/vfio/pci.c8
-rw-r--r--hw/vfio/platform.c6
-rw-r--r--hw/virtio/trace-events7
-rw-r--r--hw/virtio/virtio-mmio.c44
-rw-r--r--include/hw/pci/msix.h2
-rw-r--r--migration/migration.c2
-rw-r--r--roms/Makefile6
13 files changed, 47 insertions, 40 deletions
diff --git a/configure b/configure
index d2fc346302..cef51b2a0b 100755
--- a/configure
+++ b/configure
@@ -1745,7 +1745,7 @@ disabled with --disable-FEATURE, default is enabled if available:
gcrypt libgcrypt cryptography support
auth-pam PAM access control
sdl SDL UI
- sdl_image SDL Image support for icons
+ sdl-image SDL Image support for icons
gtk gtk UI
vte vte support for the gtk UI
curses curses UI
diff --git a/hw/pci/msix.c b/hw/pci/msix.c
index 4e336416a7..d39dcf32e8 100644
--- a/hw/pci/msix.c
+++ b/hw/pci/msix.c
@@ -24,8 +24,6 @@
#include "qapi/error.h"
#include "trace.h"
-#define MSIX_CAP_LENGTH 12
-
/* MSI enable bit and maskall bit are in byte 1 in FLAGS register */
#define MSIX_CONTROL_OFFSET (PCI_MSIX_FLAGS + 1)
#define MSIX_ENABLE_MASK (PCI_MSIX_FLAGS_ENABLE >> 8)
diff --git a/hw/vfio/amd-xgbe.c b/hw/vfio/amd-xgbe.c
index ee64a3b4a2..1b06c0f3ea 100644
--- a/hw/vfio/amd-xgbe.c
+++ b/hw/vfio/amd-xgbe.c
@@ -26,7 +26,7 @@ static void amd_xgbe_realize(DeviceState *dev, Error **errp)
}
static const VMStateDescription vfio_platform_amd_xgbe_vmstate = {
- .name = TYPE_VFIO_AMD_XGBE,
+ .name = "vfio-amd-xgbe",
.unmigratable = 1,
};
diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c
index d8b79ebe53..564751650f 100644
--- a/hw/vfio/ap.c
+++ b/hw/vfio/ap.c
@@ -155,7 +155,7 @@ static void vfio_ap_reset(DeviceState *dev)
}
static const VMStateDescription vfio_ap_vmstate = {
- .name = VFIO_AP_DEVICE_TYPE,
+ .name = "vfio-ap",
.unmigratable = 1,
};
diff --git a/hw/vfio/calxeda-xgmac.c b/hw/vfio/calxeda-xgmac.c
index e7767c4b02..6cc608b6ca 100644
--- a/hw/vfio/calxeda-xgmac.c
+++ b/hw/vfio/calxeda-xgmac.c
@@ -26,7 +26,7 @@ static void calxeda_xgmac_realize(DeviceState *dev, Error **errp)
}
static const VMStateDescription vfio_platform_calxeda_xgmac_vmstate = {
- .name = TYPE_VFIO_CALXEDA_XGMAC,
+ .name = "vfio-calxeda-xgmac",
.unmigratable = 1,
};
diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c
index 31dd3a2a87..d9e39552e2 100644
--- a/hw/vfio/ccw.c
+++ b/hw/vfio/ccw.c
@@ -468,7 +468,7 @@ static Property vfio_ccw_properties[] = {
};
static const VMStateDescription vfio_ccw_vmstate = {
- .name = TYPE_VFIO_CCW,
+ .name = "vfio-ccw",
.unmigratable = 1,
};
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index 8cecb53d5c..8e555db12e 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -35,11 +35,11 @@
#include "trace.h"
#include "qapi/error.h"
-#define MSIX_CAP_LENGTH 12
-
#define TYPE_VFIO_PCI "vfio-pci"
#define PCI_VFIO(obj) OBJECT_CHECK(VFIOPCIDevice, obj, TYPE_VFIO_PCI)
+#define TYPE_VIFO_PCI_NOHOTPLUG "vfio-pci-nohotplug"
+
static void vfio_disable_interrupts(VFIOPCIDevice *vdev);
static void vfio_mmap_set_enabled(VFIOPCIDevice *vdev, bool enabled);
@@ -3304,8 +3304,8 @@ static void vfio_pci_nohotplug_dev_class_init(ObjectClass *klass, void *data)
}
static const TypeInfo vfio_pci_nohotplug_dev_info = {
- .name = "vfio-pci-nohotplug",
- .parent = "vfio-pci",
+ .name = TYPE_VIFO_PCI_NOHOTPLUG,
+ .parent = TYPE_VFIO_PCI,
.instance_size = sizeof(VFIOPCIDevice),
.class_init = vfio_pci_nohotplug_dev_class_init,
};
diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c
index 398db38f14..d52d6552e0 100644
--- a/hw/vfio/platform.c
+++ b/hw/vfio/platform.c
@@ -72,7 +72,7 @@ static VFIOINTp *vfio_init_intp(VFIODevice *vbasedev,
g_free(intp->interrupt);
g_free(intp);
error_setg_errno(errp, -ret,
- "failed to initialize trigger eventd notifier");
+ "failed to initialize trigger eventfd notifier");
return NULL;
}
if (vfio_irq_is_automasked(intp)) {
@@ -84,7 +84,7 @@ static VFIOINTp *vfio_init_intp(VFIODevice *vbasedev,
g_free(intp->unmask);
g_free(intp);
error_setg_errno(errp, -ret,
- "failed to initialize resample eventd notifier");
+ "failed to initialize resample eventfd notifier");
return NULL;
}
}
@@ -697,7 +697,7 @@ out:
}
static const VMStateDescription vfio_platform_vmstate = {
- .name = TYPE_VFIO_PLATFORM,
+ .name = "vfio-platform",
.unmigratable = 1,
};
diff --git a/hw/virtio/trace-events b/hw/virtio/trace-events
index 60c649c4bc..e28ba48da6 100644
--- a/hw/virtio/trace-events
+++ b/hw/virtio/trace-events
@@ -46,3 +46,10 @@ virtio_balloon_handle_output(const char *name, uint64_t gpa) "section name: %s g
virtio_balloon_get_config(uint32_t num_pages, uint32_t actual) "num_pages: %d actual: %d"
virtio_balloon_set_config(uint32_t actual, uint32_t oldactual) "actual: %d oldactual: %d"
virtio_balloon_to_target(uint64_t target, uint32_t num_pages) "balloon target: 0x%"PRIx64" num_pages: %d"
+
+# virtio-mmio.c
+virtio_mmio_read(uint64_t offset) "virtio_mmio_read offset 0x%" PRIx64
+virtio_mmio_write_offset(uint64_t offset, uint64_t value) "virtio_mmio_write offset 0x%" PRIx64 " value 0x%" PRIx64
+virtio_mmio_guest_page(uint64_t size, int shift) "guest page size 0x%" PRIx64 " shift %d"
+virtio_mmio_queue_write(uint64_t value, int max_size) "mmio_queue write 0x%" PRIx64 " max %d"
+virtio_mmio_setting_irq(int level) "virtio_mmio setting IRQ %d"
diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c
index 5807aa87fe..96c762f0bf 100644
--- a/hw/virtio/virtio-mmio.c
+++ b/hw/virtio/virtio-mmio.c
@@ -27,16 +27,8 @@
#include "sysemu/kvm.h"
#include "hw/virtio/virtio-bus.h"
#include "qemu/error-report.h"
-
-/* #define DEBUG_VIRTIO_MMIO */
-
-#ifdef DEBUG_VIRTIO_MMIO
-
-#define DPRINTF(fmt, ...) \
-do { printf("virtio_mmio: " fmt , ## __VA_ARGS__); } while (0)
-#else
-#define DPRINTF(fmt, ...) do {} while (0)
-#endif
+#include "qemu/log.h"
+#include "trace.h"
/* QOM macros */
/* virtio-mmio-bus */
@@ -107,7 +99,7 @@ static uint64_t virtio_mmio_read(void *opaque, hwaddr offset, unsigned size)
VirtIOMMIOProxy *proxy = (VirtIOMMIOProxy *)opaque;
VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus);
- DPRINTF("virtio_mmio_read offset 0x%x\n", (int)offset);
+ trace_virtio_mmio_read(offset);
if (!vdev) {
/* If no backend is present, we treat most registers as
@@ -144,7 +136,9 @@ static uint64_t virtio_mmio_read(void *opaque, hwaddr offset, unsigned size)
}
}
if (size != 4) {
- DPRINTF("wrong size access to register!\n");
+ qemu_log_mask(LOG_GUEST_ERROR,
+ "%s: wrong size access to register!\n",
+ __func__);
return 0;
}
switch (offset) {
@@ -182,10 +176,12 @@ static uint64_t virtio_mmio_read(void *opaque, hwaddr offset, unsigned size)
case VIRTIO_MMIO_QUEUE_ALIGN:
case VIRTIO_MMIO_QUEUE_NOTIFY:
case VIRTIO_MMIO_INTERRUPT_ACK:
- DPRINTF("read of write-only register\n");
+ qemu_log_mask(LOG_GUEST_ERROR,
+ "%s: read of write-only register\n",
+ __func__);
return 0;
default:
- DPRINTF("bad register offset\n");
+ qemu_log_mask(LOG_GUEST_ERROR, "%s: bad register offset\n", __func__);
return 0;
}
return 0;
@@ -197,8 +193,7 @@ static void virtio_mmio_write(void *opaque, hwaddr offset, uint64_t value,
VirtIOMMIOProxy *proxy = (VirtIOMMIOProxy *)opaque;
VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus);
- DPRINTF("virtio_mmio_write offset 0x%x value 0x%" PRIx64 "\n",
- (int)offset, value);
+ trace_virtio_mmio_write_offset(offset, value);
if (!vdev) {
/* If no backend is present, we just make all registers
@@ -226,7 +221,9 @@ static void virtio_mmio_write(void *opaque, hwaddr offset, uint64_t value,
return;
}
if (size != 4) {
- DPRINTF("wrong size access to register!\n");
+ qemu_log_mask(LOG_GUEST_ERROR,
+ "%s: wrong size access to register!\n",
+ __func__);
return;
}
switch (offset) {
@@ -246,8 +243,7 @@ static void virtio_mmio_write(void *opaque, hwaddr offset, uint64_t value,
if (proxy->guest_page_shift > 31) {
proxy->guest_page_shift = 0;
}
- DPRINTF("guest page size %" PRIx64 " shift %d\n", value,
- proxy->guest_page_shift);
+ trace_virtio_mmio_guest_page(value, proxy->guest_page_shift);
break;
case VIRTIO_MMIO_QUEUE_SEL:
if (value < VIRTIO_QUEUE_MAX) {
@@ -255,7 +251,7 @@ static void virtio_mmio_write(void *opaque, hwaddr offset, uint64_t value,
}
break;
case VIRTIO_MMIO_QUEUE_NUM:
- DPRINTF("mmio_queue write %d max %d\n", (int)value, VIRTQUEUE_MAX_SIZE);
+ trace_virtio_mmio_queue_write(value, VIRTQUEUE_MAX_SIZE);
virtio_queue_set_num(vdev, vdev->queue_sel, value);
/* Note: only call this function for legacy devices */
virtio_queue_update_rings(vdev, vdev->queue_sel);
@@ -303,11 +299,13 @@ static void virtio_mmio_write(void *opaque, hwaddr offset, uint64_t value,
case VIRTIO_MMIO_DEVICE_FEATURES:
case VIRTIO_MMIO_QUEUE_NUM_MAX:
case VIRTIO_MMIO_INTERRUPT_STATUS:
- DPRINTF("write to readonly register\n");
+ qemu_log_mask(LOG_GUEST_ERROR,
+ "%s: write to readonly register\n",
+ __func__);
break;
default:
- DPRINTF("bad register offset\n");
+ qemu_log_mask(LOG_GUEST_ERROR, "%s: bad register offset\n", __func__);
}
}
@@ -327,7 +325,7 @@ static void virtio_mmio_update_irq(DeviceState *opaque, uint16_t vector)
return;
}
level = (atomic_read(&vdev->isr) != 0);
- DPRINTF("virtio_mmio setting IRQ %d\n", level);
+ trace_virtio_mmio_setting_irq(level);
qemu_set_irq(proxy->irq, level);
}
diff --git a/include/hw/pci/msix.h b/include/hw/pci/msix.h
index 1f27658d35..08acfa836e 100644
--- a/include/hw/pci/msix.h
+++ b/include/hw/pci/msix.h
@@ -4,6 +4,8 @@
#include "qemu-common.h"
#include "hw/pci/pci.h"
+#define MSIX_CAP_LENGTH 12
+
void msix_set_message(PCIDevice *dev, int vector, MSIMessage msg);
MSIMessage msix_get_message(PCIDevice *dev, unsigned int vector);
int msix_init(PCIDevice *dev, unsigned short nentries,
diff --git a/migration/migration.c b/migration/migration.c
index d0a0f68f11..2865ae3fa9 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -1728,7 +1728,7 @@ int migrate_add_blocker(Error *reason, Error **errp)
if (only_migratable) {
error_propagate_prepend(errp, error_copy(reason),
"disallowing migration blocker "
- "(--only_migratable) for: ");
+ "(--only-migratable) for: ");
return -EACCES;
}
diff --git a/roms/Makefile b/roms/Makefile
index 0ce84a45ad..078d3fb705 100644
--- a/roms/Makefile
+++ b/roms/Makefile
@@ -62,6 +62,8 @@ default:
@echo " u-boot.e500 -- update u-boot.e500"
@echo " u-boot.sam460 -- update u-boot.sam460"
@echo " efi -- update UEFI (edk2) platform firmware"
+ @echo " clean -- delete the files generated by the previous" \
+ "build targets"
bios: build-seabios-config-seabios-128k build-seabios-config-seabios-256k
cp seabios/builds/seabios-128k/bios.bin ../pc-bios/bios.bin
@@ -121,8 +123,8 @@ build-efi-roms: build-pxe-roms
$(patsubst %,bin-i386-efi/%.efidrv,$(pxerom_targets)) \
$(patsubst %,bin-x86_64-efi/%.efidrv,$(pxerom_targets))
-# Build scripts can pass compiler/linker flags to the EDK2 build tools
-# via the EDK2_BASETOOLS_OPTFLAGS (CPPFLAGS and CFLAGS) and
+# Build scripts can pass compiler/linker flags to the EDK2
+# build tools via the EDK2_BASETOOLS_OPTFLAGS (CFLAGS) and
# EDK2_BASETOOLS_LDFLAGS (LDFLAGS) environment variables.
#
# Example: