On 09.11.20 08:45, Wei Chen wrote:
Hi Oleksandr,
Hi Wei
-----Original Message-----
From: Xen-devel <xen-devel-boun...@lists.xenproject.org> On Behalf Of
Oleksandr Tyshchenko
Sent: 2020年10月16日 0:45
To: xen-devel@lists.xenproject.org
Cc: Oleksandr Tyshchenko <oleksandr_tyshche...@epam.com>; Ian Jackson
<i...@xenproject.org>; Wei Liu <w...@xen.org>; Anthony PERARD
<anthony.per...@citrix.com>; Julien Grall <jul...@xen.org>; Stefano Stabellini
<sstabell...@kernel.org>
Subject: [PATCH V2 23/23] [RFC] libxl: Add support for virtio-disk configuration
From: Oleksandr Tyshchenko <oleksandr_tyshche...@epam.com>
This patch adds basic support for configuring and assisting virtio-disk
backend (emualator) which is intended to run out of Qemu and could be run
in any domain.
Xenstore was chosen as a communication interface for the emulator running
in non-toolstack domain to be able to get configuration either by reading
Xenstore directly or by receiving command line parameters (an updated 'xl devd'
running in the same domain would read Xenstore beforehand and call backend
executable with the required arguments).
An example of domain configuration (two disks are assigned to the guest,
the latter is in readonly mode):
vdisk = [ 'backend=DomD, disks=rw:/dev/mmcblk0p3;ro:/dev/mmcblk1p3' ]
Can we keep use the same 'disk' parameter for virtio-disk, but add an option
like
"model=virtio-disk"?
For example:
disk = [ 'backend=DomD, disks=rw:/dev/mmcblk0p3,model=virtio-disk' ]
Just like what Xen has done for x86 virtio-net.
I think, this needs an additional investigation. In general I agree with
you that it would be nice to reuse existing 'disk' parameter somehow
rather than introducing new one
for the same purpose (to handle virtual block device(s)).
One note, although both are used for the same purpose they are different
in at least one important option.
For example:
1. disk = [ 'backend=DomD, phy:/dev/mmcblk0p3, xvda1' ]
2. vdisk = [ 'backend=DomD, disks=rw:/dev/mmcblk0p3' ]
As you can see existing "disk" parameter contains xvda1, this means that
a new device /dev/xvda1 will appear at the guest side, but "vdisk"
doesn't contain anything similar. So with Xen PV driver (xen-blkfront)
we are able to configure a device name, but with VirtIO solution
(virtio-blk) we aren't (at least I don't know how exactly).
--
Regards,
Oleksandr Tyshchenko