qemu-trivial.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-trivial] [PULL 0/9] Trivial branch patches
@ 2019-05-22 16:07 Laurent Vivier
  2019-05-22 16:07 ` [Qemu-trivial] [PULL 1/9] hw/virtio/virtio-mmio: Convert DPRINTF to trace and log Laurent Vivier
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Laurent Vivier @ 2019-05-22 16:07 UTC (permalink / raw)
  To: qemu-devel
  Cc: Tony Krowiak, Christian Borntraeger, Cornelia Huck, Farhan Ali,
	qemu-s390x, Eric Farman, Alex Williamson, Halil Pasic,
	Laurent Vivier, qemu-trivial, Juan Quintela, Michael S. Tsirkin,
	Marcel Apfelbaum, Michael Tokarev, Dr. David Alan Gilbert,
	Pierre Morel

The following changes since commit a4f667b6714916683408b983cfe0a615a725775f:

  Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20190521-3' into staging (2019-05-21 16:30:13 +0100)

are available in the Git repository at:

  git://github.com/vivier/qemu.git tags/trivial-branch-pull-request

for you to fetch changes up to 2d9574bdbed69b374116c59259f6bd14f7dfad7f:

  pci: msix: move 'MSIX_CAP_LENGTH' to header file (2019-05-22 17:35:27 +0200)

----------------------------------------------------------------
typo fixes, TYPE_XXX usage cleanup, comments update,
virtio-mmio trace functions cleanup

----------------------------------------------------------------

Boxuan Li (1):
  hw/virtio/virtio-mmio: Convert DPRINTF to trace and log

Greg Kurz (1):
  migration: Fix typo in migrate_add_blocker() error message

Li Qiang (4):
  vfio: pci: make "vfio-pci-nohotplug" as MACRO
  hw: vfio: drop TYPE_FOO MACRO in VMStateDescription
  vfio: platform: fix a typo
  pci: msix: move 'MSIX_CAP_LENGTH' to header file

Markus Armbruster (1):
  configure: Fix spelling of sdl-image in --help

Philippe Mathieu-Daudé (2):
  roms: Correct the EDK2_BASETOOLS_OPTFLAGS variable description
  roms: List and describe the Makefile 'clean' rule

 configure               |  2 +-
 hw/pci/msix.c           |  2 --
 hw/vfio/amd-xgbe.c      |  2 +-
 hw/vfio/ap.c            |  2 +-
 hw/vfio/calxeda-xgmac.c |  2 +-
 hw/vfio/ccw.c           |  2 +-
 hw/vfio/pci.c           |  8 ++++----
 hw/vfio/platform.c      |  6 +++---
 hw/virtio/trace-events  |  7 +++++++
 hw/virtio/virtio-mmio.c | 44 ++++++++++++++++++++---------------------
 include/hw/pci/msix.h   |  2 ++
 migration/migration.c   |  2 +-
 roms/Makefile           |  6 ++++--
 13 files changed, 47 insertions(+), 40 deletions(-)

-- 
2.20.1



^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Qemu-trivial] [PULL 1/9] hw/virtio/virtio-mmio: Convert DPRINTF to trace and log
  2019-05-22 16:07 [Qemu-trivial] [PULL 0/9] Trivial branch patches Laurent Vivier
@ 2019-05-22 16:07 ` Laurent Vivier
  2019-05-22 16:07 ` [Qemu-trivial] [PULL 2/9] roms: Correct the EDK2_BASETOOLS_OPTFLAGS variable description Laurent Vivier
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Laurent Vivier @ 2019-05-22 16:07 UTC (permalink / raw)
  To: qemu-devel
  Cc: Tony Krowiak, Christian Borntraeger, Cornelia Huck, Farhan Ali,
	qemu-s390x, Eric Farman, Alex Williamson, Halil Pasic,
	Laurent Vivier, qemu-trivial, Juan Quintela, Michael S. Tsirkin,
	Marcel Apfelbaum, Michael Tokarev, Dr. David Alan Gilbert,
	Pierre Morel, Boxuan Li, Philippe Mathieu-Daudé,
	Alex Bennée, Yuval Shaia

From: Boxuan Li <liboxuan@connect.hku.hk>

Use traces for debug message and qemu_log_mask for errors.

Signed-off-by: Boxuan Li <liboxuan@connect.hku.hk>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
Message-Id: <20190503154424.73933-1-liboxuan@connect.hku.hk>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/virtio/trace-events  |  7 +++++++
 hw/virtio/virtio-mmio.c | 44 ++++++++++++++++++++---------------------
 2 files changed, 28 insertions(+), 23 deletions(-)

diff --git a/hw/virtio/trace-events b/hw/virtio/trace-events
index 60c649c4bc96..e28ba48da621 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 5807aa87fe8e..96c762f0bf88 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);
 }
 
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Qemu-trivial] [PULL 2/9] roms: Correct the EDK2_BASETOOLS_OPTFLAGS variable description
  2019-05-22 16:07 [Qemu-trivial] [PULL 0/9] Trivial branch patches Laurent Vivier
  2019-05-22 16:07 ` [Qemu-trivial] [PULL 1/9] hw/virtio/virtio-mmio: Convert DPRINTF to trace and log Laurent Vivier
@ 2019-05-22 16:07 ` Laurent Vivier
  2019-05-22 16:07 ` [Qemu-trivial] [PULL 3/9] roms: List and describe the Makefile 'clean' rule Laurent Vivier
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Laurent Vivier @ 2019-05-22 16:07 UTC (permalink / raw)
  To: qemu-devel
  Cc: Tony Krowiak, Christian Borntraeger, Cornelia Huck, Farhan Ali,
	qemu-s390x, Eric Farman, Alex Williamson, Halil Pasic,
	Laurent Vivier, qemu-trivial, Juan Quintela, Michael S. Tsirkin,
	Marcel Apfelbaum, Michael Tokarev, Dr. David Alan Gilbert,
	Pierre Morel, Philippe Mathieu-Daudé, Laszlo Ersek

From: Philippe Mathieu-Daudé <philmd@redhat.com>

In commit 1cab464136b4 we incorrectly described the
EDK2_BASETOOLS_OPTFLAGS can pass CPPFLAGS and CFLAGS
options to the EDK2 build tools, but it only expands
the CFLAGS (not to the CPPFLAGS).
Update the description to be more accurate.

Reported-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20190506141923.12183-2-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 roms/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/roms/Makefile b/roms/Makefile
index 0ce84a45ad57..ea6aec56abdd 100644
--- a/roms/Makefile
+++ b/roms/Makefile
@@ -121,8 +121,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:
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Qemu-trivial] [PULL 3/9] roms: List and describe the Makefile 'clean' rule
  2019-05-22 16:07 [Qemu-trivial] [PULL 0/9] Trivial branch patches Laurent Vivier
  2019-05-22 16:07 ` [Qemu-trivial] [PULL 1/9] hw/virtio/virtio-mmio: Convert DPRINTF to trace and log Laurent Vivier
  2019-05-22 16:07 ` [Qemu-trivial] [PULL 2/9] roms: Correct the EDK2_BASETOOLS_OPTFLAGS variable description Laurent Vivier
@ 2019-05-22 16:07 ` Laurent Vivier
  2019-05-22 16:07 ` [Qemu-trivial] [PULL 4/9] migration: Fix typo in migrate_add_blocker() error message Laurent Vivier
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Laurent Vivier @ 2019-05-22 16:07 UTC (permalink / raw)
  To: qemu-devel
  Cc: Tony Krowiak, Christian Borntraeger, Cornelia Huck, Farhan Ali,
	qemu-s390x, Eric Farman, Alex Williamson, Halil Pasic,
	Laurent Vivier, qemu-trivial, Juan Quintela, Michael S. Tsirkin,
	Marcel Apfelbaum, Michael Tokarev, Dr. David Alan Gilbert,
	Pierre Morel, Philippe Mathieu-Daudé, Laszlo Ersek

From: Philippe Mathieu-Daudé <philmd@redhat.com>

Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20190506141923.12183-3-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 roms/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/roms/Makefile b/roms/Makefile
index ea6aec56abdd..078d3fb70563 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
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Qemu-trivial] [PULL 4/9] migration: Fix typo in migrate_add_blocker() error message
  2019-05-22 16:07 [Qemu-trivial] [PULL 0/9] Trivial branch patches Laurent Vivier
                   ` (2 preceding siblings ...)
  2019-05-22 16:07 ` [Qemu-trivial] [PULL 3/9] roms: List and describe the Makefile 'clean' rule Laurent Vivier
@ 2019-05-22 16:07 ` Laurent Vivier
  2019-05-22 16:07 ` [Qemu-trivial] [PULL 5/9] configure: Fix spelling of sdl-image in --help Laurent Vivier
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Laurent Vivier @ 2019-05-22 16:07 UTC (permalink / raw)
  To: qemu-devel
  Cc: Tony Krowiak, Christian Borntraeger, Cornelia Huck, Farhan Ali,
	qemu-s390x, Eric Farman, Alex Williamson, Halil Pasic,
	Laurent Vivier, qemu-trivial, Juan Quintela, Michael S. Tsirkin,
	Marcel Apfelbaum, Michael Tokarev, Dr. David Alan Gilbert,
	Pierre Morel, Greg Kurz, Stefano Garzarella

From: Greg Kurz <groug@kaod.org>

Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-Id: <155800428514.543845.17558475870097990036.stgit@bahia.lan>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 migration/migration.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/migration/migration.c b/migration/migration.c
index d0a0f68f11ea..2865ae3fa948 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;
     }
 
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Qemu-trivial] [PULL 5/9] configure: Fix spelling of sdl-image in --help
  2019-05-22 16:07 [Qemu-trivial] [PULL 0/9] Trivial branch patches Laurent Vivier
                   ` (3 preceding siblings ...)
  2019-05-22 16:07 ` [Qemu-trivial] [PULL 4/9] migration: Fix typo in migrate_add_blocker() error message Laurent Vivier
@ 2019-05-22 16:07 ` Laurent Vivier
  2019-05-22 16:07 ` [Qemu-trivial] [PULL 6/9] vfio: pci: make "vfio-pci-nohotplug" as MACRO Laurent Vivier
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Laurent Vivier @ 2019-05-22 16:07 UTC (permalink / raw)
  To: qemu-devel
  Cc: Tony Krowiak, Christian Borntraeger, Cornelia Huck, Farhan Ali,
	qemu-s390x, Eric Farman, Alex Williamson, Halil Pasic,
	Laurent Vivier, qemu-trivial, Juan Quintela, Michael S. Tsirkin,
	Marcel Apfelbaum, Michael Tokarev, Dr. David Alan Gilbert,
	Pierre Morel, Markus Armbruster, Thomas Huth

From: Markus Armbruster <armbru@redhat.com>

Fixes: a442fe2f2b2f20e7be0934277e9400b844b11999
Cc: qemu-trivial@nongnu.org
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20190517183246.11933-1-armbru@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index d2fc3463022e..cef51b2a0b7d 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
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Qemu-trivial] [PULL 6/9] vfio: pci: make "vfio-pci-nohotplug" as MACRO
  2019-05-22 16:07 [Qemu-trivial] [PULL 0/9] Trivial branch patches Laurent Vivier
                   ` (4 preceding siblings ...)
  2019-05-22 16:07 ` [Qemu-trivial] [PULL 5/9] configure: Fix spelling of sdl-image in --help Laurent Vivier
@ 2019-05-22 16:07 ` Laurent Vivier
  2019-05-22 16:07 ` [Qemu-trivial] [PULL 7/9] hw: vfio: drop TYPE_FOO MACRO in VMStateDescription Laurent Vivier
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Laurent Vivier @ 2019-05-22 16:07 UTC (permalink / raw)
  To: qemu-devel
  Cc: Tony Krowiak, Christian Borntraeger, Cornelia Huck, Farhan Ali,
	qemu-s390x, Eric Farman, Alex Williamson, Halil Pasic,
	Laurent Vivier, qemu-trivial, Juan Quintela, Michael S. Tsirkin,
	Marcel Apfelbaum, Michael Tokarev, Dr. David Alan Gilbert,
	Pierre Morel, Li Qiang, Philippe Mathieu-Daudé, Eric Auger

From: Li Qiang <liq3ea@163.com>

The QOMConventions recommends we should use TYPE_FOO
for a TypeInfo's name. Though "vfio-pci-nohotplug" is not
used in other parts, for consistency we should make this change.

CC: qemu-trivial@nongnu.org
Signed-off-by: Li Qiang <liq3ea@163.com>
Message-Id: <20190521151543.92274-2-liq3ea@163.com>
Acked-by: Alex Williamson <alex.williamson@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/vfio/pci.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index 8cecb53d5cf6..08729e5875a9 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -40,6 +40,8 @@
 #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 +3306,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,
 };
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Qemu-trivial] [PULL 7/9] hw: vfio: drop TYPE_FOO MACRO in VMStateDescription
  2019-05-22 16:07 [Qemu-trivial] [PULL 0/9] Trivial branch patches Laurent Vivier
                   ` (5 preceding siblings ...)
  2019-05-22 16:07 ` [Qemu-trivial] [PULL 6/9] vfio: pci: make "vfio-pci-nohotplug" as MACRO Laurent Vivier
@ 2019-05-22 16:07 ` Laurent Vivier
  2019-05-22 16:07 ` [Qemu-trivial] [PULL 8/9] vfio: platform: fix a typo Laurent Vivier
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Laurent Vivier @ 2019-05-22 16:07 UTC (permalink / raw)
  To: qemu-devel
  Cc: Tony Krowiak, Christian Borntraeger, Cornelia Huck, Farhan Ali,
	qemu-s390x, Eric Farman, Alex Williamson, Halil Pasic,
	Laurent Vivier, qemu-trivial, Juan Quintela, Michael S. Tsirkin,
	Marcel Apfelbaum, Michael Tokarev, Dr. David Alan Gilbert,
	Pierre Morel, Li Qiang, Philippe Mathieu-Daudé, Eric Auger

From: Li Qiang <liq3ea@163.com>

It's recommended that VMStateDescription names are decoupled from QOM
type names as the latter may freely change without consideration of
migration compatibility.

Link: https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg02175.html

CC: qemu-trivial@nongnu.org
Signed-off-by: Li Qiang <liq3ea@163.com>
Message-Id: <20190521151543.92274-3-liq3ea@163.com>
Acked-by: Alex Williamson <alex.williamson@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/vfio/amd-xgbe.c      | 2 +-
 hw/vfio/ap.c            | 2 +-
 hw/vfio/calxeda-xgmac.c | 2 +-
 hw/vfio/ccw.c           | 2 +-
 hw/vfio/platform.c      | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/hw/vfio/amd-xgbe.c b/hw/vfio/amd-xgbe.c
index ee64a3b4a2e4..1b06c0f3ea9d 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 d8b79ebe53ae..564751650fc1 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 e7767c4b021b..6cc608b6cabd 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 31dd3a2a87b6..d9e39552e237 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/platform.c b/hw/vfio/platform.c
index 398db38f14d9..e59a0234dd87 100644
--- a/hw/vfio/platform.c
+++ b/hw/vfio/platform.c
@@ -697,7 +697,7 @@ out:
 }
 
 static const VMStateDescription vfio_platform_vmstate = {
-    .name = TYPE_VFIO_PLATFORM,
+    .name = "vfio-platform",
     .unmigratable = 1,
 };
 
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Qemu-trivial] [PULL 8/9] vfio: platform: fix a typo
  2019-05-22 16:07 [Qemu-trivial] [PULL 0/9] Trivial branch patches Laurent Vivier
                   ` (6 preceding siblings ...)
  2019-05-22 16:07 ` [Qemu-trivial] [PULL 7/9] hw: vfio: drop TYPE_FOO MACRO in VMStateDescription Laurent Vivier
@ 2019-05-22 16:07 ` Laurent Vivier
  2019-05-22 16:07 ` [Qemu-trivial] [PULL 9/9] pci: msix: move 'MSIX_CAP_LENGTH' to header file Laurent Vivier
  2019-05-23 11:56 ` [Qemu-trivial] [Qemu-devel] [PULL 0/9] Trivial branch patches Peter Maydell
  9 siblings, 0 replies; 11+ messages in thread
From: Laurent Vivier @ 2019-05-22 16:07 UTC (permalink / raw)
  To: qemu-devel
  Cc: Tony Krowiak, Christian Borntraeger, Cornelia Huck, Farhan Ali,
	qemu-s390x, Eric Farman, Alex Williamson, Halil Pasic,
	Laurent Vivier, qemu-trivial, Juan Quintela, Michael S. Tsirkin,
	Marcel Apfelbaum, Michael Tokarev, Dr. David Alan Gilbert,
	Pierre Morel, Li Qiang, Philippe Mathieu-Daudé, Eric Auger

From: Li Qiang <liq3ea@163.com>

'eventd' should be 'eventfd'.

CC: qemu-trivial@nongnu.org
Signed-off-by: Li Qiang <liq3ea@163.com>
Message-Id: <20190521151543.92274-4-liq3ea@163.com>
Acked-by: Alex Williamson <alex.williamson@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/vfio/platform.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c
index e59a0234dd87..d52d6552e089 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;
         }
     }
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Qemu-trivial] [PULL 9/9] pci: msix: move 'MSIX_CAP_LENGTH' to header file
  2019-05-22 16:07 [Qemu-trivial] [PULL 0/9] Trivial branch patches Laurent Vivier
                   ` (7 preceding siblings ...)
  2019-05-22 16:07 ` [Qemu-trivial] [PULL 8/9] vfio: platform: fix a typo Laurent Vivier
@ 2019-05-22 16:07 ` Laurent Vivier
  2019-05-23 11:56 ` [Qemu-trivial] [Qemu-devel] [PULL 0/9] Trivial branch patches Peter Maydell
  9 siblings, 0 replies; 11+ messages in thread
From: Laurent Vivier @ 2019-05-22 16:07 UTC (permalink / raw)
  To: qemu-devel
  Cc: Tony Krowiak, Christian Borntraeger, Cornelia Huck, Farhan Ali,
	qemu-s390x, Eric Farman, Alex Williamson, Halil Pasic,
	Laurent Vivier, qemu-trivial, Juan Quintela, Michael S. Tsirkin,
	Marcel Apfelbaum, Michael Tokarev, Dr. David Alan Gilbert,
	Pierre Morel, Li Qiang, Philippe Mathieu-Daudé, Eric Auger

From: Li Qiang <liq3ea@163.com>

'MSIX_CAP_LENGTH' is defined in two .c file. Move it
to hw/pci/msix.h file to reduce duplicated code.

CC: qemu-trivial@nongnu.org
Signed-off-by: Li Qiang <liq3ea@163.com>
Message-Id: <20190521151543.92274-5-liq3ea@163.com>
Acked-by: Alex Williamson <alex.williamson@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/pci/msix.c         | 2 --
 hw/vfio/pci.c         | 2 --
 include/hw/pci/msix.h | 2 ++
 3 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/hw/pci/msix.c b/hw/pci/msix.c
index 4e336416a78a..d39dcf32e8c9 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/pci.c b/hw/vfio/pci.c
index 08729e5875a9..8e555db12ec0 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -35,8 +35,6 @@
 #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)
 
diff --git a/include/hw/pci/msix.h b/include/hw/pci/msix.h
index 1f27658d352f..08acfa836e49 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,
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [Qemu-trivial] [Qemu-devel] [PULL 0/9] Trivial branch patches
  2019-05-22 16:07 [Qemu-trivial] [PULL 0/9] Trivial branch patches Laurent Vivier
                   ` (8 preceding siblings ...)
  2019-05-22 16:07 ` [Qemu-trivial] [PULL 9/9] pci: msix: move 'MSIX_CAP_LENGTH' to header file Laurent Vivier
@ 2019-05-23 11:56 ` Peter Maydell
  9 siblings, 0 replies; 11+ messages in thread
From: Peter Maydell @ 2019-05-23 11:56 UTC (permalink / raw)
  To: Laurent Vivier
  Cc: QEMU Developers, Tony Krowiak, Eric Farman, Farhan Ali,
	Pierre Morel, Juan Quintela, QEMU Trivial, Cornelia Huck,
	Michael Tokarev, Alex Williamson, Halil Pasic,
	Christian Borntraeger, qemu-s390x, Michael S. Tsirkin,
	Dr. David Alan Gilbert

On Wed, 22 May 2019 at 17:13, Laurent Vivier <laurent@vivier.eu> wrote:
>
> The following changes since commit a4f667b6714916683408b983cfe0a615a725775f:
>
>   Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20190521-3' into staging (2019-05-21 16:30:13 +0100)
>
> are available in the Git repository at:
>
>   git://github.com/vivier/qemu.git tags/trivial-branch-pull-request
>
> for you to fetch changes up to 2d9574bdbed69b374116c59259f6bd14f7dfad7f:
>
>   pci: msix: move 'MSIX_CAP_LENGTH' to header file (2019-05-22 17:35:27 +0200)
>
> ----------------------------------------------------------------
> typo fixes, TYPE_XXX usage cleanup, comments update,
> virtio-mmio trace functions cleanup
>


Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/4.1
for any user-visible changes.

-- PMM


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-05-23 11:57 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-22 16:07 [Qemu-trivial] [PULL 0/9] Trivial branch patches Laurent Vivier
2019-05-22 16:07 ` [Qemu-trivial] [PULL 1/9] hw/virtio/virtio-mmio: Convert DPRINTF to trace and log Laurent Vivier
2019-05-22 16:07 ` [Qemu-trivial] [PULL 2/9] roms: Correct the EDK2_BASETOOLS_OPTFLAGS variable description Laurent Vivier
2019-05-22 16:07 ` [Qemu-trivial] [PULL 3/9] roms: List and describe the Makefile 'clean' rule Laurent Vivier
2019-05-22 16:07 ` [Qemu-trivial] [PULL 4/9] migration: Fix typo in migrate_add_blocker() error message Laurent Vivier
2019-05-22 16:07 ` [Qemu-trivial] [PULL 5/9] configure: Fix spelling of sdl-image in --help Laurent Vivier
2019-05-22 16:07 ` [Qemu-trivial] [PULL 6/9] vfio: pci: make "vfio-pci-nohotplug" as MACRO Laurent Vivier
2019-05-22 16:07 ` [Qemu-trivial] [PULL 7/9] hw: vfio: drop TYPE_FOO MACRO in VMStateDescription Laurent Vivier
2019-05-22 16:07 ` [Qemu-trivial] [PULL 8/9] vfio: platform: fix a typo Laurent Vivier
2019-05-22 16:07 ` [Qemu-trivial] [PULL 9/9] pci: msix: move 'MSIX_CAP_LENGTH' to header file Laurent Vivier
2019-05-23 11:56 ` [Qemu-trivial] [Qemu-devel] [PULL 0/9] Trivial branch patches Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).