[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH V10.1 1/3] libxl: Add support for Virtio disk configuration
- To: Anthony PERARD <anthony.perard@xxxxxxxxxx>
- From: Oleksandr Tyshchenko <olekstysh@xxxxxxxxx>
- Date: Thu, 23 Jun 2022 16:09:23 +0300
- Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>, Wei Liu <wl@xxxxxxx>, George Dunlap <george.dunlap@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: Thu, 23 Jun 2022 13:09:39 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Hello Anthony
[sorry for the possible format issues] On Fri, Jun 17, 2022 at 07:14:31PM +0300, Oleksandr Tyshchenko 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>
> ---
> Changes V10 -> V10.1:
> - fix small coding style issue in libxl__device_disk_get_path()
> - drop specification check in main_blockattach() and add
> required check in libxl__device_disk_setdefault()
> - update specification check in main_blockdetach()
For this v10.1: Reviewed-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
perfect, thanks!
BTW, the subject of this updated patch still state "v10" instead of
"v10.1", hopefully committers can pick the right version.
Oh, sorry, I was thinking to use "v10.1", but I wasn't sure that commit with updated subject would properly appear in the current thread if being sent using git send-email --in-reply-to))
Cheers,
--
Anthony PERARD
--
|