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

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


  • To: Oleksandr Tyshchenko <olekstysh@xxxxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Wed, 20 Jul 2022 17:03:33 +0100
  • Authentication-results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: <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: Wed, 20 Jul 2022 16:04:12 +0000
  • Ironport-data: A9a23:mtUm06B889WhGRVW/73jw5YqxClBgxIJ4kV8jS/XYbTApG4i1WQGz DAbWD3QbKyKYGD8KN9wPoWz/UkDvJODxoMxQQY4rX1jcSlH+JHPbTi7wuYcHM8wwunrFh8PA xA2M4GYRCwMZiaA4E3ratANlFEkvYmQXL3wFeXYDS54QA5gWU8JhAlq3uU0meaEu/Dga++2k Y608pe31GONgWYuaDpLsfrb8XuDgdyp0N8mlg1mDRx0lAe2e0k9VPo3Oay3Jn3kdYhYdsbSq zHrlezREsvxpn/BO/v9+lrJWhRiro36ZGBivkF+Sam66iWukwRpukoN2FjwXm8M49mBt4gZJ NygLvVcQy9xVkHHsLx1vxW1j0iSlECJkVPKCSHXjCCd86HJWyvsnftgM1MQBKIz4PR9X01l9 MwjAglYO3hvh8ruqF66Yuxlh8BlJ8j3JoIP/HpnyFk1D95/H8qFGf+To4YFgnFg3aiiHt6HD yYdQTNpcBTHZQwJIloNAYgytOypmmP+Y3tTr1f9Sa8fvDWOl1IviOKF3Nz9QOCheNoLzmCim mvi51/TEE44CISyxm/Qmp6rrrCWxn6qMG4IL5Wj7eJjilCXwm0VCTUVWEG9rP3/jVSxM/pdJ FYT4TEGtrUp+QqgSdyVdx+lpH+JuDYMVtwWFPc1gCmHx7DI+Q+fCi4BRyRYdd09nMYsQHoh0 Vrht+3uATtjobiEU0W3/72frS6xESUNJGpEbigBJSMV7t+mrIwtgxbnStd4DLXzntDzASv3w T2BsG45nbp7pckP2qag4UHcgxqjo5HISkg+4QC/dmWh4wBibYipfbu0+EPb5vZNKoWeZlSZt X1CkM+bhMgUCoqHjiuKQ+MlE7Sg5vLDOzrZ6XZwG7Ex+jLr/GSsFb28+xkneh0vaJxdP2a0P gmD4mu9+aO/IlP6bfF5bb2jLf0F5rLyH4rJffHkVfB3N80ZmBC8wM1+WaKB9zmzzRh2yPtuZ c7zndWEVihDV/k+pNaib6JEiOJwmHhjrY/GbcqjpylLx4Zyc5J8pV0tFFKVJt4046qfyOk+2 4YObpDao/mzvQCXX8U2zWLwBQpTRZTDLcqqw/G7j8baSuacJEkvCuXK3ZQqcJF/kqJem4/gp y/gChUFlQqn2CCbeW1mj0yPj5u2B/5CQY8TZ3RwbT5EJVB4CWpQ0EvvX8RuJuR2nACS5fV1U +MEa629Pxi7cRyeomx1RcSs8+RfmOGD313m09yNPGdiJPaNhmXhprfZQ+cY3HJQVHTv6ZRk/ eHIO8GyacNrejmOxf3+MJqHp25dd1BE8A6udyMk+uVuRXg=
  • Ironport-hdrordr: A9a23:cF26XqnybPj3lkY5XDgeYPbnk+DpDfIs3DAbv31ZSRFFG/Fxl6 iV8sjz8SWE7Ar5OUtQ/OxoV5PsfZqxz/JICMwqTNCftWrdyQmVxeNZjbcKqgeIc0aVygce79 YCT0EXMqyXMbEQt6fHCWeDfOod/A==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Sat, Jul 16, 2022 at 07:37:45PM +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_STANDALONE) 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=standalone, 
> 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>

Reviewed-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>

Thanks,

-- 
Anthony PERARD



 


Rackspace

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