From nobody Wed Apr 24 08:28:58 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1596211889; cv=none; d=zohomail.com; s=zohoarc; b=XsHDNMmXzl9zQRSUaD06dSn1t11y3rOSMSVUpE+hrP8l0TDk+W9c5CHV04C74Yct0MTMKSbhaHXMktSFI0QK64Kdvu/kua9M1zg5YQkyyRX6HNGFimzf4Iv5Z9Ul62RfdVgu+B2BfLAwj4BvwUVHNXr6RZRlVX4svWyQPDQHiVk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1596211889; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=KfwLjoCo8yz0+NAQodH6Oy/6TFULDUoECUsIyCr+WgQ=; b=XrmMIMXGympRBs1BAOHmlcqzjiOr+SOFNggtNiEgSPfWdS/xB3yaxA4/lXx+HHguzWPFseOYIDvK13M+M/WoBUrZOn7Ry/NyIEK+K2yGOJAMx6Zt/MeDwOq+eD7dqsSY+8oXSC88l4gVaLPL6T0cWfv0Zv6NKz8u08WM8lpqglU= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 159621188909595.55354408425274; Fri, 31 Jul 2020 09:11:29 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-352-IlKkyTnCMr-4Xblqm1IrHA-1; Fri, 31 Jul 2020 12:11:25 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 54F4479EC0; Fri, 31 Jul 2020 16:11:19 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A4FAB7C0EB; Fri, 31 Jul 2020 16:11:18 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id C6D9295A75; Fri, 31 Jul 2020 16:11:16 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 06VGBEMn002563 for ; Fri, 31 Jul 2020 12:11:15 -0400 Received: by smtp.corp.redhat.com (Postfix) id 780BC217B439; Fri, 31 Jul 2020 16:11:14 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 29494217B436 for ; Fri, 31 Jul 2020 16:11:13 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7219E8007CA for ; Fri, 31 Jul 2020 16:11:13 +0000 (UTC) Received: from de-smtp-delivery-102.mimecast.com (de-smtp-delivery-102.mimecast.com [62.140.7.102]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-405-JS6wXfHBP7W8L912Uf41Lw-1; Fri, 31 Jul 2020 12:11:11 -0400 Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01lp2055.outbound.protection.outlook.com [104.47.2.55]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-16-XCzplCJcOOqXFANbyRhoHQ-2; Fri, 31 Jul 2020 18:11:08 +0200 Received: from VI1PR0401MB2429.eurprd04.prod.outlook.com (2603:10a6:800:2c::13) by VI1PR04MB6830.eurprd04.prod.outlook.com (2603:10a6:803:132::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.17; Fri, 31 Jul 2020 16:11:06 +0000 Received: from VI1PR0401MB2429.eurprd04.prod.outlook.com ([fe80::7cc0:b0a4:b951:90e2]) by VI1PR0401MB2429.eurprd04.prod.outlook.com ([fe80::7cc0:b0a4:b951:90e2%11]) with mapi id 15.20.3216.034; Fri, 31 Jul 2020 16:11:06 +0000 Received: from linux-tbji.devlab.prv.suse.com (192.150.153.236) by FR2P281CA0019.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:14::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.9 via Frontend Transport; Fri, 31 Jul 2020 16:11:05 +0000 X-MC-Unique: IlKkyTnCMr-4Xblqm1IrHA-1 X-MC-Unique: JS6wXfHBP7W8L912Uf41Lw-1 X-MC-Unique: XCzplCJcOOqXFANbyRhoHQ-2 From: Jim Fehlig To: libvir-list@redhat.com Subject: [PATCH 1/4] Expose virStringListCopy in libvirt_private.syms Date: Fri, 31 Jul 2020 10:10:40 -0600 Message-ID: <20200731161043.8858-2-jfehlig@suse.com> In-Reply-To: <20200731161043.8858-1-jfehlig@suse.com> References: <20200731161043.8858-1-jfehlig@suse.com> X-ClientProxiedBy: FR2P281CA0019.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:14::6) To VI1PR0401MB2429.eurprd04.prod.outlook.com (2603:10a6:800:2c::13) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-Originating-IP: [192.150.153.236] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 27127251-4dad-4fe7-acef-08d8356c544f X-MS-TrafficTypeDiagnostic: VI1PR04MB6830: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:296; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dgnzYSyiPEeX0KQnEi0//1XCG/7a/kmZpZwM2ZN+bH+lpr9CiN5w1kw5TMew1RIRcYM1LKsQ4twv6arFNkARBFvmLnE+ML0PUvttsO4joX0dA+GaSWRAYdhQHdTiSBS5kTgHOKmIjixaGs64OYFmjDiHKakqjrZcyjKOY0rnPDoI9rcgMXPo8LP1L/EgsfyEiPjYUVTM17W8qEqJZNSJ3toYmxZqcIi8r04OolLnEHtq8lbQdxlT1Nj+cDKz0W2mqP6MD0/fchsRRkHuZrBGn4Ug6Ntorq1UVbKxWZb27op3aGcLJi3ld+klH2YMGN8rdVGOeaMs6gVnofZRuoIxIkxCykgl6elEmBRYBkjsq5bHgAwZOlmL/iGBjLxQaC8C X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR0401MB2429.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(136003)(376002)(39860400002)(346002)(396003)(366004)(4326008)(6666004)(16526019)(186003)(26005)(4744005)(1076003)(5660300002)(86362001)(316002)(8676002)(66556008)(2906002)(478600001)(956004)(7696005)(6916009)(52116002)(66476007)(107886003)(6486002)(8936002)(36756003)(2616005)(66946007)(145543001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: qT8B4pbSgqvxAwBvxTAQ/4btNRUEEaGm7whbIvpGt4xc5i6pbCuuTIks3wHKMoywZ1dFFd/1OwHjqa4+NZSoBa2hhHh9kBvNQmreP82xC6K4H5SwIh81IAyfeSL1vmt5YiHApyRf/AYUDfNTx0b9qC6vVqg843XT6VfMC1LKlMqSp81QxW5+ONeoxjq4LwVk2Z5zETUrVqwC8R/l6wTaBy47DgHKMcN/dFIbm55+M8ANF3P1b0u9FaD7GkSD5EzrkGo+eEdbVHL7Tk/KQnWgB7BfIq8+5+tOzEFcRaq1qSKP9hdB2mR/LlmgZAwbxV7i2YKpuJiv1ct2zCqYJI5jb6vzPqrTk+qacVpaYb/RQFcWA3aTsS+b00A4UTu9tesqr7IMZHLCbCfu5PtG3agQK6cQ71ZPUYRupUuFcHYyuObu1RR4m7f+WMzYAHfdTP7xg4kfJvMhnUp4d7g/sNG2NaAJbOJxwLwLM/cHEZsxc/fb92786TQ1NYsa5v6vZUG+uw8A+SWn8c8UGCy7aXX1d1/MgPHGTVSBh3jcyX9G0n+5CUSmWBsy2OR+hN9hbdU8zD59hvuCg8Q8yYHQW8aOzy2wCQOYLp09/khDmW+2u0iXdgn5ysB5g4MLbEc9P5DhHgsOrVPV7EqZk1YYSMNjpw== X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 27127251-4dad-4fe7-acef-08d8356c544f X-MS-Exchange-CrossTenant-AuthSource: VI1PR0401MB2429.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jul 2020 16:11:06.4351 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: sVcip/mcn/zzGt4Of4treIgd0p83GtSB+ypQYronA7Uwlety+vIopkN5PTVcoK8pKjJ9CN70xJP/UcBLtAnmiA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB6830 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false; X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 06VGBEMn002563 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" virStringListCopy is used by a subsequent patch. Signed-off-by: Jim Fehlig --- src/libvirt_private.syms | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index eea31a736d..e1ddc9fc5b 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -3216,6 +3216,7 @@ virStringIsEmpty; virStringIsPrintable; virStringListAdd; virStringListAutoFree; +virStringListCopy; virStringListFree; virStringListFreeCount; virStringListGetFirstWithPrefix; --=20 2.26.2 From nobody Wed Apr 24 08:28:58 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1596211891; cv=none; d=zohomail.com; s=zohoarc; b=EXXqdxiWepnlQA0i6fvRiA9h/HQAwlOWnxWpmU6811QEZuYMMVyMe/+m/9vSw3XfastCI0ArbwDx97cgz0LwB/t6Z5ZfcTEYJVU8O8LyLf7lBL10tBJDMUKcW4/99fIekQnRsklLbcECs0vTufHJPHkgpaJnrB7LdT2alurHnZU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1596211891; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=e7/XeZD2MktSMgzw5dwZD+qBusZR6bKOYJQRuaapO9c=; b=JE9fF85wBmCruILQpBd2m7tx4CLmb9WaCuS6bIDU7gKGThuLrc6SVZ03nRa9msrM56tV7ePkxco2NI26+OkXOiwsZ2W2KVMP7VCwV1FE/YwaONh7DLXmGlhMrl+nuZH39mp9/zdXKveY4zzsy44ngSTVTiQRmkLIrFtiU0xLorY= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1596211891672814.8107119418613; Fri, 31 Jul 2020 09:11:31 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-249-po9IBXGEMZmFFXmDNSm-rQ-1; Fri, 31 Jul 2020 12:11:27 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 34BDE59; Fri, 31 Jul 2020 16:11:22 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 137E45F7D8; Fri, 31 Jul 2020 16:11:22 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id D46E095A7B; Fri, 31 Jul 2020 16:11:21 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 06VGBI9X002580 for ; Fri, 31 Jul 2020 12:11:19 -0400 Received: by smtp.corp.redhat.com (Postfix) id A4C8AFA73E; Fri, 31 Jul 2020 16:11:18 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5B6A6F7FCA for ; Fri, 31 Jul 2020 16:11:15 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id F015C805C21 for ; Fri, 31 Jul 2020 16:11:14 +0000 (UTC) Received: from de-smtp-delivery-102.mimecast.com (de-smtp-delivery-102.mimecast.com [62.140.7.102]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-164-tmu4OCJFMWCdTmfGQSEkJg-1; Fri, 31 Jul 2020 12:11:12 -0400 Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01lp2055.outbound.protection.outlook.com [104.47.2.55]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-16-KihaxIMzOq2c1RaQJ5ooxA-3; Fri, 31 Jul 2020 18:11:09 +0200 Received: from VI1PR0401MB2429.eurprd04.prod.outlook.com (2603:10a6:800:2c::13) by VI1PR04MB6830.eurprd04.prod.outlook.com (2603:10a6:803:132::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.17; Fri, 31 Jul 2020 16:11:08 +0000 Received: from VI1PR0401MB2429.eurprd04.prod.outlook.com ([fe80::7cc0:b0a4:b951:90e2]) by VI1PR0401MB2429.eurprd04.prod.outlook.com ([fe80::7cc0:b0a4:b951:90e2%11]) with mapi id 15.20.3216.034; Fri, 31 Jul 2020 16:11:08 +0000 Received: from linux-tbji.devlab.prv.suse.com (192.150.153.236) by FR2P281CA0019.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:14::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.9 via Frontend Transport; Fri, 31 Jul 2020 16:11:06 +0000 X-MC-Unique: po9IBXGEMZmFFXmDNSm-rQ-1 X-MC-Unique: tmu4OCJFMWCdTmfGQSEkJg-1 X-MC-Unique: KihaxIMzOq2c1RaQJ5ooxA-3 From: Jim Fehlig To: libvir-list@redhat.com Subject: [PATCH 2/4] Xen: Add support for qemu command-line passthrough Date: Fri, 31 Jul 2020 10:10:41 -0600 Message-ID: <20200731161043.8858-3-jfehlig@suse.com> In-Reply-To: <20200731161043.8858-1-jfehlig@suse.com> References: <20200731161043.8858-1-jfehlig@suse.com> X-ClientProxiedBy: FR2P281CA0019.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:14::6) To VI1PR0401MB2429.eurprd04.prod.outlook.com (2603:10a6:800:2c::13) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-Originating-IP: [192.150.153.236] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 85bb3c14-fd20-4677-7504-08d8356c5546 X-MS-TrafficTypeDiagnostic: VI1PR04MB6830: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:765; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pW90ooLcteh/IkAvQc+hR3kW1SB9CfbdtUx19gVHVPfja4WkreYK82uKbE5VWRUVhwfYtTs6hUtMxcp2yCBZcq9LeEhv0ZdYOp+ooWr27DdlXuvAZRFT6+12pi8BAgJB5U0wEg+stH46ETOWsCKr32Dn78+huuSRujkz2IV/9+DDaOwPHsPYt92BXK9Gds2mLzVJCnwD2PSawSitdrKoWT1tZO+p9/Vo1PpAdisV/41dPve9lWoqlCK2QylHlaVC8QVYoGPfl8A1zqa9wlvxC4TmjVNQ0VizDK8S95WebPAqtfeZRaEvMoYFEOZLiK5dFTsl2fHCZKND4VjFwWoVzoJtThgJX7+8BOAQZxQess5K0qWNGlbdT55Nwcd8MP3cQ3LerUtsgz0Q0VcpoS/GqA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR0401MB2429.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(136003)(376002)(39860400002)(346002)(396003)(366004)(4326008)(6666004)(16526019)(186003)(26005)(1076003)(5660300002)(86362001)(316002)(8676002)(66556008)(2906002)(478600001)(956004)(7696005)(83380400001)(6916009)(52116002)(66476007)(107886003)(6486002)(8936002)(36756003)(2616005)(66946007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 7zCj/NgKHUquLbbVUZK9oiPrwoV2TKOTgHRYt7Y+HNs0ClSt+F0nVVBNvyrqvWW93jz90TIO9wNwXGcZ4uzOwK2hFtTZixDiEwPyHwH81c5VieYuRRv9lAl+LCYXFI1FJYx/LSicrJoOuRdgrS9PJHirpvhLNbBTk82w5PxW+ZrllfxSwzfA4vRVLYlRhig6I38cmt+r1up4I6Or2mm0JMnLUR0IqJ6cSi3KtmJ3sLqckjZRBIjAP+Gu4ZL1D2UFC3azdvikYd3tabq1LLWDD2oLbYd9z5jqBXJOwy+65NmHuDIohUHrGIymxXuNnPpBnl19CbVG2joL/ff7pxTxkPUbjgz1Xjo7H4IVHW/aQWj9gkeEttwhd2rLq/sGZchcvLD5aQ/EZONl2I6JYgorwRTrM5DNVAOUVaVxnDLQIPJ/MPPqNuQifHNlQxhLCHmMUyjFT00TqaC+YldIiMD2KNuiFGbC/AvPgSRgyMYOtfIO9eMDC0Aqw+sOSgS7t/ZzZu6M83BaX1qxFBYWU+XuKBv5YQm/1Iu5EiRQBbAAAu2yh/zDRHnwgP/yhtymZblUREpCKqyv584iNxz8UkUMPMJVBt0nfYJe43PUtmf6Y0Zj0sXxqtZAmjb9pxywutWtQa5/Z0ro302NJsVczVV30g== X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 85bb3c14-fd20-4677-7504-08d8356c5546 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0401MB2429.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jul 2020 16:11:08.2063 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: hBbkOppT6n0dfCXiHu/20DnodDYf78VZMCM/T8UBfobz0wPvaqhMRbak30/uGUOUd+PuMXjFp4VmrJFEgAy6Tg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB6830 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false; X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 06VGBI9X002580 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Xen supports passing arbitrary arguments to the QEMU device model via the 'extra' member of the public libxl_domain_build_info structure. This patch uses QEMU namespace extensions already in place for the QEMU driver to map arbitrary arguments to the 'extra' member. Only passthrough of arguments is supported. Trying to pass environment variables or capabilities adjustments is not supported and will result in an error. Signed-off-by: Jim Fehlig --- docs/drvxen.html.in | 35 ++++++++++++++ src/libxl/libxl_conf.c | 11 ++++- src/libxl/libxl_conf.h | 8 ++++ src/libxl/libxl_domain.c | 99 ++++++++++++++++++++++++++++++++++++++++ src/libxl/libxl_domain.h | 1 + 5 files changed, 153 insertions(+), 1 deletion(-) diff --git a/docs/drvxen.html.in b/docs/drvxen.html.in index b2f41c1763..ffaf01fedb 100644 --- a/docs/drvxen.html.in +++ b/docs/drvxen.html.in @@ -141,6 +141,41 @@ vnclisten =3D "0.0.0.0" disk =3D [ "tap:aio:/var/lib/xen/images/rhel5pv.img,xvda,w", "tap:qcow:/ro= ot/qcow1-xen.img,xvdd,w" ] vif =3D [ "mac=3D00:16:3e:60:36:ba,bridge=3Dvirbr0,script=3Dvif-bridge,vif= name=3Dvif5.0" ] =20 +

Pass-through of arbitrary command-line argume= nts + to the qemu device model

+ +

Since 6.7.0, the Xen driver supports p= assing + arbitrary command-line arguments to the qemu device model used by Xe= n with + the <qemu:commandline> element under domain= . + In order to use command-line pass-through, an XML namespace request = must be + issued that pulls in http://libvirt.org/schemas/domain/qemu/1.= 0. + With the namespace in place, it is then possible to add + <qemu:arg>sub-elements to + <qemu:commandline> describing each argument passe= d to + the device model when starting the domain. +

+

+ Note that although the schema is shared with the QEMU driver, only + command-line arguments are supported. Passing environment variables = or + capabilities adjustments are not supported and will result in an err= or when + defining or creating the domain. +

+

The following example illustrates passing agruments to the QEMU dev= ice + model that define a floppy drive, which Xen does not support through= its + public APIs: +

+
+<domain type=3D"xen" xmlns:qemu=3D"http://libvirt.org/schemas/domain/qe=
mu/1.0">
+  ...
+  <qemu:commandline>
+    <qemu:arg value=3D'-drive'/>
+    <qemu:arg value=3D'file=3D/path/to/image,format=3Draw,if=3Dnone,id=
=3Ddrive-fdc0-0-0'/>
+    <qemu:arg value=3D'-global'/>
+    <qemu:arg value=3D'isa-fdc.driveA=3Ddrive-fdc0-0-0'/>
+  </qemu:commandline>
+</domain>
+    
+

Example domain XML config

=20

diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index 8e63d40376..b163e39712 100644 --- a/src/libxl/libxl_conf.c +++ b/src/libxl/libxl_conf.c @@ -760,6 +760,14 @@ libxlMakeDomBuildInfo(virDomainDefPtr def, libxl_get_required_shadow_memory(b_info->max_memkb, b_info->max_vcpus); =20 + if (def->namespaceData) { + libxlDomainXmlNsDefPtr nsdata =3D def->namespaceData; + + if (nsdata->num_args > 0) + if (virStringListCopy(&b_info->extra, (const char **)nsdata->a= rgs) < 0) + return -1; + } + return 0; } =20 @@ -2513,5 +2521,6 @@ libxlCreateXMLConf(libxlDriverPrivatePtr driver) libxlDomainDefParserConfig.priv =3D driver; return virDomainXMLOptionNew(&libxlDomainDefParserConfig, &libxlDomainXMLPrivateDataCallbacks, - NULL, NULL, NULL); + &libxlDriverDomainXMLNamespace, + NULL, NULL); } diff --git a/src/libxl/libxl_conf.h b/src/libxl/libxl_conf.h index b057a9e4ba..fc652df61e 100644 --- a/src/libxl/libxl_conf.h +++ b/src/libxl/libxl_conf.h @@ -168,6 +168,14 @@ struct _libxlSavefileHeader { uint32_t unused[10]; }; =20 + +typedef struct _libxlDomainXmlNsDef libxlDomainXmlNsDef; +typedef libxlDomainXmlNsDef *libxlDomainXmlNsDefPtr; +struct _libxlDomainXmlNsDef { + size_t num_args; + char **args; +}; + libxlDriverConfigPtr libxlDriverConfigNew(void); int diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c index d9fcde4364..b67738061f 100644 --- a/src/libxl/libxl_domain.c +++ b/src/libxl/libxl_domain.c @@ -1573,3 +1573,102 @@ libxlDomainDefCheckABIStability(libxlDriverPrivateP= tr driver, virDomainDefFree(migratableDefDst); return ret; } + + +static void +libxlDomainDefNamespaceFree(void *nsdata) +{ + libxlDomainXmlNsDefPtr def =3D nsdata; + + if (!def) + return; + + virStringListFreeCount(def->args, def->num_args); + VIR_FREE(def); +} + + +static int +libxlDomainDefNamespaceParse(xmlXPathContextPtr ctxt, + void **data) +{ + libxlDomainXmlNsDefPtr nsdata =3D NULL; + g_autofree xmlNodePtr *nodes =3D NULL; + ssize_t nnodes; + size_t i; + int ret =3D -1; + + /* Only qemu args are supported in the libxl driver */ + if ((nnodes =3D virXPathNodeSet("./qemu:commandline/qemu:env", ctxt, &= nodes)) > 0) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("libxl does not support setting qemu environment = variables")); + return -1; + } + if ((nnodes =3D virXPathNodeSet("./qemu:capabilities", ctxt, &nodes)) = > 0) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("libxl does not support setting qemu capabilities= ")); + return -1; + } + + if ((nnodes =3D virXPathNodeSet("./qemu:commandline/qemu:arg", ctxt, &= nodes)) < 0) + return -1; + + if (nnodes =3D=3D 0) + return 0; + + if (VIR_ALLOC(nsdata) < 0) + return -1; + + if (VIR_ALLOC_N(nsdata->args, nnodes) < 0) + goto cleanup; + + for (i =3D 0; i < nnodes; i++) { + if (!(nsdata->args[nsdata->num_args++] =3D virXMLPropString(nodes[= i], "value"))) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("No qemu command-line argument specified")); + goto cleanup; + } + } + + if (nsdata->num_args > 0) + *data =3D g_steal_pointer(&nsdata); + + ret =3D 0; + + cleanup: + libxlDomainDefNamespaceFree(nsdata); + return ret; +} + + +static int +libxlDomainDefNamespaceFormatXML(virBufferPtr buf, + void *nsdata) +{ + libxlDomainXmlNsDefPtr cmd =3D nsdata; + size_t i; + + if (!cmd->num_args) + return 0; + + virBufferAddLit(buf, "\n"); + virBufferAdjustIndent(buf, 2); + + for (i =3D 0; i < cmd->num_args; i++) + virBufferEscapeString(buf, "\n", + cmd->args[i]); + + virBufferAdjustIndent(buf, -2); + virBufferAddLit(buf, "\n"); + + return 0; +} + + +virXMLNamespace libxlDriverDomainXMLNamespace =3D { + .parse =3D libxlDomainDefNamespaceParse, + .free =3D libxlDomainDefNamespaceFree, + .format =3D libxlDomainDefNamespaceFormatXML, + .prefix =3D "qemu", + .uri =3D "http://libvirt.org/schemas/domain/qemu/1.0", +}; diff --git a/src/libxl/libxl_domain.h b/src/libxl/libxl_domain.h index 7e28093722..00682546e0 100644 --- a/src/libxl/libxl_domain.h +++ b/src/libxl/libxl_domain.h @@ -77,6 +77,7 @@ struct _libxlDomainObjPrivate { =20 extern virDomainXMLPrivateDataCallbacks libxlDomainXMLPrivateDataCallbacks; extern virDomainDefParserConfig libxlDomainDefParserConfig; +extern virXMLNamespace libxlDriverDomainXMLNamespace; extern const struct libxl_event_hooks ev_hooks; =20 int --=20 2.26.2 From nobody Wed Apr 24 08:28:58 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1596211897; cv=none; d=zohomail.com; s=zohoarc; b=EyRu/NZ/8BSKr49k8IfBN6uM1R3GaH+mrDkIqhL9DWrh1zxn25AFxNuuFZO4SI6NyJrsyag9XU4pNb5VmuSTUUbTAPOFF7X+m1Y6MRGo4ZKVcdIyNJKHfxe0zbI/Ga9fYJ/I/GFyv+ECvvlIV4MWxUhvki3KXQ821pHqHXrNWHk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1596211897; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=kL6xHIUR/oZRQU8fH3V1gxFWmcMJGYngv9AtStW+Q0E=; b=ez2ESXuPxW1SQB3wxAw+CRcbDlzeP6mIqa0QrfFz4fN1xdRt4XWqfkdVAEGa+XEkBHy0ia0OoBrym1ctV6AjUK2hMA3nfFLD4sWw+fycup1/QD+EB/yK1FpzhzUtiPFq+mPEsl28STyiydRfwoKkCyAZhw0DIyEYlZFJc1RcUu0= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1596211897186197.18166290226668; Fri, 31 Jul 2020 09:11:37 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-404-rmh7tLu0MVWV4cYh3HwcRg-1; Fri, 31 Jul 2020 12:11:33 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B397C79EC0; Fri, 31 Jul 2020 16:11:27 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 931CF7303C; Fri, 31 Jul 2020 16:11:27 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 6450695A81; Fri, 31 Jul 2020 16:11:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 06VGBJ1Y002585 for ; Fri, 31 Jul 2020 12:11:19 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5D24010C6EAD; Fri, 31 Jul 2020 16:11:19 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast02.extmail.prod.ext.rdu2.redhat.com [10.11.55.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3FA4A10C6EA5 for ; Fri, 31 Jul 2020 16:11:16 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5C96A801183 for ; Fri, 31 Jul 2020 16:11:16 +0000 (UTC) Received: from de-smtp-delivery-102.mimecast.com (de-smtp-delivery-102.mimecast.com [62.140.7.102]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-503-bgZ_1HO1PJCRF6sLh4jRAQ-1; Fri, 31 Jul 2020 12:11:13 -0400 Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01lp2055.outbound.protection.outlook.com [104.47.2.55]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-16-i_9czeKyN7aEoG10BnWabw-4; Fri, 31 Jul 2020 18:11:11 +0200 Received: from VI1PR0401MB2429.eurprd04.prod.outlook.com (2603:10a6:800:2c::13) by VI1PR04MB6830.eurprd04.prod.outlook.com (2603:10a6:803:132::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.17; Fri, 31 Jul 2020 16:11:10 +0000 Received: from VI1PR0401MB2429.eurprd04.prod.outlook.com ([fe80::7cc0:b0a4:b951:90e2]) by VI1PR0401MB2429.eurprd04.prod.outlook.com ([fe80::7cc0:b0a4:b951:90e2%11]) with mapi id 15.20.3216.034; Fri, 31 Jul 2020 16:11:10 +0000 Received: from linux-tbji.devlab.prv.suse.com (192.150.153.236) by FR2P281CA0019.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:14::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.9 via Frontend Transport; Fri, 31 Jul 2020 16:11:08 +0000 X-MC-Unique: rmh7tLu0MVWV4cYh3HwcRg-1 X-MC-Unique: bgZ_1HO1PJCRF6sLh4jRAQ-1 X-MC-Unique: i_9czeKyN7aEoG10BnWabw-4 From: Jim Fehlig To: libvir-list@redhat.com Subject: [PATCH 3/4] Xen: Add support for qemu commandline passthrough to config converter Date: Fri, 31 Jul 2020 10:10:42 -0600 Message-ID: <20200731161043.8858-4-jfehlig@suse.com> In-Reply-To: <20200731161043.8858-1-jfehlig@suse.com> References: <20200731161043.8858-1-jfehlig@suse.com> X-ClientProxiedBy: FR2P281CA0019.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:14::6) To VI1PR0401MB2429.eurprd04.prod.outlook.com (2603:10a6:800:2c::13) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-Originating-IP: [192.150.153.236] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7727e85b-002d-4ff8-a466-08d8356c5655 X-MS-TrafficTypeDiagnostic: VI1PR04MB6830: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3631; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JKZ3QTX3fTweDG558Hvv+b+RW1QdfsUpJyc4CEKKEWg7FJvxMAzgW1hZc5d40SrGITVXCScdKGH+QJXdSF//pxBhDtU8XN3JZYNCGtSYxZuBX7iF2E3bfmoNRoIGJIGbRQkGgeWmawS95SpWreLYelolM9/mi28mkTKgD/FdgmbQpJGVut4DilnyCj1u8QFdzUNHjnWwdi/oBx/5C2NXsfzwKEpCaTmi2JVKO3gZDvOEsyBBDZglsZ7CF/eL4nnGD5A2fm6hCiEweL8oOnAKQbdneDNvXYJ/fb97KumHgOgElF8NRwvX/KQScyL7vbieqDdvIHOQ+mgkSchqM4rX49uFE7locS4a1kdytisgHW39e3JMWohIu4iMIvzPzDTra0xMNbhlFo+8/jgFtVMM7A== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR0401MB2429.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(136003)(376002)(39860400002)(346002)(396003)(366004)(4326008)(6666004)(16526019)(186003)(26005)(1076003)(5660300002)(86362001)(316002)(8676002)(66556008)(2906002)(478600001)(956004)(7696005)(83380400001)(6916009)(52116002)(66476007)(107886003)(6486002)(8936002)(36756003)(2616005)(66946007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 9RTIK8Jt3W8PDLwIYFz6tGxK0xw0lrPd/TbiFb6bnS8zb6CUmCBlCem5jHqndqJrRh2u0/h/j3lpQuEGzYsWXOX82MpkpztF/qOw2ijh+DonV1kbdsVSpS7aH4Z4fdzY3DS5Mv2JWvSGPELd8YXVjJpdqvuHiKx0cn8BWVkzAesb1eYDW9YbMQlTdUVtBAr08+8naqvEuH/K44M8eU4ODBtWcIQVkMz/dMdyTBG608ijjon9ELm13xyoTfawdjsVWmcFpwSKMKe1j43/AZLATVTmEt7JmshjZK3j1rYEqEcxM1bTblmWXT88ZTkMOiDYmR2JcfpcZegN1mO5XNrWv1Dsvhz8DFxmvkiaZIz48LVEiRfjoNQP/JAbA+35kx9IUMDtl5K9CnVElEUSYZ8Tzmc3hQ1SSmt0AZzQOfw6OWf+OAle3Avg8d0iIQUMeNEONvMVmJlePrGh/WeOPQ2kHe9cD+TZ7KXIwPuEJjxUW3iWisz7l6Rsy2dbhkX7gm2IYMzK7L4IBb/HMxFA0nDt0dSLPE2swogarQI/Oz7SuKqv49qDjPyQCxaRAzqwTStCH8DVojqYayANMD02wtrr7J15t5hxp8NM5rVuWGi2Oe+4+DwO3WWv6qxhQ+C6Lpq7+q4Yfr1kbitXCF5uQCcNQQ== X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7727e85b-002d-4ff8-a466-08d8356c5655 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0401MB2429.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jul 2020 16:11:10.0075 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: sOQdie8eq4d/pDJh8XbDFfhjKWOcwR5WnVZ6w0dFGQtTIRHMO3tDLDO274l9cFdj9kb5geNSXodB7lmCiaQVKg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB6830 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false; X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 06VGBJ1Y002585 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Support qemu commandline passthrough in the domXML to native config converter. Add tests to check the conversion. Signed-off-by: Jim Fehlig --- I had to add a small hack to xlconfigtest.c to set def->ns after parsing the xl.cfg file to virDomainDef object. The hack could also be added to xenParseXL in src/libxl/xen_xl.c, where the virDomainDef object is created. Opinions much welcomed :-). src/libxl/xen_xl.c | 88 ++++++++++++++++++++ tests/xlconfigdata/test-qemu-passthrough.cfg | 26 ++++++ tests/xlconfigdata/test-qemu-passthrough.xml | 53 ++++++++++++ tests/xlconfigtest.c | 4 + 4 files changed, 171 insertions(+) diff --git a/src/libxl/xen_xl.c b/src/libxl/xen_xl.c index f9dc18ab18..a5d70d4039 100644 --- a/src/libxl/xen_xl.c +++ b/src/libxl/xen_xl.c @@ -32,6 +32,7 @@ #include "virstoragefile.h" #include "xen_xl.h" #include "libxl_capabilities.h" +#include "libxl_conf.h" #include "cpu/cpu.h" =20 #define VIR_FROM_THIS VIR_FROM_XENXL @@ -1158,6 +1159,40 @@ xenParseXLChannel(virConfPtr conf, virDomainDefPtr d= ef) return -1; } =20 +static int +xenParseXLNamespaceData(virConfPtr conf, virDomainDefPtr def) +{ + virConfValuePtr list =3D virConfGetValue(conf, "device_model_args"); + VIR_AUTOSTRINGLIST args =3D NULL; + size_t nargs; + libxlDomainXmlNsDefPtr nsdata =3D NULL; + + if (list && list->type =3D=3D VIR_CONF_LIST) { + list =3D list->list; + while (list) { + if ((list->type !=3D VIR_CONF_STRING) || (list->str =3D=3D NUL= L)) { + list =3D list->next; + continue; + } + + virStringListAdd(&args, list->str); + list =3D list->next; + } + } + + nargs =3D virStringListLength((const char **)args); + if (nargs > 0) { + if (VIR_ALLOC(nsdata) < 0) + return -1; + + nsdata->args =3D g_steal_pointer(&args); + nsdata->num_args =3D nargs; + def->namespaceData =3D nsdata; + } + + return 0; +} + virDomainDefPtr xenParseXL(virConfPtr conf, virCapsPtr caps, @@ -1207,6 +1242,9 @@ xenParseXL(virConfPtr conf, if (xenParseXLChannel(conf, def) < 0) goto cleanup; =20 + if (xenParseXLNamespaceData(conf, def) < 0) + goto cleanup; + if (virDomainDefPostParse(def, VIR_DOMAIN_DEF_PARSE_ABI_UPDATE, xmlopt, NULL) < 0) goto cleanup; @@ -2165,6 +2203,53 @@ xenFormatXLDomainChannels(virConfPtr conf, virDomain= DefPtr def) return -1; } =20 +static int +xenFormatXLDomainNamespaceData(virConfPtr conf, virDomainDefPtr def) +{ + libxlDomainXmlNsDefPtr nsdata =3D def->namespaceData; + virConfValuePtr args =3D NULL; + size_t i; + + if (!nsdata) + return 0; + + if (nsdata->num_args =3D=3D 0) + return 0; + + if (VIR_ALLOC(args) < 0) + return -1; + + args->type =3D VIR_CONF_LIST; + args->list =3D NULL; + + for (i =3D 0; i < nsdata->num_args; i++) { + virConfValuePtr val, tmp; + + if (VIR_ALLOC(val) < 0) + goto error; + + val->type =3D VIR_CONF_STRING; + val->str =3D g_strdup(nsdata->args[i]); + tmp =3D args->list; + while (tmp && tmp->next) + tmp =3D tmp->next; + if (tmp) + tmp->next =3D val; + else + args->list =3D val; + } + + if (args->list !=3D NULL) + if (virConfSetValue(conf, "device_model_args", args) < 0) + goto error; + + return 0; + + error: + virConfFreeValue(args); + return -1; +} + virConfPtr xenFormatXL(virDomainDefPtr def, virConnectPtr conn) { @@ -2208,5 +2293,8 @@ xenFormatXL(virDomainDefPtr def, virConnectPtr conn) if (xenFormatXLDomainChannels(conf, def) < 0) return NULL; =20 + if (xenFormatXLDomainNamespaceData(conf, def) < 0) + return NULL; + return g_steal_pointer(&conf); } diff --git a/tests/xlconfigdata/test-qemu-passthrough.cfg b/tests/xlconfigd= ata/test-qemu-passthrough.cfg new file mode 100644 index 0000000000..42aad92205 --- /dev/null +++ b/tests/xlconfigdata/test-qemu-passthrough.cfg @@ -0,0 +1,26 @@ +name =3D "XenGuest2" +uuid =3D "c7a5fdb2-cdaf-9455-926a-d65c16db1809" +maxmem =3D 579 +memory =3D 394 +vcpus =3D 1 +pae =3D 1 +acpi =3D 1 +apic =3D 1 +viridian =3D 0 +rtc_timeoffset =3D 0 +localtime =3D 0 +on_poweroff =3D "destroy" +on_reboot =3D "restart" +on_crash =3D "restart" +device_model =3D "/usr/lib/xen/bin/qemu-system-i386" +sdl =3D 0 +vnc =3D 1 +vncunused =3D 1 +vnclisten =3D "127.0.0.1" +vif =3D [ "mac=3D00:16:3e:66:92:9c,bridge=3Dxenbr1,script=3Dvif-bridge,mod= el=3De1000" ] +parallel =3D "none" +serial =3D "none" +builder =3D "hvm" +boot =3D "d" +disk =3D [ "format=3Draw,vdev=3Dhda,access=3Drw,backendtype=3Dqdisk,target= =3D/var/lib/libvirt/images/XenGuest2" ] +device_model_args =3D [ "-debugcon", "file:/tmp/debug.log", "-global", "is= a-debugcon.iobase=3D0x402" ] diff --git a/tests/xlconfigdata/test-qemu-passthrough.xml b/tests/xlconfigd= ata/test-qemu-passthrough.xml new file mode 100644 index 0000000000..c7174cab06 --- /dev/null +++ b/tests/xlconfigdata/test-qemu-passthrough.xml @@ -0,0 +1,53 @@ + + XenGuest2 + c7a5fdb2-cdaf-9455-926a-d65c16db1809 + 592896 + 403456 + 1 + + hvm + /usr/lib/xen/boot/hvmloader + + + + + + + + + destroy + restart + restart + + /usr/lib/xen/bin/qemu-system-i386 + + + + +

+ + + + + + +