From nobody Sun May 5 17:18:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=quarantine dis=quarantine) header.from=suse.com ARC-Seal: i=1; a=rsa-sha256; t=1614639061; cv=none; d=zohomail.com; s=zohoarc; b=GVgw4fhUBlsKPOGCsfqpWSHpLNZA5B6s2HLfQb5g6KhpPlJU6Xi1VCLoeo1nihFDTM0OkgCUT76u5m5W8UDNKf25/XMFPIHMb2skuNYofaRhsh2Dby726WXZnWXvgX1/BjUff8PLJt7q/k//Umib1xvUFA3MAiGqu/6ZcRw1hPM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614639061; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=3io2iTmXYSLLYhXlzw+Lwgthx1/5HbzRQ0jd3HgSUCg=; b=T8EQs6qP5Gzfen0QAexS1uOjRyafjtp6nwcvKreJq2oh+WeWT48gyKw2wbOzYqu9SC/Gv7q1OStPEnM6SodbtLbOKSln0Mx2Dd7Ln52YDmvWqGO3gJud88N3h19iY6j8/zlpIgHzCgHneihfh1VjUbhfavQZ+7KaIgJBiBcj3mY= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=quarantine dis=quarantine) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1614639061805190.91620674953083; Mon, 1 Mar 2021 14:51:01 -0800 (PST) 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-346-kYy8h7agNdmBbAgkR68rgw-1; Mon, 01 Mar 2021 17:50:58 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8B6E0100CCC0; Mon, 1 Mar 2021 22:50:52 +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 A3B831F44F; Mon, 1 Mar 2021 22:50:49 +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 1D02E4E58D; Mon, 1 Mar 2021 22:50:44 +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 121MoOG9010599 for ; Mon, 1 Mar 2021 17:50:25 -0500 Received: by smtp.corp.redhat.com (Postfix) id C179EF8091; Mon, 1 Mar 2021 22:50:24 +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 BB3A7F49D8 for ; Mon, 1 Mar 2021 22:50:22 +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 F2A8B9595C7 for ; Mon, 1 Mar 2021 22:50:21 +0000 (UTC) Received: from de-smtp-delivery-102.mimecast.com (de-smtp-delivery-102.mimecast.com [194.104.109.102]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-407-YSXfB08FPXOxbs6sxwMftA-1; Mon, 01 Mar 2021 17:50:19 -0500 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05lp2107.outbound.protection.outlook.com [104.47.18.107]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-13-FKxMBV2rNCyCsE8hZVfsNA-1; Mon, 01 Mar 2021 23:50:17 +0100 Received: from AS8PR04MB7976.eurprd04.prod.outlook.com (2603:10a6:20b:2af::18) by AM6PR04MB4375.eurprd04.prod.outlook.com (2603:10a6:20b:20::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.19; Mon, 1 Mar 2021 22:50:16 +0000 Received: from AS8PR04MB7976.eurprd04.prod.outlook.com ([fe80::ed5c:d17d:4b3d:aa32]) by AS8PR04MB7976.eurprd04.prod.outlook.com ([fe80::ed5c:d17d:4b3d:aa32%3]) with mapi id 15.20.3890.028; Mon, 1 Mar 2021 22:50:16 +0000 Received: from linux-tbji.devlab.prv.suse.com (75.169.34.2) by AM0PR05CA0079.eurprd05.prod.outlook.com (2603:10a6:208:136::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.19 via Frontend Transport; Mon, 1 Mar 2021 22:50:15 +0000 X-MC-Unique: kYy8h7agNdmBbAgkR68rgw-1 X-MC-Unique: YSXfB08FPXOxbs6sxwMftA-1 X-MC-Unique: FKxMBV2rNCyCsE8hZVfsNA-1 From: Jim Fehlig To: libvir-list@redhat.com Subject: [PATCH] libxl: Fix node device detach when driver unspecified Date: Mon, 1 Mar 2021 15:49:56 -0700 Message-ID: <20210301224956.13620-1-jfehlig@suse.com> X-Originating-IP: [75.169.34.2] X-ClientProxiedBy: AM0PR05CA0079.eurprd05.prod.outlook.com (2603:10a6:208:136::19) To AS8PR04MB7976.eurprd04.prod.outlook.com (2603:10a6:20b:2af::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 59f86e5b-9098-4301-4a46-08d8dd04617d X-MS-TrafficTypeDiagnostic: AM6PR04MB4375: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0 X-Microsoft-Antispam-Message-Info: xgOOG8a+VdP05ZBYRFVnlzsEDQWPLT7n4y2oditJsEaZWKWGB9SPQ17dU6jw2bG/xbj4FLa2NwPbWXx0bi2wilwqw4Unc/T2Bx1sF4m/Qdr98RT+6gDPLIPlzdR9bZt+eASR4lJR6J79bsEKG5fWEv5q78Zieyn8d7LwyqNz5to4hVszFCIGqGURzvT5ahcLjF57H/zlYp6m4Cv270TCsl3I0FHHQY5PrxuA/I6ISgypmqBcr/3tp7wVJSziYpmI8Z1soNqWnMcxvaZ9aOQYRjETXQAtQ0Qp8lfMAxZm2j/UwtetKzaV6sMd/josnMDZRxmVn3+O1cfElWyn0uYf1A2q/FSR6jcAh5qUlvPjY7ID312aoDNvnEP4zOZehvkmg8G77mfTmEoMkKGWPoB90B90NZ4TFfwO2U/E8/fRBqKtAjeg6g1y/qHWAP6LlCIMCFA+wHgHh5Rt7GIhupI/mlPqD3YzvaWBi9xw5Hhz3uMh1YIsqSF/+cL5dXzD+LgnJTo0pFPRveF8N0NY9wIZXg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8PR04MB7976.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(376002)(346002)(136003)(39860400002)(366004)(396003)(6486002)(956004)(2906002)(1076003)(52116002)(6666004)(478600001)(26005)(7696005)(2616005)(5660300002)(186003)(16526019)(6916009)(316002)(8676002)(107886003)(66476007)(36756003)(66556008)(4326008)(8936002)(66946007)(86362001); DIR:OUT; SFP:1101 X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?n5WPTQ600Wp51Gs1Yg5J1NO0EaK8tEP7OdoZfrCRkBCS6xfhUGc5AVieRAQw?= =?us-ascii?Q?cq+Yo23pN2R3jMFWLxOZBHZTxWNIQa31fk+NchxfoBSBaJlqnE0Fek9KDqW5?= =?us-ascii?Q?TohwbAmu/F2delwr9u8HyWwiDaS7ud6qt4ca6mQpKBZMgNoiL+bo1ugwkevk?= =?us-ascii?Q?O57RDSrWcZQ0ZIBMfE2B6BUB/iwPou5bQ0X/qkvo1uoOjL+bSFnTSEqrmpbV?= =?us-ascii?Q?KbhRrCJLze0HLKItcJ8y7TtN3GXtgrKW33Hddq7sJ8CpayAVjhLDi03jRIUz?= =?us-ascii?Q?YVjBVPETo4xUcdX6HLUrEYxRuuaiqyPWrVaDlyot19YI1MjJUGE8lgJwJk8x?= =?us-ascii?Q?V2FU72sCmcg+6Jr3X9+uEWdQ4Wr+YvjBKEfyONwsGwf8VgPjzbOprzTkVn4Q?= =?us-ascii?Q?G/i5It4Io943gkplpxM0TrlTA6Pdkp7TwXIuN0apUPpCjzn0e0e1UkC0Agh1?= =?us-ascii?Q?/523qPDwuuStM1B7c1AiNTUQ4wzr7OHs/oiOZrwWWIausZCTJxPBms8xVAm5?= =?us-ascii?Q?PKXaZ7bVrreZt5OzvP5AWxQfAtiKG+CiA+dtIL+8yAHzkFGGQIZPNc7HcDJe?= =?us-ascii?Q?Xe2vcoPq8GhRIYHezgl0Er4mbOFVGRo40xL8VI5FlGB8PKjDmUmcowCDFs4H?= =?us-ascii?Q?u30op+PJJD9hjV9dFX84UDr0QjJk9l8dvKq3LxEWgtSwSxhtrT5NwumS4TpU?= =?us-ascii?Q?KE0tsFKAE47jKo9t22X011ngukQ3Mp9bAMS+ZLzgYAqea09JoiL1+boMZLKi?= =?us-ascii?Q?EILIzJZvVQAxRryxy4fMC+OmK7uies2U3rLRydqK5elD58HI3gIAovLU0fav?= =?us-ascii?Q?i41p5/c116hGPud2zQCx9jTHj2qj1nup8pZ8DfumCVYbbC5gtjj8Mvno2z6p?= =?us-ascii?Q?yJq07sxJMrWaR4QTmIDBIdAEpNN3GseDCX1pDQOB6ro9OirbLMLIjMBN6L/y?= =?us-ascii?Q?ZRfes82OFWi0h/F+tGfQnn8c1hOnOxDclbSbu2S7E5fmPJYbp6S/e/+nVLCT?= =?us-ascii?Q?Pdh3XvMKdrkTLo3Op8hphMWC1ITKWqYzFi+B5ru8Jg17gNQ2Rd/o+/bPMfZH?= =?us-ascii?Q?WmrMK3fc5D3DzJrjKCz2GHwUggoMIEiNhywVzweQ/3gJijkFC5KaD/TEM56B?= =?us-ascii?Q?g/t8vC+x3RoCgvR1faINZZqPRjvBneGD6wKqMUI8HlzXpd5+uwOdEdLl/SQF?= =?us-ascii?Q?sXa9xopUuKldiSXpZ/ChyU7PDHo9ePdh8m0zo5nBG6haXki9baqcMZM5wfeq?= =?us-ascii?Q?dQH6BwrSmaG7NBlRLbykorM2PAanF1/CeVgD5v/UBPPbFkOoTYf0dC2MMy39?= =?us-ascii?Q?K119rTA2xId/iZvf5+NS6VKf?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 59f86e5b-9098-4301-4a46-08d8dd04617d X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB7976.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Mar 2021 22:50:16.3938 (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: Tr68Q/9OGmQ+8RqJun9yh7Ki6BSQROREmzyhYGo+SYAHrVIAbw0sUv+FN0Co/7PtET5QxVmcJQHC15e1KGgHMw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB4375 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 121MoOG9010599 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.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Commit 887dd0d331 caused a small regression in NodeDeviceDetach in the libxl driver when the 'driver' parameter is not specified. E.g. error: Failed to detach device pci_0000_0a_10_0 error: An error occurred, but the cause is unknown If the driver name is not specified, NULL is passed to virDomainDriverNodeDeviceDetachFlags, in which case virPCIDeviceSetStubDriv= er is never called to set the stub to pciback. Fix it by setting the driver to "xen" if it is not specified when invoking NodeDeviceDetach. Signed-off-by: Jim Fehlig Reviewed-by: Pavel Hrdina --- src/libxl/libxl_driver.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index 75a8d46af0..348434ca72 100644 --- a/src/libxl/libxl_driver.c +++ b/src/libxl/libxl_driver.c @@ -5777,6 +5777,9 @@ libxlNodeDeviceDetachFlags(virNodeDevicePtr dev, =20 virCheckFlags(0, -1); =20 + if (!driverName) + driverName =3D "xen"; + if (driverName && STRNEQ(driverName, "xen")) { virReportError(VIR_ERR_INVALID_ARG, _("unsupported driver name '%s'"), driverName); --=20 2.29.2