All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2] virtio: clarify VirtioPCIDeviceTypeInfo usage
@ 2019-04-25 13:09 ` Stefan Hajnoczi
  0 siblings, 0 replies; 6+ messages in thread
From: Stefan Hajnoczi @ 2019-04-25 13:09 UTC (permalink / raw)
  To: qemu-devel; +Cc: Michael S. Tsirkin, ehabkost, sebastien.boeuf, Stefan Hajnoczi

How to use .base_name, .generic_name, .transitional_name, and
.non_transitional_name can be confusing.

Existing devices have .generic_name but its behavior is somewhat magic.

Devices added to new versions of the VIRTIO specification should forego
transitional mode completely and always operate in non-transitional mode
because there are no existing drivers for them that require backwards
compatibility.

This patch adds comments that hopefully make it easier for developers to
decide how to fill out VirtioPCIDeviceTypeInfo.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
v2:
 * Drop incorrect mention of machine type compat properties [ehabkost]
---
 hw/virtio/virtio-pci.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/hw/virtio/virtio-pci.h b/hw/virtio/virtio-pci.h
index 18581854ca..0bd1fff942 100644
--- a/hw/virtio/virtio-pci.h
+++ b/hw/virtio/virtio-pci.h
@@ -209,7 +209,8 @@ typedef struct VirtioPCIDeviceTypeInfo {
      * Implements both INTERFACE_PCIE_DEVICE and INTERFACE_CONVENTIONAL_PCI_DEVICE,
      * but PCI Express is supported only in non-transitional mode.
      *
-     * The only type implemented by QEMU 3.1 and older.
+     * The only type implemented by QEMU 3.1 and older.  This type is less
+     * explicit than the transitional and non-transitional device types.
      */
     const char *generic_name;
     /*
@@ -222,6 +223,9 @@ typedef struct VirtioPCIDeviceTypeInfo {
      * The non-transitional device type.  Optional.
      *
      * Implements INTERFACE_CONVENTIONAL_PCI_DEVICE only.
+     *
+     * New virtio device types should only define this and base_name, thereby
+     * allowing only non-transitional mode.
      */
     const char *non_transitional_name;
 
-- 
2.20.1

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

* [Qemu-devel] [PATCH v2] virtio: clarify VirtioPCIDeviceTypeInfo usage
@ 2019-04-25 13:09 ` Stefan Hajnoczi
  0 siblings, 0 replies; 6+ messages in thread
From: Stefan Hajnoczi @ 2019-04-25 13:09 UTC (permalink / raw)
  To: qemu-devel; +Cc: sebastien.boeuf, ehabkost, Stefan Hajnoczi, Michael S. Tsirkin

How to use .base_name, .generic_name, .transitional_name, and
.non_transitional_name can be confusing.

Existing devices have .generic_name but its behavior is somewhat magic.

Devices added to new versions of the VIRTIO specification should forego
transitional mode completely and always operate in non-transitional mode
because there are no existing drivers for them that require backwards
compatibility.

This patch adds comments that hopefully make it easier for developers to
decide how to fill out VirtioPCIDeviceTypeInfo.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
v2:
 * Drop incorrect mention of machine type compat properties [ehabkost]
---
 hw/virtio/virtio-pci.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/hw/virtio/virtio-pci.h b/hw/virtio/virtio-pci.h
index 18581854ca..0bd1fff942 100644
--- a/hw/virtio/virtio-pci.h
+++ b/hw/virtio/virtio-pci.h
@@ -209,7 +209,8 @@ typedef struct VirtioPCIDeviceTypeInfo {
      * Implements both INTERFACE_PCIE_DEVICE and INTERFACE_CONVENTIONAL_PCI_DEVICE,
      * but PCI Express is supported only in non-transitional mode.
      *
-     * The only type implemented by QEMU 3.1 and older.
+     * The only type implemented by QEMU 3.1 and older.  This type is less
+     * explicit than the transitional and non-transitional device types.
      */
     const char *generic_name;
     /*
@@ -222,6 +223,9 @@ typedef struct VirtioPCIDeviceTypeInfo {
      * The non-transitional device type.  Optional.
      *
      * Implements INTERFACE_CONVENTIONAL_PCI_DEVICE only.
+     *
+     * New virtio device types should only define this and base_name, thereby
+     * allowing only non-transitional mode.
      */
     const char *non_transitional_name;
 
-- 
2.20.1



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

* Re: [Qemu-devel] [PATCH v2] virtio: clarify VirtioPCIDeviceTypeInfo usage
@ 2019-04-25 17:14   ` Eduardo Habkost
  0 siblings, 0 replies; 6+ messages in thread
From: Eduardo Habkost @ 2019-04-25 17:14 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: qemu-devel, Michael S. Tsirkin, sebastien.boeuf

On Thu, Apr 25, 2019 at 02:09:39PM +0100, Stefan Hajnoczi wrote:
> How to use .base_name, .generic_name, .transitional_name, and
> .non_transitional_name can be confusing.
> 
> Existing devices have .generic_name but its behavior is somewhat magic.
> 
> Devices added to new versions of the VIRTIO specification should forego
> transitional mode completely and always operate in non-transitional mode
> because there are no existing drivers for them that require backwards
> compatibility.
> 
> This patch adds comments that hopefully make it easier for developers to
> decide how to fill out VirtioPCIDeviceTypeInfo.
> 
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>

Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>

-- 
Eduardo

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

* Re: [Qemu-devel] [PATCH v2] virtio: clarify VirtioPCIDeviceTypeInfo usage
@ 2019-04-25 17:14   ` Eduardo Habkost
  0 siblings, 0 replies; 6+ messages in thread
From: Eduardo Habkost @ 2019-04-25 17:14 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: sebastien.boeuf, qemu-devel, Michael S. Tsirkin

On Thu, Apr 25, 2019 at 02:09:39PM +0100, Stefan Hajnoczi wrote:
> How to use .base_name, .generic_name, .transitional_name, and
> .non_transitional_name can be confusing.
> 
> Existing devices have .generic_name but its behavior is somewhat magic.
> 
> Devices added to new versions of the VIRTIO specification should forego
> transitional mode completely and always operate in non-transitional mode
> because there are no existing drivers for them that require backwards
> compatibility.
> 
> This patch adds comments that hopefully make it easier for developers to
> decide how to fill out VirtioPCIDeviceTypeInfo.
> 
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>

Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>

-- 
Eduardo


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

* Re: [Qemu-devel] [PATCH v2] virtio: clarify VirtioPCIDeviceTypeInfo usage
@ 2019-05-01 16:21   ` Stefan Hajnoczi
  0 siblings, 0 replies; 6+ messages in thread
From: Stefan Hajnoczi @ 2019-05-01 16:21 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: qemu-devel, sebastien.boeuf, ehabkost

[-- Attachment #1: Type: text/plain, Size: 2018 bytes --]

On Thu, Apr 25, 2019 at 02:09:39PM +0100, Stefan Hajnoczi wrote:
> How to use .base_name, .generic_name, .transitional_name, and
> .non_transitional_name can be confusing.
> 
> Existing devices have .generic_name but its behavior is somewhat magic.
> 
> Devices added to new versions of the VIRTIO specification should forego
> transitional mode completely and always operate in non-transitional mode
> because there are no existing drivers for them that require backwards
> compatibility.
> 
> This patch adds comments that hopefully make it easier for developers to
> decide how to fill out VirtioPCIDeviceTypeInfo.
> 
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
> v2:
>  * Drop incorrect mention of machine type compat properties [ehabkost]
> ---
>  hw/virtio/virtio-pci.h | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)

Michael: This patch is for your virtio tree.

> diff --git a/hw/virtio/virtio-pci.h b/hw/virtio/virtio-pci.h
> index 18581854ca..0bd1fff942 100644
> --- a/hw/virtio/virtio-pci.h
> +++ b/hw/virtio/virtio-pci.h
> @@ -209,7 +209,8 @@ typedef struct VirtioPCIDeviceTypeInfo {
>       * Implements both INTERFACE_PCIE_DEVICE and INTERFACE_CONVENTIONAL_PCI_DEVICE,
>       * but PCI Express is supported only in non-transitional mode.
>       *
> -     * The only type implemented by QEMU 3.1 and older.
> +     * The only type implemented by QEMU 3.1 and older.  This type is less
> +     * explicit than the transitional and non-transitional device types.
>       */
>      const char *generic_name;
>      /*
> @@ -222,6 +223,9 @@ typedef struct VirtioPCIDeviceTypeInfo {
>       * The non-transitional device type.  Optional.
>       *
>       * Implements INTERFACE_CONVENTIONAL_PCI_DEVICE only.
> +     *
> +     * New virtio device types should only define this and base_name, thereby
> +     * allowing only non-transitional mode.
>       */
>      const char *non_transitional_name;
>  
> -- 
> 2.20.1
> 
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [Qemu-devel] [PATCH v2] virtio: clarify VirtioPCIDeviceTypeInfo usage
@ 2019-05-01 16:21   ` Stefan Hajnoczi
  0 siblings, 0 replies; 6+ messages in thread
From: Stefan Hajnoczi @ 2019-05-01 16:21 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: sebastien.boeuf, qemu-devel, ehabkost

[-- Attachment #1: Type: text/plain, Size: 2018 bytes --]

On Thu, Apr 25, 2019 at 02:09:39PM +0100, Stefan Hajnoczi wrote:
> How to use .base_name, .generic_name, .transitional_name, and
> .non_transitional_name can be confusing.
> 
> Existing devices have .generic_name but its behavior is somewhat magic.
> 
> Devices added to new versions of the VIRTIO specification should forego
> transitional mode completely and always operate in non-transitional mode
> because there are no existing drivers for them that require backwards
> compatibility.
> 
> This patch adds comments that hopefully make it easier for developers to
> decide how to fill out VirtioPCIDeviceTypeInfo.
> 
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
> v2:
>  * Drop incorrect mention of machine type compat properties [ehabkost]
> ---
>  hw/virtio/virtio-pci.h | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)

Michael: This patch is for your virtio tree.

> diff --git a/hw/virtio/virtio-pci.h b/hw/virtio/virtio-pci.h
> index 18581854ca..0bd1fff942 100644
> --- a/hw/virtio/virtio-pci.h
> +++ b/hw/virtio/virtio-pci.h
> @@ -209,7 +209,8 @@ typedef struct VirtioPCIDeviceTypeInfo {
>       * Implements both INTERFACE_PCIE_DEVICE and INTERFACE_CONVENTIONAL_PCI_DEVICE,
>       * but PCI Express is supported only in non-transitional mode.
>       *
> -     * The only type implemented by QEMU 3.1 and older.
> +     * The only type implemented by QEMU 3.1 and older.  This type is less
> +     * explicit than the transitional and non-transitional device types.
>       */
>      const char *generic_name;
>      /*
> @@ -222,6 +223,9 @@ typedef struct VirtioPCIDeviceTypeInfo {
>       * The non-transitional device type.  Optional.
>       *
>       * Implements INTERFACE_CONVENTIONAL_PCI_DEVICE only.
> +     *
> +     * New virtio device types should only define this and base_name, thereby
> +     * allowing only non-transitional mode.
>       */
>      const char *non_transitional_name;
>  
> -- 
> 2.20.1
> 
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

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

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-25 13:09 [Qemu-devel] [PATCH v2] virtio: clarify VirtioPCIDeviceTypeInfo usage Stefan Hajnoczi
2019-04-25 13:09 ` Stefan Hajnoczi
2019-04-25 17:14 ` Eduardo Habkost
2019-04-25 17:14   ` Eduardo Habkost
2019-05-01 16:21 ` Stefan Hajnoczi
2019-05-01 16:21   ` Stefan Hajnoczi

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.