All of lore.kernel.org
 help / color / mirror / Atom feed
From: Venu Busireddy <venu.busireddy@oracle.com>
To: venu.busireddy@oracle.com, "Michael S . Tsirkin" <mst@redhat.com>,
	Marcel Apfelbaum <marcel@redhat.com>
Cc: virtio-dev@lists.oasis-open.org, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH v3 0/3] Use of unique identifier for pairing virtio and passthrough devices...
Date: Fri, 29 Jun 2018 17:19:03 -0500	[thread overview]
Message-ID: <20180629221907.3662-1-venu.busireddy@oracle.com> (raw)

The patch set "Enable virtio_net to act as a standby for a passthru
device" [1] deals with live migration of guests that use passthrough
devices. However, that scheme uses the MAC address for pairing
the virtio device and the passthrough device. The thread "netvsc:
refactor notifier/event handling code to use the failover framework"
[2] discusses an alternate mechanism, such as using an UUID, for pairing
the devices. Based on that discussion, proposals "Add "Group Identifier"
to virtio PCI capabilities." [3] and "RFC: Use of bridge devices to
store pairing information..." [4] were made.

The current patch set includes all the feedback received for proposals [3]
and [4]. For the sake of completeness, patch for the virtio specification
is also included here. Following is the updated proposal.

1. Extend the virtio specification to include a new virtio PCI capability
   "VIRTIO_PCI_CAP_GROUP_ID_CFG".

2. Enhance the QEMU CLI to include a "failover-group-id" option to the
   virtio device. The "failover-group-id" is a 64 bit value.

3. Enhance the QEMU CLI to include a "failover-group-id" option to the
   Red Hat PCI bridge device (support for the i440FX model).

4. Add a new "pcie-downstream" device, with the option
   "failover-group-id" (support for the Q35 model).

5. The operator creates a 64 bit unique identifier, failover-group-id.

6. When the virtio device is created, the operator uses the
   "failover-group-id" option (for example, '-device
   virtio-net-pci,failover-group-id=<identifier>') and specifies the
   failover-group-id created in step 4.

   QEMU stores the failover-group-id in the virtio device's configuration
   space in the capability "VIRTIO_PCI_CAP_GROUP_ID_CFG".

7. When assigning a PCI device to the guest in passthrough mode, the
   operator first creates a bridge using the "failover-group-id" option
   (for example, '-device pcie-downstream,failover-group-id=<identifier>')
   to specify the failover-group-id created in step 4, and then attaches
   the passthrough device to the bridge.

   QEMU stores the failover-group-id in the configuration space of the
   bridge as Vendor-Specific capability (0x09). The "Vendor" here is
   not to be confused with a specific organization. Instead, the vendor
   of the bridge is QEMU.

8. Patch 4 in patch series "Enable virtio_net to act as a standby for
   a passthru device" [1] needs to be modified to use the UUID values
   present in the bridge's configuration space and the virtio device's
   configuration space instead of the MAC address for pairing the devices.

Thanks!

Venu

[1] https://lists.oasis-open.org/archives/virtio-dev/201805/msg00156.html
[2] https://www.spinics.net/lists/netdev/msg499011.html
[3] https://lists.oasis-open.org/archives/virtio-dev/201805/msg00118.html
[4] https://lists.oasis-open.org/archives/virtio-dev/201805/msg00204.html

Changes in v3:
  - As Michael Tsirkin suggested:
    * Changed the failover group identifier from UUID to a 64-bit value.
    * Changed the command line option from "uuid" to "failover-group-id".
    * Tweaked the "pci-bridge" device's Device ID to
      PCI_DEVICE_ID_REDHAT_BRIDGE_FAILOVER.
    * Added to new device "pcie-downstream" with Device ID
      PCI_DEVICE_ID_REDHAT_DOWNPORT_FAILOVER (to support the PCIe case).
  - Changed the patch for virtio specification to reflect the above
    changes.

Changes in v2:
  - As Michael Tsirkin suggested, changed the virtio specification
    to restrict the group identifier to be a 16-byte field, presented
    entirely in the virtio device's configuration space.
  - As Michael Tsirkin suggested, instead of tweaking the ioh3420
    device with Red Hat vendor ID, create a new PCIe bridge device
    named "pcie-downstream" with Red Hat Vendor ID, and include the
    group identifier in this device.
  - Added a new patch to enhance the "pci-bridge" device to support
    the group identifier (for the i440FX model).

Venu Busireddy (3):
  Add "Group Identifier" support to virtio devices.
  Add "Group Identifier" support to Red Hat PCI bridge.
  Add "Group Identifier" support to Red Hat PCI Express bridge.

 default-configs/arm-softmmu.mak             |   1 +
 default-configs/i386-softmmu.mak            |   1 +
 default-configs/x86_64-softmmu.mak          |   1 +
 hw/pci-bridge/Makefile.objs                 |   1 +
 hw/pci-bridge/pci_bridge_dev.c              |  10 +
 hw/pci-bridge/pcie_downstream.c             | 220 ++++++++++++++++++++
 hw/pci-bridge/pcie_downstream.h             |  10 +
 hw/pci/pci_bridge.c                         |  34 +++
 hw/virtio/virtio-pci.c                      |  15 ++
 hw/virtio/virtio-pci.h                      |   3 +-
 include/hw/pci/pci.h                        |  37 ++--
 include/hw/pci/pci_bridge.h                 |   2 +
 include/hw/pci/pcie.h                       |   1 +
 include/standard-headers/linux/virtio_pci.h |   8 +
 14 files changed, 326 insertions(+), 18 deletions(-)
 create mode 100644 hw/pci-bridge/pcie_downstream.c
 create mode 100644 hw/pci-bridge/pcie_downstream.h

WARNING: multiple messages have this Message-ID (diff)
From: Venu Busireddy <venu.busireddy@oracle.com>
To: venu.busireddy@oracle.com, "Michael S . Tsirkin" <mst@redhat.com>,
	Marcel Apfelbaum <marcel@redhat.com>
Cc: virtio-dev@lists.oasis-open.org, qemu-devel@nongnu.org
Subject: [virtio-dev] [PATCH v3 0/3] Use of unique identifier for pairing virtio and passthrough devices...
Date: Fri, 29 Jun 2018 17:19:03 -0500	[thread overview]
Message-ID: <20180629221907.3662-1-venu.busireddy@oracle.com> (raw)

The patch set "Enable virtio_net to act as a standby for a passthru
device" [1] deals with live migration of guests that use passthrough
devices. However, that scheme uses the MAC address for pairing
the virtio device and the passthrough device. The thread "netvsc:
refactor notifier/event handling code to use the failover framework"
[2] discusses an alternate mechanism, such as using an UUID, for pairing
the devices. Based on that discussion, proposals "Add "Group Identifier"
to virtio PCI capabilities." [3] and "RFC: Use of bridge devices to
store pairing information..." [4] were made.

The current patch set includes all the feedback received for proposals [3]
and [4]. For the sake of completeness, patch for the virtio specification
is also included here. Following is the updated proposal.

1. Extend the virtio specification to include a new virtio PCI capability
   "VIRTIO_PCI_CAP_GROUP_ID_CFG".

2. Enhance the QEMU CLI to include a "failover-group-id" option to the
   virtio device. The "failover-group-id" is a 64 bit value.

3. Enhance the QEMU CLI to include a "failover-group-id" option to the
   Red Hat PCI bridge device (support for the i440FX model).

4. Add a new "pcie-downstream" device, with the option
   "failover-group-id" (support for the Q35 model).

5. The operator creates a 64 bit unique identifier, failover-group-id.

6. When the virtio device is created, the operator uses the
   "failover-group-id" option (for example, '-device
   virtio-net-pci,failover-group-id=<identifier>') and specifies the
   failover-group-id created in step 4.

   QEMU stores the failover-group-id in the virtio device's configuration
   space in the capability "VIRTIO_PCI_CAP_GROUP_ID_CFG".

7. When assigning a PCI device to the guest in passthrough mode, the
   operator first creates a bridge using the "failover-group-id" option
   (for example, '-device pcie-downstream,failover-group-id=<identifier>')
   to specify the failover-group-id created in step 4, and then attaches
   the passthrough device to the bridge.

   QEMU stores the failover-group-id in the configuration space of the
   bridge as Vendor-Specific capability (0x09). The "Vendor" here is
   not to be confused with a specific organization. Instead, the vendor
   of the bridge is QEMU.

8. Patch 4 in patch series "Enable virtio_net to act as a standby for
   a passthru device" [1] needs to be modified to use the UUID values
   present in the bridge's configuration space and the virtio device's
   configuration space instead of the MAC address for pairing the devices.

Thanks!

Venu

[1] https://lists.oasis-open.org/archives/virtio-dev/201805/msg00156.html
[2] https://www.spinics.net/lists/netdev/msg499011.html
[3] https://lists.oasis-open.org/archives/virtio-dev/201805/msg00118.html
[4] https://lists.oasis-open.org/archives/virtio-dev/201805/msg00204.html

Changes in v3:
  - As Michael Tsirkin suggested:
    * Changed the failover group identifier from UUID to a 64-bit value.
    * Changed the command line option from "uuid" to "failover-group-id".
    * Tweaked the "pci-bridge" device's Device ID to
      PCI_DEVICE_ID_REDHAT_BRIDGE_FAILOVER.
    * Added to new device "pcie-downstream" with Device ID
      PCI_DEVICE_ID_REDHAT_DOWNPORT_FAILOVER (to support the PCIe case).
  - Changed the patch for virtio specification to reflect the above
    changes.

Changes in v2:
  - As Michael Tsirkin suggested, changed the virtio specification
    to restrict the group identifier to be a 16-byte field, presented
    entirely in the virtio device's configuration space.
  - As Michael Tsirkin suggested, instead of tweaking the ioh3420
    device with Red Hat vendor ID, create a new PCIe bridge device
    named "pcie-downstream" with Red Hat Vendor ID, and include the
    group identifier in this device.
  - Added a new patch to enhance the "pci-bridge" device to support
    the group identifier (for the i440FX model).

Venu Busireddy (3):
  Add "Group Identifier" support to virtio devices.
  Add "Group Identifier" support to Red Hat PCI bridge.
  Add "Group Identifier" support to Red Hat PCI Express bridge.

 default-configs/arm-softmmu.mak             |   1 +
 default-configs/i386-softmmu.mak            |   1 +
 default-configs/x86_64-softmmu.mak          |   1 +
 hw/pci-bridge/Makefile.objs                 |   1 +
 hw/pci-bridge/pci_bridge_dev.c              |  10 +
 hw/pci-bridge/pcie_downstream.c             | 220 ++++++++++++++++++++
 hw/pci-bridge/pcie_downstream.h             |  10 +
 hw/pci/pci_bridge.c                         |  34 +++
 hw/virtio/virtio-pci.c                      |  15 ++
 hw/virtio/virtio-pci.h                      |   3 +-
 include/hw/pci/pci.h                        |  37 ++--
 include/hw/pci/pci_bridge.h                 |   2 +
 include/hw/pci/pcie.h                       |   1 +
 include/standard-headers/linux/virtio_pci.h |   8 +
 14 files changed, 326 insertions(+), 18 deletions(-)
 create mode 100644 hw/pci-bridge/pcie_downstream.c
 create mode 100644 hw/pci-bridge/pcie_downstream.h


---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org


             reply	other threads:[~2018-06-29 22:19 UTC|newest]

Thread overview: 106+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-29 22:19 Venu Busireddy [this message]
2018-06-29 22:19 ` [virtio-dev] [PATCH v3 0/3] Use of unique identifier for pairing virtio and passthrough devices Venu Busireddy
2018-06-29 22:19 ` [Qemu-devel] [PATCH v3 1/3] Add "Group Identifier" support to virtio devices Venu Busireddy
2018-06-29 22:19   ` [virtio-dev] " Venu Busireddy
2018-06-29 22:19 ` [Qemu-devel] [PATCH v3 2/3] Add "Group Identifier" support to Red Hat PCI bridge Venu Busireddy
2018-06-29 22:19   ` [virtio-dev] " Venu Busireddy
2018-07-03  3:13   ` [Qemu-devel] " Siwei Liu
2018-07-03  3:13     ` Siwei Liu
2018-06-29 22:19 ` [Qemu-devel] [PATCH v3 3/3] Add "Group Identifier" support to Red Hat PCI Express bridge Venu Busireddy
2018-06-29 22:19   ` [virtio-dev] " Venu Busireddy
2018-07-07 12:14   ` [Qemu-devel] " Marcel Apfelbaum
2018-07-07 12:14     ` Marcel Apfelbaum
2018-07-31 15:58     ` [Qemu-devel] " Venu Busireddy
2018-07-31 15:58       ` Venu Busireddy
2018-07-31 16:03       ` [Qemu-devel] " Michael S. Tsirkin
2018-07-31 16:03         ` Michael S. Tsirkin
2018-07-31 19:11         ` [Qemu-devel] " Marcel Apfelbaum
2018-07-31 19:11           ` Marcel Apfelbaum
2018-06-29 22:19 ` [Qemu-devel] [PATCH v3 virtio 1/1] Add "Group Identifier" to virtio PCI capabilities Venu Busireddy
2018-06-29 22:19   ` [virtio-dev] " Venu Busireddy
2018-07-02 16:14 ` [Qemu-devel] [PATCH v3 0/3] Use of unique identifier for pairing virtio and passthrough devices Roman Kagan
2018-07-02 21:14   ` si-wei liu
2018-07-02 21:14     ` [virtio-dev] " si-wei liu
2018-07-03  9:58     ` Roman Kagan
2018-07-03 14:28       ` Venu Busireddy
2018-07-03 14:28         ` [virtio-dev] " Venu Busireddy
2018-07-03 14:52         ` [Qemu-devel] [virtio-dev] " Cornelia Huck
2018-07-03 14:52           ` [virtio-dev] Re: [Qemu-devel] " Cornelia Huck
2018-07-03 23:31           ` [Qemu-devel] [virtio-dev] " Siwei Liu
2018-07-03 23:31             ` [virtio-dev] Re: [Qemu-devel] " Siwei Liu
2018-07-04 12:15             ` [Qemu-devel] [virtio-dev] " Cornelia Huck
2018-07-04 12:15               ` [virtio-dev] Re: [Qemu-devel] " Cornelia Huck
2018-07-06  0:49               ` [Qemu-devel] [virtio-dev] " Siwei Liu
2018-07-06  0:49                 ` [virtio-dev] Re: [Qemu-devel] " Siwei Liu
2018-07-06 13:54                 ` [Qemu-devel] [virtio-dev] " Cornelia Huck
2018-07-06 13:54                   ` [virtio-dev] Re: [Qemu-devel] " Cornelia Huck
2018-07-06 15:07                   ` [Qemu-devel] [virtio-dev] " Michael S. Tsirkin
2018-07-06 15:07                     ` [virtio-dev] Re: [Qemu-devel] " Michael S. Tsirkin
2018-07-09 16:20                     ` [Qemu-devel] [virtio-dev] " Cornelia Huck
2018-07-09 16:20                       ` [virtio-dev] Re: [Qemu-devel] " Cornelia Huck
2018-07-06 23:37                   ` [Qemu-devel] [virtio-dev] " Siwei Liu
2018-07-06 23:37                     ` [virtio-dev] Re: [Qemu-devel] " Siwei Liu
2018-07-09 16:27                     ` [Qemu-devel] [virtio-dev] " Cornelia Huck
2018-07-09 16:27                       ` [virtio-dev] Re: [Qemu-devel] " Cornelia Huck
2018-07-09 13:14                   ` [Qemu-devel] [virtio-dev] " Roman Kagan
2018-07-09 13:14                     ` [virtio-dev] Re: [Qemu-devel] " Roman Kagan
2018-07-09 16:10                     ` [Qemu-devel] [virtio-dev] " Cornelia Huck
2018-07-09 16:10                       ` [virtio-dev] Re: [Qemu-devel] " Cornelia Huck
2018-07-03 15:34         ` Roman Kagan
2018-07-03 22:27       ` si-wei liu
2018-07-03 22:27         ` [virtio-dev] " si-wei liu
2018-07-09 13:00         ` Roman Kagan
2018-07-09 18:35           ` Michael S. Tsirkin
2018-07-09 18:35             ` [virtio-dev] " Michael S. Tsirkin
2018-07-10  1:11           ` si-wei liu
2018-07-10  1:11             ` [virtio-dev] " si-wei liu
2018-07-10  1:54             ` Michael S. Tsirkin
2018-07-10  1:54               ` [virtio-dev] " Michael S. Tsirkin
2018-07-11  0:07               ` Siwei Liu
2018-07-11  0:07                 ` [virtio-dev] " Siwei Liu
2018-07-11  0:07                 ` [Qemu-devel] [virtio-dev] " Siwei Liu
2018-07-11  9:53                 ` Re: [Qemu-devel] " Cornelia Huck
2018-07-11  9:53                   ` [virtio-dev] " Cornelia Huck
2018-07-11  9:53                   ` [Qemu-devel] [virtio-dev] " Cornelia Huck
2018-07-12  9:37                   ` Re: [Qemu-devel] " Siwei Liu
2018-07-12  9:37                     ` [virtio-dev] " Siwei Liu
2018-07-12  9:37                     ` [Qemu-devel] [virtio-dev] " Siwei Liu
2018-07-12 11:31                     ` Re: [Qemu-devel] " Cornelia Huck
2018-07-12 11:31                       ` [virtio-dev] " Cornelia Huck
2018-07-12 11:31                       ` [Qemu-devel] [virtio-dev] " Cornelia Huck
2018-07-12 20:52                       ` Re: [Qemu-devel] " Siwei Liu
2018-07-12 20:52                         ` [virtio-dev] " Siwei Liu
2018-07-12 20:52                         ` [Qemu-devel] [virtio-dev] " Siwei Liu
2018-07-12 21:00                         ` Re: [Qemu-devel] " Michael S. Tsirkin
2018-07-12 21:00                           ` [virtio-dev] " Michael S. Tsirkin
2018-07-12 21:00                           ` [Qemu-devel] [virtio-dev] " Michael S. Tsirkin
2018-07-12 22:19                           ` Re: [Qemu-devel] " Siwei Liu
2018-07-12 22:19                             ` [virtio-dev] " Siwei Liu
2018-07-12 22:19                             ` [Qemu-devel] [virtio-dev] " Siwei Liu
2018-07-13  1:20                             ` Re: [Qemu-devel] " Samudrala, Sridhar
2018-07-13  1:20                               ` [virtio-dev] " Samudrala, Sridhar
2018-07-13  1:20                               ` [Qemu-devel] [virtio-dev] " Samudrala, Sridhar
2018-07-13  3:28                               ` Re: [Qemu-devel] " Michael S. Tsirkin
2018-07-13  3:28                                 ` [virtio-dev] " Michael S. Tsirkin
2018-07-13  3:28                                 ` [Qemu-devel] [virtio-dev] " Michael S. Tsirkin
2018-07-13  9:15                               ` Re: [Qemu-devel] " Cornelia Huck
2018-07-13  9:15                                 ` [virtio-dev] " Cornelia Huck
2018-07-13  9:15                                 ` [Qemu-devel] [virtio-dev] " Cornelia Huck
2018-07-12 19:18                   ` Re: [Qemu-devel] " Michael S. Tsirkin
2018-07-12 19:18                     ` [virtio-dev] " Michael S. Tsirkin
2018-07-12 19:18                     ` [Qemu-devel] [virtio-dev] " Michael S. Tsirkin
2018-07-10  1:58             ` [Qemu-devel] " Michael S. Tsirkin
2018-07-10  1:58               ` [virtio-dev] " Michael S. Tsirkin
2018-07-10 18:56               ` Siwei Liu
2018-07-10 18:56                 ` [virtio-dev] " Siwei Liu
2018-07-10 18:56                 ` [Qemu-devel] [virtio-dev] " Siwei Liu
2018-07-10  2:05           ` [Qemu-devel] " Michael S. Tsirkin
2018-07-10  2:05             ` [virtio-dev] " Michael S. Tsirkin
2018-07-04  5:43       ` Michael S. Tsirkin
2018-07-04  5:43         ` [virtio-dev] " Michael S. Tsirkin
2018-07-10  2:11 ` Michael S. Tsirkin
2018-07-10  2:11   ` [virtio-dev] " Michael S. Tsirkin
2018-07-10 14:28   ` [Qemu-devel] " Venu Busireddy
2018-07-10 14:28     ` [virtio-dev] " Venu Busireddy
2018-07-12 21:01     ` [Qemu-devel] " Michael S. Tsirkin
2018-07-12 21:01       ` [virtio-dev] " Michael S. Tsirkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180629221907.3662-1-venu.busireddy@oracle.com \
    --to=venu.busireddy@oracle.com \
    --cc=marcel@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=virtio-dev@lists.oasis-open.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.