[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH V10 1/3] libxl: Add support for Virtio disk configuration


  • To: Oleksandr <olekstysh@xxxxxxxxx>
  • From: George Dunlap <George.Dunlap@xxxxxxxxxx>
  • Date: Wed, 13 Jul 2022 00:01:14 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=9w9DfuIotNNjTdgeTIyTRaLbgdwlv2YuodbvsWR+3E8=; b=a3UxRN8E1kWfMJ+Y36Gu0ObCFV4LHeBxXm74XOChVh8FMBcj69fhX8hdhlTcciDgVDbTQBC1rCNlT1bj4yadXGnssbHY4yzFC5mWLOJyRb5yLWjnIezeNFuSEdYoU21wPM+eInPRckKA4649Xbg5f8AVDlZsmzJG/lHx6+HQDqRA+6g4tTEMLYa3W7nIsUbYma88dhCNBvhYfnmLUTm14kTSU2GhcPteHBa46sc9eCk3Bglfu4ClszTy4o5GeNWgSdrTur6xXagR8XLAz4NtjYAV4thg/SFy9JI5SC73cUrFH9sw+TXrvTipCvsaXgZKHi3JOVtg7ClWKdkOiPmFVg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OktGPvDC/s1/ayT7yqrb/pFTn9MC2Qlx1NgzI2QT1rauAab9NUuBA/uTDqsxYLds4Sn2MRpEiOz0dzxCxhulSUPbu32qcpOBHspK/mnx8opP7pk5ubcLZkuD66Rqd+Qy6zO0WQo/Ac8UnWKZetTTBuvZ76X+dTMrzI5dtJg6Rr/Ev12Yb+MEIbPQiwXZx8O1+1zTsh0n0PjlIV2H7ldAxSjSP8nlbTPEIW/pdXV9awAODByc+0PIloVzat9/1o+zIHc7BqL09u1iYgJTasWyL+8A6teEDqhc4cUC5U8wTVgag8fI8hrTdQtS/GhuKDv2KvPZAID/6/f2okHqXZ8Bxg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Anthony Perard <anthony.perard@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>, Wei Liu <wl@xxxxxxx>, Nick Rosbrook <rosbrookn@xxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>
  • Delivery-date: Wed, 13 Jul 2022 00:01:43 +0000
  • Ironport-data: A9a23:R1/e9qsud2tqsI9oEh7mTqDxRefnVFpeMUV32f8akzHdYApBs4E2e 1ou7Vv2eabdPDOxPpsjdtz1pnqyiubUmoQ1SQJtrSg9RSpDopDMVN7IcBiobn6cJMfPEUw+s p9GZoCecJllRHWF/RnwaOTr/XQlifyFG+qkWb6ZYit9LeMIpF/NrDo68wJuqtI40bBVej+wh O4eg/EzGXephmEpajtJ5v/co04/7fmo52hF5A03OKwXtgaOxylIUcNDKfm9IUWjT9gPFIZWZ QpiIJJVXI/9101wYj9wuu+jKiXmepaLYU7WzCA+t5GK2nCunARrukoAHKdaOB0/ZwmhxYgrk o0S7MboE2/FA4WX8Agje0gAe81BFfUuFI/veRBTZuTKkiUq21O1qxlfJBle0b8wo46bMkkXn RAsExgfbwjrug6D6OnTpt+AJCgUBJKD0Is34hmMxNxCZBosacirr67ivbe00Nqs7yzn8Dm3i 8cxMFJSgBr8jxJnJ3FPGNVuuNmRliOkYSBAlH28tbI+yj2GpO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GlpH1v4EDrDvKnZMOq59ls5Vka/ppVJZB6YgEuE9FGpYJGyz3rIghDe l1FcnZoPJba0mTYXzVtnRmhIXEZAV5Ij6WBkwZ/sCF2Tlfm350i0Me2cwEh38FsJYwUYNN6e jIOrlh0LtOUsgVZ6RgA/ppe7r+NkXdBRbXdG6CK1XuE68Kf3rLtp7s+b0woPqnfZQZpaFC7K gpkGkowFLaV3ieefFmhqc7gywlaF/NLgjF24VZ+4VzvKH6Sf7iLTCDIWpe4fednw==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHYf1BHHIj+DWvN90eGeepJ4klT4a1QiHQAgAAkCwCAAwIpgIAAEjOAgAALK4CACsnDgIABrEYAgAe2TICAE6BDgA==
  • Thread-topic: [PATCH V10 1/3] libxl: Add support for Virtio disk configuration



On 30 Jun 2022, at 22:18, Oleksandr <olekstysh@xxxxxxxxx> wrote:


Dear all.


On 25.06.22 17:32, Oleksandr wrote:

On 24.06.22 15:59, George Dunlap wrote:

Hello George


On 17 Jun 2022, at 17:14, Oleksandr Tyshchenko <olekstysh@xxxxxxxxx> wrote:

From: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>

This patch adds basic support for configuring and assisting virtio-mmio
based virtio-disk backend (emulator) which is intended to run out of
Qemu and could be run in any domain.
Although the Virtio block device is quite different from traditional
Xen PV block device (vbd) from the toolstack's point of view:
- as the frontend is virtio-blk which is not a Xenbus driver, nothing
written to Xenstore are fetched by the frontend currently ("vdev"
is not passed to the frontend). But this might need to be revised
in future, so frontend data might be written to Xenstore in order to
support hotplugging virtio devices or passing the backend domain id
on arch where the device-tree is not available.
- the ring-ref/event-channel are not used for the backend<->frontend
communication, the proposed IPC for Virtio is IOREQ/DM
it is still a "block device" and ought to be integrated in existing
"disk" handling. So, re-use (and adapt) "disk" parsing/configuration
logic to deal with Virtio devices as well.

For the immediate purpose and an ability to extend that support for
other use-cases in future (Qemu, virtio-pci, etc) perform the following
actions:
- Add new disk backend type (LIBXL_DISK_BACKEND_OTHER) and reflect
that in the configuration
- Introduce new disk "specification" and "transport" fields to struct
libxl_device_disk. Both are written to the Xenstore. The transport
field is only used for the specification "virtio" and it assumes
only "mmio" value for now.
- Introduce new "specification" option with "xen" communication
protocol being default value.
- Add new device kind (LIBXL__DEVICE_KIND_VIRTIO_DISK) as current
one (LIBXL__DEVICE_KIND_VBD) doesn't fit into Virtio disk model

An example of domain configuration for Virtio disk:
disk = [ 'phy:/dev/mmcblk0p3, xvda1, backendtype=other, specification=virtio']

Nothing has changed for default Xen disk configuration.

Please note, this patch is not enough for virtio-disk to work
on Xen (Arm), as for every Virtio device (including disk) we need
to allocate Virtio MMIO params (IRQ and memory region) and pass
them to the backend, also update Guest device-tree. The subsequent
patch will add these missing bits. For the current patch,
the default "irq" and "base" are just written to the Xenstore.
This is not an ideal splitting, but this way we avoid breaking
the bisectability.

Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>
OK, I am *really* sorry for coming in here at the last minute and quibbling about things.


no problem


But this introduces a public interface which looks really wrong to me.  I’ve replied to the mail from December where Juergen proposed the “Other” protocol.

Hopefully this will be a simple matter of finding a better name than “other”. (Or you guys convincing me that “other” is really the best name for this value; or even Anthony asserting his right as a maintainer to overrule my objection if he thinks I’m out of line.)


I saw your reply to V6 and Juergen's answer. I share Juergen's opinion as well as I understand your concern. I think, this is exactly the situation when finding a perfect name (obvious, short, etc) for the backendtype (in our particular case) is really difficult.

Personally I tend to leave "other", because there is no better alternative from my PoV. Also I might be completely wrong here, but I don't think we will have to extend the "backendtype" for supporting other possible virtio backend implementations in the foreseeable future:

- when Qemu gains the required support we will choose qdisk: backendtype qdisk specification virtio
- for the possible virtio alternative of the blkback we will choose phy: backendtype phy specification virtio

If there will be a need to keep various implementation, we will be able to describe that by using "transport" (mmio, pci, xenbus, argo, whatever).
Actually this is why we also introduced "specification" and "transport".

IIRC, there were other (suggested?) names except "other" which are "external" and "daemon". If you think that one of them is better than "other", I will happy to use it.


Could we please make a decision on this?

If "other" is not unambiguous, then maybe we could choose "daemon" to describe arbitrary user-level backends, any thought?

Unfortunately I didn’t have time to dig into this; I’m just going to have to withdraw my objection, and let you & Juergen decide what to call it.

Re the golang changes:

Acked-by: George Dunlap <george.dunlap@xxxxxxxxxx>

Attachment: signature.asc
Description: Message signed with OpenPGP


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.