From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id BB13BC433F5 for ; Mon, 25 Apr 2022 13:13:03 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.312919.530322 (Exim 4.92) (envelope-from ) id 1niyVv-0007Ca-3s; Mon, 25 Apr 2022 13:12:27 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 312919.530322; Mon, 25 Apr 2022 13:12:27 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1niyVv-0007CT-00; Mon, 25 Apr 2022 13:12:27 +0000 Received: by outflank-mailman (input) for mailman id 312919; Mon, 25 Apr 2022 13:12:26 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1niyVu-0007CN-64 for xen-devel@lists.xenproject.org; Mon, 25 Apr 2022 13:12:26 +0000 Received: from esa6.hc3370-68.iphmx.com (esa6.hc3370-68.iphmx.com [216.71.155.175]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 574c65a6-c499-11ec-8fc2-03012f2f19d4; Mon, 25 Apr 2022 15:12:22 +0200 (CEST) Received: from mail-dm6nam11lp2168.outbound.protection.outlook.com (HELO NAM11-DM6-obe.outbound.protection.outlook.com) ([104.47.57.168]) by ob1.hc3370-68.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 25 Apr 2022 09:12:20 -0400 Received: from DS7PR03MB5608.namprd03.prod.outlook.com (2603:10b6:5:2c9::18) by DM5PR03MB2492.namprd03.prod.outlook.com (2603:10b6:3:79::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.15; Mon, 25 Apr 2022 13:12:18 +0000 Received: from DS7PR03MB5608.namprd03.prod.outlook.com ([fe80::5df3:95ce:4dfd:134e]) by DS7PR03MB5608.namprd03.prod.outlook.com ([fe80::5df3:95ce:4dfd:134e%4]) with mapi id 15.20.5186.021; Mon, 25 Apr 2022 13:12:18 +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" X-Inumbo-ID: 574c65a6-c499-11ec-8fc2-03012f2f19d4 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1650892342; h=date:from:to:cc:subject:message-id:references: content-transfer-encoding:in-reply-to:mime-version; bh=hVRPEx0RduZMFDeuGFqZ54FcyypAa690gIEqpLf767E=; b=Yu+kQ5QMIGnlFydJMa+OFxiaSXpWM5e/jBKpmKUinfpnaKpmQKxHRLSL Ed3wIf0qe5ycOkMPUhblu0evDhJvnClSSexCDvw6c+YnYHvtDaWZ/mKkg jRn6su2mRJwqIE4n4jv+I41SvejHnhegEcCH70VLLXeHGhTEySkjGHeh8 c=; X-IronPort-RemoteIP: 104.47.57.168 X-IronPort-MID: 69735420 X-IronPort-Reputation: None X-IronPort-Listener: OutboundMail X-IronPort-SenderGroup: RELAY_O365 X-IronPort-MailFlowPolicy: $RELAYED IronPort-Data: A9a23:potb0aloWj31QiMoFYvHV3bo5gwSJ0RdPkR7XQ2eYbSJt1+Wr1Gzt xJKDTzXOP3ZNGL9Lt9xbNjn8EIGvJbXytVnSQtrpXpkEiMWpZLJC+rCIxarNUt+DCFioGGLT Sk6QoOdRCzhZiaE/n9BCpC48T8kk/vgqoPUUIYoAAgoLeNfYH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NPG0LrgfB49HhYirC2Dlymh5rLWGwWRmk52aUIF/Z4StU z+1yDp7KSqtP+2jjfaym/o9pxT3P/s0MFKCsCggtUcbh/slgGrToJ8XKDqhkF8nMifrHIR1P XcqRYpOMp+r1vXY2GOuBPonzLt1T4/gkWSvWOwsD/Gm4jUVTg6A81OicZyaR3C8Xctu9l6ze Ziw3+Zn4A/N2KOoA3No/zzEz16nEu9pnQv1cQJiWZEbIcYYLhN6aQC4UJuFosaFi6S0vFqLA BXNrCc2B9qSyLbU5iA1VMfg+BEH05DUytue3Jy9PB8iFNt7TJEJ0hx/r1rop5PzuN5d3B+3Z W0Dk1ZrsAxciYoV9MMOA4ge7rBNoWfe2O7DIqtSW6XZ50vCjbql6PdxokTyaWDRKEopaFC6q gpFmko/1IPRw== X-IronPort-AV: E=Sophos;i="5.90,288,1643691600"; d="scan'208";a="69735420" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nQbkHNoYnIf9F9k8IkRTO7HxNT8FuoNqCv19+AzJX8faYis1uEUU/yv8d83kjTUIE8svvEQrsk7HkSTopn5zWL1R9lEZGwbbWkBtgRxwDK8TrnHkNhASfzesbWTh4McQqJUy21fsnHcSm1pR2PltSbdaLiMAxidmUl2VFlNDV+fMiZl7NIHx9X24lFQm5fYJycokwm/D8TSY4bbl3C9/ONXq5qcUC2yAD8/yafYGuPPC+W2QXgASXFH1/8UH3x0fMo3D6XyaOGRukezeR7EP5vJVrNLbn1Yni+UL5McvbRdV2LKYtLX0/z6lywtey7OL7xX0o7Gycf0qjO9bVD1E3g== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ueiUv3ANFHhKZifcnbhcc6x3asJ/gBDKdLEmM6uG4D0=; b=SR9mRJbeLu26wFKYPxzB9kAWWLzYjiijYHw6/RceZuItd0eKIZI1TOeNdzKE+A6jGx03bfdUat7/iIc2MC6RLA2z7ElCtLJfr7WA1kvwmUCraMNiWrv4O0Xo27GshXJGCBDgIaN8GFU7WW5/gsf7XNU5dR3bQ+EWWxBOE37vmQZzeyzoWhqywTIn1BzYH1J+ceIfr3Luad7h9q86kBZ5Vim0DYass7kjYwDf078G65zLT6Qtd/Rk3UtpyoEtRA5L+pXbBroOcrHC1KneNdbS4R6PY5Gslvr9cPF6S6RHS57rubrW6uRHkz5ic6Vs6T5O+tACY1lG1STyapp2B7hUuQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.onmicrosoft.com; s=selector2-citrix-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ueiUv3ANFHhKZifcnbhcc6x3asJ/gBDKdLEmM6uG4D0=; b=vw+ITYkVDIe14Mjufr3i5BRCTxIdC5deHL56+oLjaFGP0881fBXs3KmTh+M58nXhtxeLcWIuzAdCx3VGtE9+T/3g0/EuJ5P+hd6zd6x7uH9ZKB+QSqF6YFNfY5j33TFsJV4h+zNFNA2UAs4udalfUyRUiVtTLBsy8pgBlsNpTjA= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com; Date: Mon, 25 Apr 2022 15:12:13 +0200 From: Roger Pau =?utf-8?B?TW9ubsOp?= To: Oleksandr Cc: xen-devel@lists.xenproject.org, Oleksandr Tyshchenko , Wei Liu , Anthony PERARD , George Dunlap , Nick Rosbrook , Juergen Gross , Stefano Stabellini , Julien Grall , Volodymyr Babchuk , Bertrand Marquis Subject: Re: [PATCH V7 1/2] libxl: Add support for Virtio disk configuration Message-ID: References: <1649442065-8332-1-git-send-email-olekstysh@gmail.com> <1649442065-8332-2-git-send-email-olekstysh@gmail.com> <24112cfc-0446-d81e-85f1-ebf9da0afe14@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <24112cfc-0446-d81e-85f1-ebf9da0afe14@gmail.com> X-ClientProxiedBy: LO2P265CA0107.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:c::23) To DS7PR03MB5608.namprd03.prod.outlook.com (2603:10b6:5:2c9::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2fef7663-b10f-46b9-1778-08da26bd395e X-MS-TrafficTypeDiagnostic: DM5PR03MB2492:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: j82/i0KHHJrk21CX/1hn8yLlq5qpYCYIUmxT5r0k4h5pmFuv0OHFLYKagxmQdnumFEyPQ44d7kgOziUcC7UXW9eFvpmCv4C5qcYSsHPh2jVzLfofotwXl4zmE0XqPDLivly164B/ZKWpRXoEa/3rFbWjQh6/gBJalQF8LqtDstJFsLi7i+ut8YHT+2RrQtwS2GoRqwq8pV1ADLB55zf+dBKVv8LBBbR3/Ycy6XsRo5TnTNdW6LEHTIB/Jf5CotXBggx2wW5MSN9tBdM9b6CbdYVGwQkYXb0uPakbcHkJa5KWsXi5zALTez6+ZhgZlLr03Qyfa53j2/7TTkysNSu6yrYGac1Kvp+Ur7cvspjvdEIV+8rg9gIBwKCYFE/OygIcwnnEdoFfhmSKKHi6dnzIlVqU0eJ9vpQWah2Ojp3b4stOXYCQoOgTssaOtUsE39ysNHOjmXzjkWzDRNarpmAJ1vpa8P39C9ZspGQKbzQbpsLwxBTnMpHi/BYTXTOcKeQRO+Xys4cwmtJko4XPsSJuHGFkoEl8osGcuj+JPLQb3nyfox1CbcTejqP+Tyk6QA9ikgbpqPAFeyeE0ks4pTZ2G3hBAGsjeopbXbp0e98DbVHj16hTpPsuWINcI9ZXukdbRmjnE+DNT7ZhKEMnB08H6Q== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS7PR03MB5608.namprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(7916004)(4636009)(366004)(53546011)(186003)(83380400001)(2906002)(9686003)(6512007)(6666004)(6506007)(6916009)(316002)(54906003)(85182001)(86362001)(6486002)(508600001)(5660300002)(26005)(4326008)(66556008)(8676002)(8936002)(38100700002)(66946007)(66476007)(7416002)(82960400001)(33716001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?emdCU3JCM2MzcUJoVGIvMG00VTZhYk9NRHdhbXQxRVZaR0ZBVFV1Vkd4ZE8r?= =?utf-8?B?Qnd0LzBGY2l0aVZXVkJyREZzNlEvejF3RE9lNll4WmJGMlZkMk03QmxJU0Jx?= =?utf-8?B?Um9hODVSaXA1MlFtdUxUTzRNc3JqTVFQcjVtSlBLdDJvQThrWGcwSzBLRXJy?= =?utf-8?B?Z1Z6MzVIa0k2cmRIQ3paZ080V251QkJNYVcwaHdtN0JWSFZ1Sk1zeVZsNVZG?= =?utf-8?B?ajBkV1RRZGQxR2g5VVZ4OEhCZTQybkkxdmdMNkZSOUFOTys0UEJOSlhBRkRC?= =?utf-8?B?OTJFREpaOGk2MUtjb3IrU0VuZU9JRC96bkpIY0ZxRmxsNVlHbHdPRFRLdHh4?= =?utf-8?B?ZnA5YjBNNVUrYWJLTCtHNC9odEJyV2dCVkFmQXJDZEdpM3A0Z3k5cXVXSjcy?= =?utf-8?B?cHZ1bWgwblBiaWErNWFQbWpxbWtTL25zcXpNRVI4enNIVGJZTU1rMW9ma1Av?= =?utf-8?B?aVBGMGx5MTQzblI5VVcwTVp3VmpM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0hiZXBx?= =?utf-8?B?K1NNVHdGaDFwbHphaHRsc0JvWEZxQ284SlphWkF4UmtEL1ZaNEVpZTdtNTJX?= =?utf-8?Q?Rwy4dFY1I7wAnamI=3D?= X-OriginatorOrg: citrix.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2fef7663-b10f-46b9-1778-08da26bd395e X-MS-Exchange-CrossTenant-AuthSource: DS7PR03MB5608.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Apr 2022 13:12:18.3094 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335836de-42ef-43a2-b145-348c2ee9ca5b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: oQsvnLpUg9AM0ljlCmgJyKBiaxZzmLzPnRrPPOzr8OsvinCai/Z2aQtTN8wo7JiRHUaRSUI6MhJbWtRSksxb5w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR03MB2492 On Sat, Apr 23, 2022 at 10:39:14AM +0300, Oleksandr wrote: > > On 22.04.22 12:41, Roger Pau Monné wrote: > > > Hello Roger > > > On Fri, Apr 08, 2022 at 09:21:04PM +0300, Oleksandr Tyshchenko wrote: > > > From: Oleksandr Tyshchenko > > > > > > This patch adds basic support for configuring and assisting virtio-mmio > > > based virtio-disk backend (emualator) 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 (the vdev is not > > > passed to the frontend) > > > - 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 protocol field to libxl_device_disk struct > > > (with LIBXL_DISK_PROTOCOL_XEN and LIBXL_DISK_PROTOCOL_VIRTIO_MMIO > > > types) and reflect that in the configuration (new "protocol" option > > > with "xen" 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, protocol=virtio-mmio'] > > > > > > 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 > > > --- > > > Changes RFC -> V1: > > > - no changes > > > > > > Changes V1 -> V2: > > > - rebase according to the new location of libxl_virtio_disk.c > > > > > > Changes V2 -> V3: > > > - no changes > > > > > > Changes V3 -> V4: > > > - rebase according to the new argument for DEFINE_DEVICE_TYPE_STRUCT > > > > > > Changes V4 -> V5: > > > - split the changes, change the order of the patches > > > - update patch description > > > - don't introduce new "vdisk" configuration option with own parsing logic, > > > re-use Xen PV block "disk" parsing/configuration logic for the virtio-disk > > > - introduce "virtio" flag and document it's usage > > > - add LIBXL_HAVE_DEVICE_DISK_VIRTIO > > > - update libxlu_disk_l.[ch] > > > - drop num_disks variable/MAX_VIRTIO_DISKS > > > - drop Wei's T-b > > > > > > Changes V5 -> V6: > > > - rebase on current staging > > > - use "%"PRIu64 instead of %lu for disk->base in device_disk_add() > > > - update *.gen.go files > > > > > > Changes V6 -> V7: > > > - rebase on current staging > > > - update *.gen.go files and libxlu_disk_l.[ch] files > > > - update patch description > > > - rework significantly to support more flexible configuration > > > and have more generic basic implementation for being able to extend > > > that for other use-cases (virtio-pci, qemu, etc). > > > --- > > > docs/man/xl-disk-configuration.5.pod.in | 37 +- > > > tools/golang/xenlight/helpers.gen.go | 6 + > > > tools/golang/xenlight/types.gen.go | 11 + > > > tools/include/libxl.h | 6 + > > > tools/libs/light/libxl_device.c | 57 +- > > > tools/libs/light/libxl_disk.c | 111 +++- > > > tools/libs/light/libxl_internal.h | 1 + > > > tools/libs/light/libxl_types.idl | 10 + > > > tools/libs/light/libxl_types_internal.idl | 1 + > > > tools/libs/light/libxl_utils.c | 2 + > > > tools/libs/util/libxlu_disk_l.c | 952 +++++++++++++++--------------- > > > tools/libs/util/libxlu_disk_l.h | 2 +- > > > tools/libs/util/libxlu_disk_l.l | 9 + > > > tools/xl/xl_block.c | 11 + > > > 14 files changed, 736 insertions(+), 480 deletions(-) > > > > > > diff --git a/docs/man/xl-disk-configuration.5.pod.in b/docs/man/xl-disk-configuration.5.pod.in > > > index 71d0e86..36c851f 100644 > > > --- a/docs/man/xl-disk-configuration.5.pod.in > > > +++ b/docs/man/xl-disk-configuration.5.pod.in > > > @@ -232,7 +232,7 @@ Specifies the backend implementation to use > > > =item Supported values > > > -phy, qdisk > > > +phy, qdisk, other > > > =item Mandatory > > > @@ -244,11 +244,13 @@ Automatically determine which backend to use. > > > =back > > > -This does not affect the guest's view of the device. It controls > > > -which software implementation of the Xen backend driver is used. > > > +It controls which software implementation of the backend driver is used. > > > +Depending on the "protocol" option this may affect the guest's view > > > +of the device. > > > Not all backend drivers support all combinations of other options. > > > -For example, "phy" does not support formats other than "raw". > > > +For example, "phy" and "other" do not support formats other than "raw" and > > > +"other" does not support protocols other than "virtio-mmio". > > > Normally this option should not be specified, in which case libxl will > > > automatically determine the most suitable backend. > > > @@ -344,8 +346,35 @@ can be used to disable "hole punching" for file based backends which > > > were intentionally created non-sparse to avoid fragmentation of the > > > file. > > > +=item B=I > > > + > > > +=over 4 > > > + > > > +=item Description > > > + > > > +Specifies the communication protocol to use for the chosen "backendtype" option > > > + > > > +=item Supported values > > > + > > > +xen, virtio-mmio > > From a user PoV, I think it would be better to just select xen or > > virtio here, but not the underlying configuration mechanism used to > > expose the devices to the guest. > > I got your point. > > > > > > > We would likely need to add a different option to select mmio or pci > > then, but that should be set by default based on architecture/guest > > type. For example on x86 it should default to pci, while on Arm I > > guess it will depend on whether the guest has PCI or not? > > > > In any case, I think we should offer an option that's selecting > > between xen or virtio protocol, and the way to expose the > > configuration of the device shouldn't need to be explicitly selected > > by the user. > > > ok, for now I will use "xen and virtio" values for the "protocol" option, > then internally toolstack will assume that "virtio" really means > "virtio-mmio". > > When there is a need to expand that support to "virtio-pci", we will see how > to deal with it from the configuration PoV, probably like you suggested > above by adding another option (e.g. "transport") with default values based > on the architecture/guest type. I think this likely also wants to be a separate field in libxl_device_disk, which could be left empty and libxl will attempt to set a default. For example have the following in libxl_types.idl: libxl_device_protocol = Enumeration("device_protocol", [ (0, "UNKNOWN"), (1, "XEN"), (2, "VIRTIO"), ]) libxl_device_configuration = Enumeration("device_configuration", [ (0, "UNKNOWN"), (1, "XENBUS"), (2, "MMIO"), ]) libxl_device_disk = Struct("device_disk", [ ("protocol", libxl_device_protocol), ("configuration", libxl_device_configuration), ]) I don't like libxl_device_configuration much, I think is too generic, but I can't think of anything better. Maybe others can provide better names. Thanks, Roger.