All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 1/4] vfio: pci: make "vfio-pci-nohotplug" as MACRO
@ 2019-05-18  3:28 Li Qiang
  2019-05-18  3:28 ` [Qemu-devel] [PATCH 2/4] hw: vfio: drop TYPE_FOO MACRO in VMStateDescription Li Qiang
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Li Qiang @ 2019-05-18  3:28 UTC (permalink / raw)
  To: alex.williamson, lvivier
  Cc: qemu-trivial, philmd, liq3ea, qemu-devel, Li Qiang

CC: qemu-trivial@nongnu.org
Signed-off-by: Li Qiang <liq3ea@163.com>
---
 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 8cecb53d5c..08729e5875 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.17.1




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

* [Qemu-devel] [PATCH 2/4] hw: vfio: drop TYPE_FOO MACRO in VMStateDescription
  2019-05-18  3:28 [Qemu-devel] [PATCH 1/4] vfio: pci: make "vfio-pci-nohotplug" as MACRO Li Qiang
@ 2019-05-18  3:28 ` Li Qiang
  2019-05-18 14:20   ` Alex Williamson
  2019-05-18  3:28 ` [Qemu-devel] [PATCH 3/4] vfio: platform: fix a typo Li Qiang
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 12+ messages in thread
From: Li Qiang @ 2019-05-18  3:28 UTC (permalink / raw)
  To: alex.williamson, lvivier
  Cc: qemu-trivial, philmd, liq3ea, qemu-devel, Li Qiang

As the vmstate structure names aren't related with
the QOM type names.

CC: qemu-trivial@nongnu.org
Signed-off-by: Li Qiang <liq3ea@163.com>
---
 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 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/platform.c b/hw/vfio/platform.c
index 398db38f14..e59a0234dd 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.17.1




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

* [Qemu-devel] [PATCH 3/4] vfio: platform: fix a typo
  2019-05-18  3:28 [Qemu-devel] [PATCH 1/4] vfio: pci: make "vfio-pci-nohotplug" as MACRO Li Qiang
  2019-05-18  3:28 ` [Qemu-devel] [PATCH 2/4] hw: vfio: drop TYPE_FOO MACRO in VMStateDescription Li Qiang
@ 2019-05-18  3:28 ` Li Qiang
  2019-05-18 14:20   ` Alex Williamson
  2019-05-18  3:28 ` [Qemu-devel] [PATCH 4/4] pci: msix: move 'MSIX_CAP_LENGTH' to header file Li Qiang
  2019-05-18 14:18 ` [Qemu-devel] [PATCH 1/4] vfio: pci: make "vfio-pci-nohotplug" as MACRO Alex Williamson
  3 siblings, 1 reply; 12+ messages in thread
From: Li Qiang @ 2019-05-18  3:28 UTC (permalink / raw)
  To: alex.williamson, lvivier
  Cc: qemu-trivial, philmd, liq3ea, qemu-devel, Li Qiang

CC: qemu-trivial@nongnu.org
Signed-off-by: Li Qiang <liq3ea@163.com>
---
 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 e59a0234dd..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;
         }
     }
-- 
2.17.1




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

* [Qemu-devel] [PATCH 4/4] pci: msix: move 'MSIX_CAP_LENGTH' to header file
  2019-05-18  3:28 [Qemu-devel] [PATCH 1/4] vfio: pci: make "vfio-pci-nohotplug" as MACRO Li Qiang
  2019-05-18  3:28 ` [Qemu-devel] [PATCH 2/4] hw: vfio: drop TYPE_FOO MACRO in VMStateDescription Li Qiang
  2019-05-18  3:28 ` [Qemu-devel] [PATCH 3/4] vfio: platform: fix a typo Li Qiang
@ 2019-05-18  3:28 ` Li Qiang
  2019-05-18 14:21   ` Alex Williamson
  2019-05-18 14:18 ` [Qemu-devel] [PATCH 1/4] vfio: pci: make "vfio-pci-nohotplug" as MACRO Alex Williamson
  3 siblings, 1 reply; 12+ messages in thread
From: Li Qiang @ 2019-05-18  3:28 UTC (permalink / raw)
  To: alex.williamson, lvivier
  Cc: qemu-trivial, philmd, liq3ea, qemu-devel, Li Qiang

CC: qemu-trivial@nongnu.org
Signed-off-by: Li Qiang <liq3ea@163.com>
---
 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 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/pci.c b/hw/vfio/pci.c
index 08729e5875..8e555db12e 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 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,
-- 
2.17.1




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

* Re: [Qemu-devel] [PATCH 1/4] vfio: pci: make "vfio-pci-nohotplug" as MACRO
  2019-05-18  3:28 [Qemu-devel] [PATCH 1/4] vfio: pci: make "vfio-pci-nohotplug" as MACRO Li Qiang
                   ` (2 preceding siblings ...)
  2019-05-18  3:28 ` [Qemu-devel] [PATCH 4/4] pci: msix: move 'MSIX_CAP_LENGTH' to header file Li Qiang
@ 2019-05-18 14:18 ` Alex Williamson
  2019-05-20  1:27   ` Li Qiang
  3 siblings, 1 reply; 12+ messages in thread
From: Alex Williamson @ 2019-05-18 14:18 UTC (permalink / raw)
  To: Li Qiang; +Cc: lvivier, qemu-trivial, liq3ea, qemu-devel, philmd

On Fri, 17 May 2019 20:28:08 -0700
Li Qiang <liq3ea@163.com> wrote:

Why?  (No commit message, nor cover letter)

> CC: qemu-trivial@nongnu.org
> Signed-off-by: Li Qiang <liq3ea@163.com>
> ---
>  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 8cecb53d5c..08729e5875 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,
>  };



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

* Re: [Qemu-devel] [PATCH 2/4] hw: vfio: drop TYPE_FOO MACRO in VMStateDescription
  2019-05-18  3:28 ` [Qemu-devel] [PATCH 2/4] hw: vfio: drop TYPE_FOO MACRO in VMStateDescription Li Qiang
@ 2019-05-18 14:20   ` Alex Williamson
  2019-05-20  1:29     ` Li Qiang
  0 siblings, 1 reply; 12+ messages in thread
From: Alex Williamson @ 2019-05-18 14:20 UTC (permalink / raw)
  To: Li Qiang; +Cc: lvivier, qemu-trivial, liq3ea, qemu-devel, philmd

On Fri, 17 May 2019 20:28:09 -0700
Li Qiang <liq3ea@163.com> wrote:

> As the vmstate structure names aren't related with
> the QOM type names.

Seems contrary to the first patch in the series.
 
> CC: qemu-trivial@nongnu.org
> Signed-off-by: Li Qiang <liq3ea@163.com>
> ---
>  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 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/platform.c b/hw/vfio/platform.c
> index 398db38f14..e59a0234dd 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,
>  };
>  



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

* Re: [Qemu-devel] [PATCH 3/4] vfio: platform: fix a typo
  2019-05-18  3:28 ` [Qemu-devel] [PATCH 3/4] vfio: platform: fix a typo Li Qiang
@ 2019-05-18 14:20   ` Alex Williamson
  0 siblings, 0 replies; 12+ messages in thread
From: Alex Williamson @ 2019-05-18 14:20 UTC (permalink / raw)
  To: Li Qiang; +Cc: lvivier, qemu-trivial, liq3ea, qemu-devel, philmd

On Fri, 17 May 2019 20:28:10 -0700
Li Qiang <liq3ea@163.com> wrote:

An actual trivial patch, but it could still use a commit message.

> CC: qemu-trivial@nongnu.org
> Signed-off-by: Li Qiang <liq3ea@163.com>
> ---
>  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 e59a0234dd..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;
>          }
>      }



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

* Re: [Qemu-devel] [PATCH 4/4] pci: msix: move 'MSIX_CAP_LENGTH' to header file
  2019-05-18  3:28 ` [Qemu-devel] [PATCH 4/4] pci: msix: move 'MSIX_CAP_LENGTH' to header file Li Qiang
@ 2019-05-18 14:21   ` Alex Williamson
  0 siblings, 0 replies; 12+ messages in thread
From: Alex Williamson @ 2019-05-18 14:21 UTC (permalink / raw)
  To: Li Qiang; +Cc: lvivier, qemu-trivial, liq3ea, qemu-devel, philmd

On Fri, 17 May 2019 20:28:11 -0700
Li Qiang <liq3ea@163.com> wrote:

Lacking commit message.

> CC: qemu-trivial@nongnu.org
> Signed-off-by: Li Qiang <liq3ea@163.com>
> ---
>  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 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/pci.c b/hw/vfio/pci.c
> index 08729e5875..8e555db12e 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 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,



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

* Re: [Qemu-devel] [PATCH 1/4] vfio: pci: make "vfio-pci-nohotplug" as MACRO
  2019-05-18 14:18 ` [Qemu-devel] [PATCH 1/4] vfio: pci: make "vfio-pci-nohotplug" as MACRO Alex Williamson
@ 2019-05-20  1:27   ` Li Qiang
  2019-05-20 20:02     ` Alex Williamson
  0 siblings, 1 reply; 12+ messages in thread
From: Li Qiang @ 2019-05-20  1:27 UTC (permalink / raw)
  To: Alex Williamson
  Cc: lvivier, qemu-trivial, Li Qiang, Qemu Developers,
	Philippe Mathieu-Daudé

Alex Williamson <alex.williamson@redhat.com> 于2019年5月18日周六 下午10:18写道:

> On Fri, 17 May 2019 20:28:08 -0700
> Li Qiang <liq3ea@163.com> wrote:
>
> Why?  (No commit message, nor cover letter)
>
>
Once I think these are trivial so no cover letter and lack some commit
message.
I will add some commit message in the next revision.

For this patch, this is more consistent with QOMConventions:
-->https://wiki.qemu.org/Documentation/QOMConventions

Thanks,
Li Qiang


> > CC: qemu-trivial@nongnu.org
> > Signed-off-by: Li Qiang <liq3ea@163.com>
> > ---
> >  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 8cecb53d5c..08729e5875 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,
> >  };
>
>

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

* Re: [Qemu-devel] [PATCH 2/4] hw: vfio: drop TYPE_FOO MACRO in VMStateDescription
  2019-05-18 14:20   ` Alex Williamson
@ 2019-05-20  1:29     ` Li Qiang
  2019-05-20 20:12       ` Alex Williamson
  0 siblings, 1 reply; 12+ messages in thread
From: Li Qiang @ 2019-05-20  1:29 UTC (permalink / raw)
  To: Alex Williamson
  Cc: lvivier, qemu-trivial, Li Qiang, Qemu Developers,
	Philippe Mathieu-Daudé

Alex Williamson <alex.williamson@redhat.com> 于2019年5月18日周六 下午10:20写道:

> On Fri, 17 May 2019 20:28:09 -0700
> Li Qiang <liq3ea@163.com> wrote:
>
> > As the vmstate structure names aren't related with
> > the QOM type names.
>
> Seems contrary to the first patch in the series.
>
>
No, once there is a discussion of this:
-->https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg02175.html

Thanks,
Li Qiang



> > CC: qemu-trivial@nongnu.org
> > Signed-off-by: Li Qiang <liq3ea@163.com>
> > ---
> >  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 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/platform.c b/hw/vfio/platform.c
> > index 398db38f14..e59a0234dd 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,
> >  };
> >
>
>

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

* Re: [Qemu-devel] [PATCH 1/4] vfio: pci: make "vfio-pci-nohotplug" as MACRO
  2019-05-20  1:27   ` Li Qiang
@ 2019-05-20 20:02     ` Alex Williamson
  0 siblings, 0 replies; 12+ messages in thread
From: Alex Williamson @ 2019-05-20 20:02 UTC (permalink / raw)
  To: Li Qiang
  Cc: lvivier, qemu-trivial, Li Qiang, Qemu Developers,
	Philippe Mathieu-Daudé

On Mon, 20 May 2019 09:27:47 +0800
Li Qiang <liq3ea@gmail.com> wrote:

> Alex Williamson <alex.williamson@redhat.com> 于2019年5月18日周六 下午10:18写道:
> 
> > On Fri, 17 May 2019 20:28:08 -0700
> > Li Qiang <liq3ea@163.com> wrote:
> >
> > Why?  (No commit message, nor cover letter)
> >
> >  
> Once I think these are trivial so no cover letter and lack some commit
> message.
> I will add some commit message in the next revision.

There is no patch that is not improved by a commit message IMO.
 
> For this patch, this is more consistent with QOMConventions:
> -->https://wiki.qemu.org/Documentation/QOMConventions  

Ok, so you're effectively just updating your previous commit
2683ccd5be8f ("vfio-pci: make vfio-pci device more QOM conventional")
which crossed in flight with b290659fc3dd ("hw/vfio/display: add ramfb
support") which added this new TypeInfo.  The QOMConventions only
recommend a TYPE_FOO if used in other parts of the code, but for
consistency I think it's reasonable (with a commit log ;).  Thanks,

Alex

> > > CC: qemu-trivial@nongnu.org
> > > Signed-off-by: Li Qiang <liq3ea@163.com>
> > > ---
> > >  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 8cecb53d5c..08729e5875 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,
> > >  };  
> >
> >  



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

* Re: [Qemu-devel] [PATCH 2/4] hw: vfio: drop TYPE_FOO MACRO in VMStateDescription
  2019-05-20  1:29     ` Li Qiang
@ 2019-05-20 20:12       ` Alex Williamson
  0 siblings, 0 replies; 12+ messages in thread
From: Alex Williamson @ 2019-05-20 20:12 UTC (permalink / raw)
  To: Li Qiang
  Cc: lvivier, qemu-trivial, Li Qiang, Qemu Developers,
	Philippe Mathieu-Daudé

On Mon, 20 May 2019 09:29:21 +0800
Li Qiang <liq3ea@gmail.com> wrote:

> Alex Williamson <alex.williamson@redhat.com> 于2019年5月18日周六 下午10:20写道:
> 
> > On Fri, 17 May 2019 20:28:09 -0700
> > Li Qiang <liq3ea@163.com> wrote:
> >  
> > > As the vmstate structure names aren't related with
> > > the QOM type names.  
> >
> > Seems contrary to the first patch in the series.
> >
> >  
> No, once there is a discussion of this:
> -->https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg02175.html  

Ok, then rather than the commit log above, it would be more useful (at
least to me) to state:

  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

Otherwise this appears as a rather arbitrary change.  Thanks,

Alex

> > > CC: qemu-trivial@nongnu.org
> > > Signed-off-by: Li Qiang <liq3ea@163.com>
> > > ---
> > >  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 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/platform.c b/hw/vfio/platform.c
> > > index 398db38f14..e59a0234dd 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,
> > >  };
> > >  
> >
> >  



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

end of thread, other threads:[~2019-05-20 20:14 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-18  3:28 [Qemu-devel] [PATCH 1/4] vfio: pci: make "vfio-pci-nohotplug" as MACRO Li Qiang
2019-05-18  3:28 ` [Qemu-devel] [PATCH 2/4] hw: vfio: drop TYPE_FOO MACRO in VMStateDescription Li Qiang
2019-05-18 14:20   ` Alex Williamson
2019-05-20  1:29     ` Li Qiang
2019-05-20 20:12       ` Alex Williamson
2019-05-18  3:28 ` [Qemu-devel] [PATCH 3/4] vfio: platform: fix a typo Li Qiang
2019-05-18 14:20   ` Alex Williamson
2019-05-18  3:28 ` [Qemu-devel] [PATCH 4/4] pci: msix: move 'MSIX_CAP_LENGTH' to header file Li Qiang
2019-05-18 14:21   ` Alex Williamson
2019-05-18 14:18 ` [Qemu-devel] [PATCH 1/4] vfio: pci: make "vfio-pci-nohotplug" as MACRO Alex Williamson
2019-05-20  1:27   ` Li Qiang
2019-05-20 20:02     ` Alex Williamson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.