qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Venu Busireddy <venu.busireddy@oracle.com>
Cc: Roman Kagan <rkagan@virtuozzo.com>,
	Marcel Apfelbaum <marcel@redhat.com>,
	virtio-dev@lists.oasis-open.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 0/4] Use of unique identifier for pairing virtio and passthrough devices...
Date: Wed, 27 Jun 2018 22:47:05 +0300	[thread overview]
Message-ID: <20180627224418-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20180627192958.GA17236@vbusired-vm>

On Wed, Jun 27, 2018 at 02:29:58PM -0500, Venu Busireddy wrote:
> On 2018-06-27 15:24:58 +0300, Roman Kagan wrote:
> > On Tue, Jun 26, 2018 at 10:49:30PM -0500, Venu Busireddy wrote:
> > > 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.
> > 
> > I must have missed something in those threads, but where does this UUID
> > thing come about?  AFAICS this identifier doesn't need to be
> > "universally" unique, nor persistent; it only has to be unique across
> > the VM and stable throughout the VM lifetime.
> 
> The notion of using UUID came up in the thread
> 
>    https://www.spinics.net/lists/netdev/msg499011.html

That's probably because it was expected one of standard serial number capabilities
(VPD or PCI Express serial #) will be used, which are expected to be unique.

If you are rolling your own vendor specific one, it's just an ID and
does not have to be unique.

> > FWIW Hyper-V uses a 32-bit integer for this purpose, not a UUID as seems
> > to be implied in the thread you refer to.
> 
> Yes, Hyper-V uses a serial number (but I think it is 64-bit value).
> However, what we are doing is similar to that. Instead of 32 bits,
> we are using 128 bits.

That's OK. The name is confusing though. It's a failover group id,
not a UUID.

> > > 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 "uuid" option to the virtio device.
> > >    The "uuid" is a string in UUID format.
> > > 
> > > 3. Enhance the QEMU CLI to include a "uuid" option to the bridge device.
> > >    The "uuid" is a string in UUID format. Currently, PCIe bridge for
> > >    the Q35 model is supported.
> > > 
> > > 4. The operator creates a unique identifier string using 'uuidgen'.
> > > 
> > > 5. When the virtio device is created, the operator uses the "uuid" option
> > >    (for example, '-device virtio-net-pci,uuid="string"') and specifies
> > >    the UUID created in step 4.
> > > 
> > >    QEMU stores the UUID in the virtio device's configuration space
> > >    in the capability "VIRTIO_PCI_CAP_GROUP_ID_CFG".
> > > 
> > > 6. When assigning a PCI device to the guest in passthrough mode, the
> > >    operator first creates a bridge using the "uuid" option (for example,
> > >    '-device pcie-downstream,uuid="string"') to specify the UUID created
> > >    in step 4, and then attaches the passthrough device to the bridge.
> > > 
> > >    QEMU stores the UUID 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. To avoid mixing up with other bridges, the bridge
> > >    will be created with vendor ID 0x1b36 (PCI_VENDOR_ID_REDHAT) and
> > >    device ID 0x000e (PCI_DEVICE_ID_REDHAT_PCIE_BRIDGE) if the "uuid"
> > >    option is specified. Otherwise, current defaults are used.
> > 
> > I wonder if it makes more sense to drop the concept of failover groups,
> > and just refer to the standby device by device-id, like 
> > 
> >   -device virtio-net-pci,id=foo \
> >   -device pcie-downstream,failover=foo
> 
> Isn't this the same as what this patch series proposes? In your
> suggestion, "foo" is the entity that connects the passthrough device
> and the failover device. In this patch set, that "foo" is the UUID,
> and the options "id" and "failover" are replaced by "uuid". Do you agree?
> 
> Regards,
> 
> Venu
> 
> > The bridge device will then lookup the failover device, figure out the
> > common identifier to expose to the guest, and defer the visibility of
> > the PT device behind the bridge until the guest acknowledged the support
> > for failover on the PV device.
> > 
> > Roman.

  reply	other threads:[~2018-06-27 19:47 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-27  3:49 [Qemu-devel] [PATCH v2 0/4] Use of unique identifier for pairing virtio and passthrough devices Venu Busireddy
2018-06-27  3:49 ` [Qemu-devel] [PATCH v2 1/4] Add a true or false option to the DEFINE_PROP_UUID macro Venu Busireddy
2018-06-27  3:49 ` [Qemu-devel] [PATCH v2 2/4] Add "Group Identifier" support to virtio devices Venu Busireddy
2018-06-27  3:49 ` [Qemu-devel] [PATCH v2 3/4] Add "Group Identifier" support to Red Hat PCI bridge Venu Busireddy
2018-06-27  4:02   ` Michael S. Tsirkin
2018-06-27  4:08     ` [Qemu-devel] [virtio-dev] " Venu Busireddy
2018-06-27 23:07       ` Venu Busireddy
2018-06-28  2:14         ` Michael S. Tsirkin
2018-06-28  3:46           ` Venu Busireddy
2018-06-28  8:10           ` Siwei Liu
2018-06-28  8:25     ` [Qemu-devel] " Daniel P. Berrangé
2018-06-28 10:07       ` [Qemu-devel] Retrieving configuration metadata from hypervisor (was: Re: [PATCH v2 3/4] Add "Group Identifier" support to Red Hat PCI bridge.) Cornelia Huck
2018-06-27  3:49 ` [Qemu-devel] [PATCH v2 4/4] Add "Group Identifier" support to Red Hat PCI Express bridge Venu Busireddy
2018-06-27  3:49 ` [Qemu-devel] [PATCH v2 virtio 1/1] Add "Group Identifier" to virtio PCI capabilities Venu Busireddy
2018-06-27  4:06 ` [Qemu-devel] [PATCH v2 0/4] Use of unique identifier for pairing virtio and passthrough devices Michael S. Tsirkin
2018-06-27  4:12   ` [Qemu-devel] [virtio-dev] " Venu Busireddy
2018-06-27  7:21   ` Siwei Liu
2018-06-27  8:17   ` Cornelia Huck
2018-06-27 12:24 ` [Qemu-devel] " Roman Kagan
2018-06-27 19:29   ` Venu Busireddy
2018-06-27 19:47     ` Michael S. Tsirkin [this message]
2018-06-27 19:59       ` Venu Busireddy
2018-06-27 20:12         ` Michael S. Tsirkin
2018-06-27 22:34           ` Venu Busireddy
2018-06-28  1:54             ` Michael S. Tsirkin
2018-06-28  3:27               ` Venu Busireddy
2018-06-29 18:55                 ` [Qemu-devel] [virtio-dev] " Venu Busireddy
2018-06-29 21:59                   ` Michael S. Tsirkin
2018-06-28 10:17     ` [Qemu-devel] " Roman Kagan

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=20180627224418-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=marcel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rkagan@virtuozzo.com \
    --cc=venu.busireddy@oracle.com \
    --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 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).