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

RE: [PATCH V2 23/23] [RFC] libxl: Add support for virtio-disk configuration


  • To: Oleksandr <olekstysh@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Wei Chen <Wei.Chen@xxxxxxx>
  • Date: Wed, 11 Nov 2020 04:28:51 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.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-SenderADCheck; bh=QS7xoR716HkevH42CvyZCMeN8quVhoRGF5711cjYfKk=; b=HgggEgP6ajZjsl9yDGjtdoKHjcz1RQWKE6AiWjJbWqQfdKDzILoNmahbFLXPQrdbE1/tpvDxCELzPAfD+xDK9oWoLbQ+TtDrUBEb6BzNBum2f5gAu+bmCbPMjNULuRY2s2kakh++Ep2Sn/hR0do1ECrRckmE3jqXRm0O8jhBbPv7+jq7Yp0PEUrs8WUJVuswM8KyJxk4yaKFqAsSnFh0MuEFnthDgE5UpXOciSr8KcLika2URuPNbWNX27wofZ9tWYgc9FSn4qM9Jn7TeIqqR3AFX44ogeiEgu3u97ZfQZB0s3cdyOaLop4mu278Qc73ZX5G3vPAGvXHCzYhIr3F7g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gecXuaWo07v9AA1MeaqH7jFzplMtQiBfcY/pWIoRITt8LSBzcfjk34QTrr7Vu127aPQxbFaD8BPfxlKgmj6bnXYdevMY9fAwjDsFKnYq1e4AyjFq18SDNHMG9n8Cwdp3kImgq4anIYcBZtzVWccm7DBa0jz8ttoU3zHAfEIQ+zvjLAg5EodEvg2F0qfzEn3pAfLQYProIX8da4alKkmmQxEbrR941rt72pepDd9xaxorjkCk/t5UCVq57+Jq7nFGAQtjuhstQ1u9Z43a9ZQkAQrVI3P5hMz0mEQ+QmAcvxuM4W4KZDrk4VvJK8eRiumnEJqKaPSK/rDiGkacaEBe8w==
  • Authentication-results-original: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=arm.com;
  • Cc: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • Delivery-date: Wed, 11 Nov 2020 04:29:14 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHWoxPDW60DxIWT4kuneyvO4zzD5qm/gHcQgALDY4CAAC0d4A==
  • Thread-topic: [PATCH V2 23/23] [RFC] libxl: Add support for virtio-disk configuration

Hi Oleksandr,

> -----Original Message-----
> From: Oleksandr <olekstysh@xxxxxxxxx>
> Sent: 2020年11月11日 8:53
> To: Wei Chen <Wei.Chen@xxxxxxx>; xen-devel@xxxxxxxxxxxxxxxxxxxx
> Cc: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>; Ian Jackson
> <iwj@xxxxxxxxxxxxxx>; Wei Liu <wl@xxxxxxx>; Anthony PERARD
> <anthony.perard@xxxxxxxxxx>; Julien Grall <julien@xxxxxxx>; Stefano Stabellini
> <sstabellini@xxxxxxxxxx>
> Subject: Re: [PATCH V2 23/23] [RFC] libxl: Add support for virtio-disk
> configuration
> 
> 
> On 09.11.20 08:45, Wei Chen wrote:
> > Hi Oleksandr,
> 
> Hi Wei
> 
> 
> >
> >> -----Original Message-----
> >> From: Xen-devel <xen-devel-bounces@xxxxxxxxxxxxxxxxxxxx> On Behalf Of
> >> Oleksandr Tyshchenko
> >> Sent: 2020年10月16日 0:45
> >> To: xen-devel@xxxxxxxxxxxxxxxxxxxx
> >> Cc: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>; Ian Jackson
> >> <iwj@xxxxxxxxxxxxxx>; Wei Liu <wl@xxxxxxx>; Anthony PERARD
> >> <anthony.perard@xxxxxxxxxx>; Julien Grall <julien@xxxxxxx>; Stefano
> Stabellini
> >> <sstabellini@xxxxxxxxxx>
> >> Subject: [PATCH V2 23/23] [RFC] libxl: Add support for virtio-disk
> configuration
> >>
> >> From: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>
> >>
> >> 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)

Yes, I understand your concerns. But I think specifying a device name
for virtio disk is not a mandatory requirement. Even if we're using physical
disks on bare metal machine, we can't guarantee slot#1 disk is always 'sda'.
So most modern OS are prefer to use blkid to mount filesystem.

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

Just my understanding, not exactly accurate:
The virtio-blk could not get VDEV information for a bus like Xen-bus. So the 
disk
ID is allocated dynamically in bus probe progress. The first probed disk will 
get
ID 'a'. And then the ID keeps increasing. If we want to specify the disk ID for 
virtio
disk, one possible way to do this is to construct a reasonable position on bus
(fdt node position of virtio mmio device, PCI Function ID of virtio pci block) 
for
virtio disk. But it is not always successful, we can't skip 'vda' to specify a 
virtio
disk as 'vdb'.

Regards,
Wei Chen
> 
> 
> 
> 
> --
> Regards,
> 
> Oleksandr Tyshchenko


 


Rackspace

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