Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DD198C55ABD for ; Fri, 13 Nov 2020 17:39:34 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6B69420791 for ; Fri, 13 Nov 2020 17:39:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Pb1lg8TF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6B69420791 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.26829.55334 (Exim 4.92) (envelope-from ) id 1kdd2W-0004q4-9a; Fri, 13 Nov 2020 17:39:12 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 26829.55334; Fri, 13 Nov 2020 17:39:12 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kdd2W-0004px-6R; Fri, 13 Nov 2020 17:39:12 +0000 Received: by outflank-mailman (input) for mailman id 26829; Fri, 13 Nov 2020 17:39:10 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kdd2U-0004ps-Lk for xen-devel@lists.xenproject.org; Fri, 13 Nov 2020 17:39:10 +0000 Received: from mail-lf1-x135.google.com (unknown [2a00:1450:4864:20::135]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 758d6ebc-941d-4951-a1a9-9c864e7911f4; Fri, 13 Nov 2020 17:39:09 +0000 (UTC) Received: by mail-lf1-x135.google.com with SMTP id f11so15086250lfs.3 for ; Fri, 13 Nov 2020 09:39:09 -0800 (PST) Received: from [192.168.1.7] ([212.22.223.21]) by smtp.gmail.com with ESMTPSA id t6sm1314133lfe.81.2020.11.13.09.39.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 13 Nov 2020 09:39:03 -0800 (PST) Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kdd2U-0004ps-Lk for xen-devel@lists.xenproject.org; Fri, 13 Nov 2020 17:39:10 +0000 X-Inumbo-ID: 758d6ebc-941d-4951-a1a9-9c864e7911f4 Received: from mail-lf1-x135.google.com (unknown [2a00:1450:4864:20::135]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 758d6ebc-941d-4951-a1a9-9c864e7911f4; Fri, 13 Nov 2020 17:39:09 +0000 (UTC) Received: by mail-lf1-x135.google.com with SMTP id f11so15086250lfs.3 for ; Fri, 13 Nov 2020 09:39:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=C9PtRL7msCPm1ZBfIObuxvZHC9YDPfDdR1cQIEJ3ZDs=; b=Pb1lg8TFL/w6UkhSagcgZCoEQ9EtdS1b2AmysfWsSuK5EIylk1JoD4fsLCqTMuUfxc 8LLkIqiZGBbLgxP6e6EFNDJsbIZZ8sinVzKhS1rlNhit85pRTtknKTY97/sMuX4SzvT/ 5ADAGRlIU0uXkfT0ecVoUNjdd9MSvovLaqs7ifjub+DS4KUoNO+bDwOjN1+u4wQsYv6F aA/I9jffrucCLbI/KtMmPVy3e6TJZlyEzhtMXXQtTX6aSoZyDmxzDnRDZpLbi/uprTui U05BEYBBPs+m/1J9KwbAQaB2KNypsIq56t41GPeIeVK87k8HBlrWyJ0tWf8ziTd7U8Vt aI3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=C9PtRL7msCPm1ZBfIObuxvZHC9YDPfDdR1cQIEJ3ZDs=; b=pjptPM9HvqCJ4EjW7VSl9mJPfrV7KatyoV+brBWd4hQEQkUc/EXNKhWhuhM1xBLQge NMM6LLdKYedWuXMDssiEOE01++9k95pMzkqLSHSiQqUuHHB8u586UgRCMSTLWN/fyJH6 77gXjXQIZbopOcQjmMrvBunWpdl6qqQtfwVaNO0GS4CrgyphUPpCSrl8YA4+Dc852zp/ a3O2kG28TTtKaCB0SnTsc1xWrIOmdZggbY0AAuvu10klTWZyCSoOzutWaBXwcybVXjMu y35ZFNT0cQ2p4HFRhP7hbSKfqNBq7DAwX5kNr4/7cT+QDQ/btJI8Dxa8XIcgxIFK5L0o rIzw== X-Gm-Message-State: AOAM5303veqk8f5yaZGZq0otRjhRkCMjlPZevBtItBFYA1ppeDBxKYK/ Vjbh97MRpttWLcCToJ+OQc8= X-Google-Smtp-Source: ABdhPJxqAhKIOTD4SX+UmSwHNM152ljEbWHagMBvrxhG4je+V7+JPIO8Hk0y+N0mXMRI6nYqUYrkrQ== X-Received: by 2002:ac2:44ac:: with SMTP id c12mr1433429lfm.602.1605289143572; Fri, 13 Nov 2020 09:39:03 -0800 (PST) Received: from [192.168.1.7] ([212.22.223.21]) by smtp.gmail.com with ESMTPSA id t6sm1314133lfe.81.2020.11.13.09.39.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 13 Nov 2020 09:39:03 -0800 (PST) Subject: Re: [PATCH V2 23/23] [RFC] libxl: Add support for virtio-disk configuration To: Wei Chen Cc: "xen-devel@lists.xenproject.org" , Oleksandr Tyshchenko , Ian Jackson , Wei Liu , Anthony PERARD , Julien Grall , Stefano Stabellini References: <1602780274-29141-1-git-send-email-olekstysh@gmail.com> <1602780274-29141-24-git-send-email-olekstysh@gmail.com> <99636dd8-4c90-bb84-b96f-6c7a9ad31b63@gmail.com> From: Oleksandr Message-ID: <22ec8e33-6c53-69fa-3cc3-00ca00e1e20e@gmail.com> Date: Fri, 13 Nov 2020 19:38:57 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US On 11.11.20 06:28, Wei Chen wrote: > Hi Oleksandr, Hi Wei >>>> 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'. Thank you for the explanation. I got your point regarding using the same disk parameter and I think it makes sense. Now I am focusing on IOREQ transport to be available on Arm, and after that (I hope) I will be able to return to virtio stuff. -- Regards, Oleksandr Tyshchenko