typo fixes, TYPE_XXX usage cleanup, comments update,
virtio-mmio trace functions cleanup -----BEGIN PGP SIGNATURE----- iQIcBAABAgAGBQJc5XOgAAoJEPMMOL0/L748VGYQAJlKRyKnq22z6PkOdhtVY+c4 rsqwtWA4VmRkNo/3AukXvO82Rd3k6lW0NgtW56LZ7U4z6sUlf2OIDZJYwdTuISij hTqaZ87ThzP5+n/kUJxnnb17fzSsAr48UYXW2UxMrjMfwf9x0bOqivxa2ussx0NW nQDJvQPjBqSjeoPHhyXiX7x5ImmRbSJsViYvcgfhwlAFhfaWOSYzm/PSKHbAfEYU muYJR+XIiNRfpz5z+t/aReyxx3AmFk7fuIT/otZZ9GuDV6Ot6GRxX5je4DbjsTyB 41ad5V/ie+6tAy7ijLJFpiEsWPf3a4+e58X84VF22DOnedtTyItairyhVvkt//6j rfd3QFgugshYRIKdqtgiS0aXl+NGm33np6UQRwpRwn3aMJEKXGoTOvVJ1GTZsYEo ytTmlfAusga5OwbIVImjafp7nt/vHdvAkxKidZUaflM8DtEnn/uMeqgVt7QtuGIq h0+W+3OnlgKtNc91m4Q3f9SHUfr0YnPtdVh2An9vA3RM4d1Cd08I/iQt3ZfaYk3L h+nv6h/ho7P0gB4qTDnzwb62A1hSl5WUHP6apcMC/sIzaO3s4KmvJTaU7574qS5C 4m0hfQxGmPS/GO4UjjUUpeBBpGhMVyLCGnhX9bQCGogZb0nbqb6CvB1LuBJfNGsH 8pI54eIsOdcnczceppM2 =inQB -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/vivier2/tags/trivial-branch-pull-request' into staging typo fixes, TYPE_XXX usage cleanup, comments update, virtio-mmio trace functions cleanup # gpg: Signature made Wed 22 May 2019 17:06:56 BST # gpg: using RSA key F30C38BD3F2FBE3C # gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [full] # gpg: aka "Laurent Vivier <laurent@vivier.eu>" [full] # gpg: aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" [full] # Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F 5173 F30C 38BD 3F2F BE3C * remotes/vivier2/tags/trivial-branch-pull-request: pci: msix: move 'MSIX_CAP_LENGTH' to header file vfio: platform: fix a typo hw: vfio: drop TYPE_FOO MACRO in VMStateDescription vfio: pci: make "vfio-pci-nohotplug" as MACRO configure: Fix spelling of sdl-image in --help migration: Fix typo in migrate_add_blocker() error message roms: List and describe the Makefile 'clean' rule roms: Correct the EDK2_BASETOOLS_OPTFLAGS variable description hw/virtio/virtio-mmio: Convert DPRINTF to trace and log Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
c4600d5d41
2
configure
vendored
2
configure
vendored
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -468,7 +468,7 @@ static Property vfio_ccw_properties[] = {
|
||||
};
|
||||
|
||||
static const VMStateDescription vfio_ccw_vmstate = {
|
||||
.name = TYPE_VFIO_CCW,
|
||||
.name = "vfio-ccw",
|
||||
.unmigratable = 1,
|
||||
};
|
||||
|
||||
|
@ -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,
|
||||
};
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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,
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user