[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 Tyshchenko <olekstysh@xxxxxxxxx>
  • From: George Dunlap <George.Dunlap@xxxxxxxxxx>
  • Date: Fri, 24 Jun 2022 12:59:20 +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=K0AWtsG9RwUMTRUD7CMXKMKlZ3tKtKdSaKiyeVLgKXc=; b=X3WBCAX2QUByDEfZEBt1Jf6CcXGkaXhL5a2uKitDkKE0pppTxLQLQL5pnNzsJKphWdP9qVaeBSR5xGubyp4Fcy9xxXKr8+JWUpJt2O9ZirbihAmZibaAaptBwI+QLm1yqNP6rtCP5QkH8O/SuvoVSU6145Nc9UOtfbVPJGxJv1fIfwzTDEwUh4WLiOxNqXJMg6KwQI+4/ZC8zSqGMdflZf3qvnZEAqXyPqj5HnV5ewc5m1G4U80IlFfnWU+pbNHhxanfZT4WSf5EkAPDBZw1wJS4n2ur8oWpntw6fzI2VI9ft/wgZHgPmW3fN5mQ+1fnkeiO/h2X5odQL4iOq/cyzQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Z7Ur9EXhOT7Cswdzc4Wps14M5L+crcYuGP1EpQvqLgzyC71GSHFw+VtEDSXhDT6lOS/rav2mMsGJDyNGEJsaUskQY8k5I+Xzkfy49LRK0F9gY6zV/fq7Rs/CIUEf6lnTjcbao/Gq78eM3SALVKrhYDhK8TVbwlFhOVkFfv6Vr+c6ju4zuzudonUwqdUollSF6q95P3OE+SGhm7RvPTuhReD5HUG73PNy9vy3hCVuxLdIvphjIkhEdXa1QG71lfy3HLwBgcPWP2jNFhrqNSuVvlL0NPDUYGhWf6akevuY76KSZ1oZT/CWbkFtZhapn8xza8H5Vea9/VQa8wMCNcVwpA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony Perard <anthony.perard@xxxxxxxxxx>, Nick Rosbrook <rosbrookn@xxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>
  • Delivery-date: Fri, 24 Jun 2022 12:59:37 +0000
  • Ironport-data: A9a23:RD8T/6AC1FcUbxVW/yXjw5YqxClBgxIJ4kV8jC+esDiIYAhSlGxQk DNbHCvTJK7JMVJBSKlzPd6z8E4A6sfTxoNmHAVsqnpgQ3kRoJPMCI3DcR6gM37Cd5WbRR1q4 ZlBNIKbcZ5kHieBrR30P+G8oSUniP7VLlaQ5JYoHwgoLeMzYHtx2XqP4tIEv7OEoeRVIivUt 935rsPVMQb1gTQpOTxJt/LZ80oy7Piq5GwUtQZlPKEXsAfSmUdOAcNEL8ldDZdZrqq4vAKeb 7yepF1s1jqBp3/BMvv8zvCjNBdirof6ZWBisFIPM0SZqkUE93ZaPpoTbqJGMx8J0WnRxbid9 f0W3XCOYVZxVkHzsLx1vylwS0mS6oUfpdcriVDm2SCi5xWun0nEmp2CP2lvVWEswc5lAHkmy BAtAGtlgiZvJQ6B6OnTpuFE3qzPJSRwVW8VkikIITrxVZ7KTX1fKkljCBAxMDoY36hz8fjii 8UxUg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QbY8VMpuJVm3L tMxH/xjesfMftR9B6NmOQgeisa4XZcm0BS59I7njhaS88TebVRpYsQ8AdcF4oBBjvz7MQiHP N1BM/R6f5KeRfCBkqp9VVH0ZipRDA+Dx2GSk8Ntoic1CVXhmlwyw8dyNYElnkN+ZohQ91P5v jCMK5viLZSJ/VmJZ5VFaMEW4+6G2bNSRXDPCabJknmDrgOPzbXp5v+8NwOlZWXkVwzve4Pcb j6ISNlXDQJCjPT4OW1re522wGIRnmhVjLwzcwb74Rlu9THNcjWDRE=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHYf1BHHIj+DWvN90eGeepJ4klT4a1QiHQAgAAkCwCAAwIpgIAAEjOAgAALK4CACsnDgA==
  • Thread-topic: [PATCH V10 1/3] libxl: Add support for Virtio disk configuration


> 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. 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.)

FWIW the Golang changes look fine.

 -George

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®.