From nobody Tue Nov 26 01:33:26 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1588630233; cv=none; d=zohomail.com; s=zohoarc; b=Efuguzeg2fsIs1qKEPpWnXzORX6w93LjCQScTIkS3w3SEOPic4aqpogZvVl4fnBQcYYD3zbS80KcfUEbBqswwRhjAHCRKDLhcqgsj/Bbg65PzWZwQTDq1ITCGiFY4fiRJJfCvwjYj8P9c/a+vJDdAbOUXFxtbp8fSKeKQdmAqxg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588630233; 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=zH4Tp1nXd5ImuI02Wheo5e9yRe7a6pEcbzzeajZgi0o=; b=Ei7O179UAziC7NwGAqrn4oHsxkkA++1zgmtgip6X/uaMKHRcYWka/2jhPR+duWfKFXDXNl8X8TfjR6lvc4Lk4Av6UT4PjsjEPpKF/2bNxutbKZH+WVP9IDhat6XOB6bdQ2LihmiwG42sMJdcJy6ISp90x27AVlw3GTxA7MB8oCs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.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 [207.211.31.120]) by mx.zohomail.com with SMTPS id 1588630232975917.9790941076053; Mon, 4 May 2020 15:10:32 -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-373-x-drbIgLOfO3u_3o5KBQbQ-1; Mon, 04 May 2020 18:10:29 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 205A9100A625; Mon, 4 May 2020 22:10:24 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E3B33605DC; Mon, 4 May 2020 22:10:23 +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 7C9B9180954D; Mon, 4 May 2020 22:10:22 +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 044MAKg7010267 for ; Mon, 4 May 2020 18:10:20 -0400 Received: by smtp.corp.redhat.com (Postfix) id 64E1FB17D2; Mon, 4 May 2020 22:10:20 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 605F6B07BE for ; Mon, 4 May 2020 22:10:20 +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 41899101A525 for ; Mon, 4 May 2020 22:10:20 +0000 (UTC) Received: from m4a0072g.houston.softwaregrp.com (m4a0072g.houston.softwaregrp.com [15.124.2.130]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-129-m_C5GqI8N0q8-z4BQmyfEg-1; Mon, 04 May 2020 18:10:18 -0400 Received: FROM m4a0072g.houston.softwaregrp.com (15.120.17.147) BY m4a0072g.houston.softwaregrp.com WITH ESMTP FOR libvir-list@redhat.com; Mon, 4 May 2020 22:09:14 +0000 Received: from M4W0334.microfocus.com (2002:f78:1192::f78:1192) by M4W0335.microfocus.com (2002:f78:1193::f78:1193) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Mon, 4 May 2020 22:09:43 +0000 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (15.124.8.14) by M4W0334.microfocus.com (15.120.17.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10 via Frontend Transport; Mon, 4 May 2020 22:09:43 +0000 Received: from CY4PR1801MB2071.namprd18.prod.outlook.com (2603:10b6:910:79::35) by CY4PR1801MB2021.namprd18.prod.outlook.com (2603:10b6:910:7d::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.20; Mon, 4 May 2020 22:09:42 +0000 Received: from CY4PR1801MB2071.namprd18.prod.outlook.com ([fe80::ed4d:fafd:1763:cc9c]) by CY4PR1801MB2071.namprd18.prod.outlook.com ([fe80::ed4d:fafd:1763:cc9c%3]) with mapi id 15.20.2958.030; Mon, 4 May 2020 22:09:42 +0000 Received: from linux-tbji.provo.novell.com (75.169.7.53) by SN4PR0701CA0009.namprd07.prod.outlook.com (2603:10b6:803:28::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.19 via Frontend Transport; Mon, 4 May 2020 22:09:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588630231; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=zH4Tp1nXd5ImuI02Wheo5e9yRe7a6pEcbzzeajZgi0o=; b=hjG/XNzkv8iYZtxN3HPKGmwupuy3sghZJz3u0olpBhiT5xIUZP8YmNcGQz9Q0EbWf8Yz21 /yg7mocHhnyZk3tydQIXVA7gLp70IjcXLI0v37NMIiQQGs6vNEYGq3dmOYQ2P7XQoRqNGK kr6WbWz/MDhMpHhgu8ryh+LmVgaEwa8= X-MC-Unique: x-drbIgLOfO3u_3o5KBQbQ-1 X-MC-Unique: m_C5GqI8N0q8-z4BQmyfEg-1 From: Jim Fehlig To: Subject: [PATCH 2/3] libxl: Clarify that 'xenlight' should only be used internally Date: Mon, 4 May 2020 16:09:18 -0600 Message-ID: <20200504220919.23636-3-jfehlig@suse.com> In-Reply-To: <20200504220919.23636-1-jfehlig@suse.com> References: <20200504220919.23636-1-jfehlig@suse.com> X-ClientProxiedBy: SN4PR0701CA0009.namprd07.prod.outlook.com (2603:10b6:803:28::19) To CY4PR1801MB2071.namprd18.prod.outlook.com (2603:10b6:910:79::35) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-Originating-IP: [75.169.7.53] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 53bddf8b-4abf-4d1d-5ea9-08d7f077d8a5 X-MS-TrafficTypeDiagnostic: CY4PR1801MB2021: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-Forefront-PRVS: 03932714EB X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: P0zI424eVxb3allQqknoQ3weFwKvDWCrhXLJVTyYrrBGRJTANloNNeh6G9WbQy/lkz9jO3pRswnLPMWUaNRy4c27cKTqn7cYn/p26LBr66G2xqnXtWYIiWwCOT8HsiqG9NW3mKQX740noybx+VUqXkN0LKH7B1Fwf+D3Yy7lKPDWAZmsH9s8qoHaZL7dyi8RQBiSfpphiloKwEU51N1LPNR4TmAigszH35z+TETDT8dGo62o95JatE1HyEftfZGKT3gp+dJi7/m4EyGcGMOm0MSeU5lDzGXGn3/o06OKZlgRM8yAzqXIy04jptAEyGGHh7KvtUAuqZAlFc0WST0IA5fgX7RelEFYhX26mC/yvYVY9dLut23sKv/vJZsGK9mf1sQDZ11yCoHj7XlYGJmI3HnLeyVIYGnGjfgaherNL5zBUhs7+08rOuosuMkPvVI/kniHNO9Gc3H2pmbiiI+NENyUyPuc02tYD8NZzIkGPspxXHU5yuds4et0gVTfQLW6Qbox9opad50ZRLiohOhwtQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CY4PR1801MB2071.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(366004)(396003)(346002)(136003)(39860400002)(376002)(33430700001)(1076003)(2906002)(6486002)(6916009)(8676002)(52116002)(6512007)(478600001)(33440700001)(6506007)(66946007)(4326008)(66556008)(5660300002)(66476007)(316002)(16526019)(956004)(26005)(8936002)(2616005)(36756003)(186003)(6666004)(107886003)(86362001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: dKlci+STqJE2b/qTvynHOWiypTTe93yRR8ebJvNlh/twdHq0NRDSyG8po9wgfP++wKmzxFAuzuAafKDk+QwdFspv7mw6uxxTnn0s/nbF9cE/pnN5ntQ4PXQNV0YzNFlseWIneGiSB9XIurL9jweRtYihmaYwzMvNnx1r9eIvWl80bqt0hnaYgSD32I0vFaJzRG7zlq+siRcGwHc0muAGsneD4SDZCIagztEcae9CfnCl4zstXN2aHTVkyMu/t2FmJ4Cxabn1+cfYPIkp3vLRdFFqugDIC2FQ8Dtku+zNmmb67zpp7j4VgT4z1P3BUyJWX3EPX55ROT5xYrEqPwAJdd58jYdx+bn6JKbeGZrYNXFf/2zkqug5G6AG1V5Hw4vshRcmotPaXtQYQMUALCJGTLV185Mg/+SVJYOWZhPmoEW8Vl6yGazWQ0VXFwsJ6/oSFrMauNQjihOM62TRvPj9zCgGUV1F094Cs6KlZQ+CiIpxcOBbpPwYdV4bHpr+XVtOk/aqLDP7ZFEMbvLPnOdvuKlkkiLgDYqNwEg4fS53Dfl1PXkUhrwWUeNPqTwhzxp8xda0lMHXzTEOh/jc75rpwSZp8JCGnoMAZhSqSinB81bciCiOxjRc4cP0FIVc7ATtRP/zsCs/N7ToM2WkDHsy1TM8f2Q2OmpKWfWpHBd57OX0HBoAyw7WCNH4U2aGXzO1BipvdznP91OR64lVvR4AjNYhTto//KcjeOv4zi1a38ttk3mboj+X5HXYkWj0gHokxZO0YHVcTwb1f3wUl7loOkD557tmV9/gbn9sjqI6J4I= X-MS-Exchange-CrossTenant-Network-Message-Id: 53bddf8b-4abf-4d1d-5ea9-08d7f077d8a5 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 May 2020 22:09:42.5343 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 856b813c-16e5-49a5-85ec-6f081e13b527 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 3TyAZMUTmQitjOS6OC9pjQSkNLWG7bo+pPfP9nBRfPW58Xng8hEwlxXl0YLA74ZUXa7D/WKvFYiEkE8Y8cTG8Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1801MB2021 X-OriginatorOrg: suse.com 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 044MAKg7010267 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.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" The libxl driver has suffered an identity crisis since its introduction. It took on the name 'libxl' since at the time libvirt already contained a 'xen' driver for the old Xen toolstack implementation. 'libxl' is short for libxenlight, which is often called xenlight. Unfortunately all forms of the name are used in the libxl driver. The only remaining use of the 'xenlight' form is when interacting with the host device manager, which is difficult to change since it would cause problems when upgrading the driver. Rename the #define to make it clear the 'xenlight' form is internal and add a comment describing why the name exists and that its use should be discouraged. Signed-off-by: Jim Fehlig --- src/libxl/libxl_conf.h | 7 ++++++- src/libxl/libxl_domain.c | 4 ++-- src/libxl/libxl_driver.c | 14 +++++++------- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/libxl/libxl_conf.h b/src/libxl/libxl_conf.h index 11a922b10a..b057a9e4ba 100644 --- a/src/libxl/libxl_conf.h +++ b/src/libxl/libxl_conf.h @@ -39,7 +39,12 @@ #include "libxl_logger.h" =20 #define LIBXL_DRIVER_EXTERNAL_NAME "Xen" -#define LIBXL_DRIVER_NAME "xenlight" +/* + * We are stuck with the 'xenlight' name since it is used by the hostdev + * manager. Changing it would break management of any host devices previou= sly + * managed under the name 'xenlight'. + */ +#define LIBXL_DRIVER_INTERNAL_NAME "xenlight" #define LIBXL_VNC_PORT_MIN 5900 #define LIBXL_VNC_PORT_MAX 65535 =20 diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c index cc53a765e1..d9fcde4364 100644 --- a/src/libxl/libxl_domain.c +++ b/src/libxl/libxl_domain.c @@ -873,7 +873,7 @@ libxlDomainCleanup(libxlDriverPrivatePtr driver, VIR_FREE(xml); } =20 - virHostdevReAttachDomainDevices(hostdev_mgr, LIBXL_DRIVER_NAME, + virHostdevReAttachDomainDevices(hostdev_mgr, LIBXL_DRIVER_INTERNAL_NAM= E, vm->def, hostdev_flags, NULL); =20 VIR_FREE(priv->lockState); @@ -1370,7 +1370,7 @@ libxlDomainStart(libxlDriverPrivatePtr driver, if (cfg->autoballoon && libxlDomainFreeMem(cfg->ctx, &d_config) < 0) goto cleanup_dom; =20 - if (virHostdevPrepareDomainDevices(hostdev_mgr, LIBXL_DRIVER_NAME, + if (virHostdevPrepareDomainDevices(hostdev_mgr, LIBXL_DRIVER_INTERNAL_= NAME, vm->def, hostdev_flags) < 0) goto cleanup_dom; =20 diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index ebeb91af3c..63ec0a2188 100644 --- a/src/libxl/libxl_driver.c +++ b/src/libxl/libxl_driver.c @@ -431,7 +431,7 @@ libxlReconnectDomain(virDomainObjPtr vm, libxlLoggerOpenFile(cfg->logger, vm->def->id, vm->def->name, NULL); =20 /* Update hostdev state */ - if (virHostdevUpdateActiveDomainDevices(hostdev_mgr, LIBXL_DRIVER_NAME, + if (virHostdevUpdateActiveDomainDevices(hostdev_mgr, LIBXL_DRIVER_INTE= RNAL_NAME, vm->def, hostdev_flags) < 0) goto error; =20 @@ -3127,7 +3127,7 @@ libxlDomainAttachHostPCIDevice(libxlDriverPrivatePtr = driver, if (VIR_REALLOC_N(vm->def->hostdevs, vm->def->nhostdevs + 1) < 0) goto cleanup; =20 - if (virHostdevPreparePCIDevices(hostdev_mgr, LIBXL_DRIVER_NAME, + if (virHostdevPreparePCIDevices(hostdev_mgr, LIBXL_DRIVER_INTERNAL_NAM= E, vm->def->name, vm->def->uuid, &hostdev, 1, 0) < 0) goto cleanup; @@ -3149,7 +3149,7 @@ libxlDomainAttachHostPCIDevice(libxlDriverPrivatePtr = driver, goto cleanup; =20 error: - virHostdevReAttachPCIDevices(hostdev_mgr, LIBXL_DRIVER_NAME, + virHostdevReAttachPCIDevices(hostdev_mgr, LIBXL_DRIVER_INTERNAL_NAME, vm->def->name, &hostdev, 1, NULL); =20 cleanup: @@ -3264,7 +3264,7 @@ libxlDomainAttachHostUSBDevice(libxlDriverPrivatePtr = driver, if (VIR_REALLOC_N(vm->def->hostdevs, vm->def->nhostdevs + 1) < 0) goto cleanup; =20 - if (virHostdevPrepareUSBDevices(hostdev_mgr, LIBXL_DRIVER_NAME, + if (virHostdevPrepareUSBDevices(hostdev_mgr, LIBXL_DRIVER_INTERNAL_NAM= E, vm->def->name, &hostdev, 1, 0) < 0) goto cleanup; =20 @@ -3284,7 +3284,7 @@ libxlDomainAttachHostUSBDevice(libxlDriverPrivatePtr = driver, goto cleanup; =20 reattach: - virHostdevReAttachUSBDevices(hostdev_mgr, LIBXL_DRIVER_NAME, + virHostdevReAttachUSBDevices(hostdev_mgr, LIBXL_DRIVER_INTERNAL_NAME, vm->def->name, &hostdev, 1); =20 cleanup: @@ -3689,7 +3689,7 @@ libxlDomainDetachHostPCIDevice(libxlDriverPrivatePtr = driver, =20 virDomainHostdevRemove(vm->def, idx); =20 - virHostdevReAttachPCIDevices(hostdev_mgr, LIBXL_DRIVER_NAME, + virHostdevReAttachPCIDevices(hostdev_mgr, LIBXL_DRIVER_INTERNAL_NAME, vm->def->name, &hostdev, 1, NULL); =20 ret =3D 0; @@ -3811,7 +3811,7 @@ libxlDomainDetachHostUSBDevice(libxlDriverPrivatePtr = driver, =20 virDomainHostdevRemove(vm->def, idx); =20 - virHostdevReAttachUSBDevices(hostdev_mgr, LIBXL_DRIVER_NAME, + virHostdevReAttachUSBDevices(hostdev_mgr, LIBXL_DRIVER_INTERNAL_NAME, vm->def->name, &hostdev, 1); =20 ret =3D 0; --=20 2.26.0