From patchwork Fri Nov 10 20:42:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Volodymyr Babchuk X-Patchwork-Id: 13452792 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 551CDC4167B for ; Fri, 10 Nov 2023 20:43:12 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.630794.983897 (Exim 4.92) (envelope-from ) id 1r1YKs-0005Ds-04; Fri, 10 Nov 2023 20:42:38 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 630794.983897; Fri, 10 Nov 2023 20:42:37 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r1YKr-0005Dl-Tm; Fri, 10 Nov 2023 20:42:37 +0000 Received: by outflank-mailman (input) for mailman id 630794; Fri, 10 Nov 2023 20:42:36 +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 1r1YKq-0004yp-H5 for xen-devel@lists.xenproject.org; Fri, 10 Nov 2023 20:42:36 +0000 Received: from mx0a-0039f301.pphosted.com (mx0a-0039f301.pphosted.com [148.163.133.242]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id aadc3ae5-8009-11ee-9b0e-b553b5be7939; Fri, 10 Nov 2023 21:42:32 +0100 (CET) Received: from pps.filterd (m0174677.ppops.net [127.0.0.1]) by mx0a-0039f301.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3AAKIjQt010025; Fri, 10 Nov 2023 20:42:27 GMT Received: from eur05-am6-obe.outbound.protection.outlook.com (mail-am6eur05lp2104.outbound.protection.outlook.com [104.47.18.104]) by mx0a-0039f301.pphosted.com (PPS) with ESMTPS id 3u9kkysufj-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 10 Nov 2023 20:42:27 +0000 Received: from VI1PR03MB3710.eurprd03.prod.outlook.com (2603:10a6:803:31::18) by DB3PR0302MB8991.eurprd03.prod.outlook.com (2603:10a6:10:437::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.29; Fri, 10 Nov 2023 20:42:23 +0000 Received: from VI1PR03MB3710.eurprd03.prod.outlook.com ([fe80::8e03:368:1fd7:1822]) by VI1PR03MB3710.eurprd03.prod.outlook.com ([fe80::8e03:368:1fd7:1822%5]) with mapi id 15.20.6977.019; Fri, 10 Nov 2023 20:42:23 +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: aadc3ae5-8009-11ee-9b0e-b553b5be7939 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C7dj0MfiNhBcQRxOXWlLu+E8hDVjZ4M/bAd97c+F09PNhDkq6PB+58Oi811KA+U5QsX5i6jHY4e4Wt4304XprWFNR+t9Y1qankKjmD2epfw3E0+T3I03rBmXx+NetH7LdEmJiposO5pEv9bvgYxaXpcxjEeAmEcQhS0I/Hc70HsC9gyYkKKtfnbgVfAYQuBB9Ri4B/IiUmb1C6wBt99wQwM2E901Fvxbm98VwtGuGbd3bgD6on+6gRW/ooMP5fDZzdBVJOZ+4pPJ38qj4NF3b7Vi9P/jhzRNv5vANNXd3LCoV9W7jeLSBRXeCCpysC2Nvu92PqBlcLZI8M1/TK4L8w== 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=OKWARBfkUGbfwrphZNisw+1lvrxJ4IcHq6RYQnSJRuE=; b=E26+7tTYs5Vb45W2X5Nga72XsY/IoP4LX8fHXDkAKXZ3PlYsLbh18raJ81iZQQZQaG/38GWH2SXgy2gBvEeLdnZqdHnuRsMrF9Syp6sUTtXkFnx6JHw56Qx26e6vqlouKJmhJrZ2oPAc7YpOr45xmPX4EJsuvW6HLTMltwc6OnCccYKWckVf/AacYqMaMEvVwCHHO6QxqH51Rz8C8qx4VZ+mB/M6aSTQIBFuOQ0SxT7uF34qklJf+YjON8lbkVjz3i2JLNmwaoJEwt5Wods5c9nn9wpyI85lO3qkXITNoBsYlsYXhlxsBvlFiyRjrJeVnRvlISWt5V1ohCRtTDQH0Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=epam.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OKWARBfkUGbfwrphZNisw+1lvrxJ4IcHq6RYQnSJRuE=; b=BNIe2UUcVtrvYCL9/nRZ8oH+N9+9MFwo/bxvlJYU2vxi9rwIjIG4xzlfR6qCon+lH0nZukftKOSbzv9+QhFxqPaer3/YbFsVYJgh9sEvZUBTrClVJNqeCwwn15h8fE5/XYEv570YZQondgAKe/DiAY7fw5EPdwJ8Eua/iBVIYeKmheCl7ZHRJOWS39KaawYKdE+2nL1vDqojC9LSUul/lIcDMA/S9vCXqhTW26nYOaer9MtkzMifC7lAU1YiOuUq4h6pFMpUrMovytMg3IdavnLWNzZ8lQICWvk7aKYxd/x/xlYya7E1fHHRqv65rv3x4iZupqr0YTRyny0jewleqg== From: Volodymyr Babchuk To: "qemu-devel@nongnu.org" CC: Oleksandr Tyshchenko , Volodymyr Babchuk , Stefano Stabellini , Anthony Perard , Paul Durrant , "open list:X86 Xen CPUs" Subject: [PATCH v1 2/7] xen-bus: Do not destroy frontend/backend directories Thread-Topic: [PATCH v1 2/7] xen-bus: Do not destroy frontend/backend directories Thread-Index: AQHaFBZnKqlUX8wCr0GIKTREthBW5Q== Date: Fri, 10 Nov 2023 20:42:22 +0000 Message-ID: <20231110204207.2927514-3-volodymyr_babchuk@epam.com> References: <20231110204207.2927514-1-volodymyr_babchuk@epam.com> In-Reply-To: <20231110204207.2927514-1-volodymyr_babchuk@epam.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.42.0 x-ms-publictraffictype: Email x-ms-traffictypediagnostic: VI1PR03MB3710:EE_|DB3PR0302MB8991:EE_ x-ms-office365-filtering-correlation-id: 5bc8600f-bd49-4902-caac-08dbe22d8aac x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: eMdTJYD8hdUfjYRSfS49W/otw7oU2rlT7EZkqGf1DooukUiBpoK9jUnSvMo2/4ejhwEJ1TSlJM5alts0x+Q479PTwHvu/NmPcKGtNDr8igBN8spOOATeULQnekd/nSG0cBsaLpkYBK4EUYoxNCb3Q2I9ihpv16U8AJXZzJd5s6DXEJPy8FfmB89UQzL2aL8SR26X5D01s9hhOQz17EZwAez1TlmGPRyZSYhJpsQ/mSuXx6x6bWP8e357/R6lQLBEPgnSLvr9+9AtMnYpFUr1bm373HTNNxO3xRPbXCViW4PZ3zh7opC8t2DMKjryPRiGBzPoDLxkmzJnMCKRxGv8inoZmYazCg58+FR2hId6cZKyJ6IzeqQSLTK+ZSl6VFW+bchrs56QIpf9ZM+wIJyRYmA508cS/a05szLh/0bF0VxCbNuZU8vP6oJPhWF3lsNUP5Tb5RIVjYW0IFDPN2OpOFySCmtbfp1hLEbnIKyu/3R/y1MM8cfQiag8G/oRr6xxJjO3KSO7iblvseXtNjhm01fyIrSOd4Cwrb/L1i94Yel/yY9QjIGBiqLbZRRJSMFgwi1A0Bb3+7teaNnY872SsVvnq8sNd293Ya/wEOnBkRCzXXgpeaBXd10kh+VdzUfB x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR03MB3710.eurprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(136003)(376002)(346002)(39860400002)(396003)(366004)(230922051799003)(451199024)(186009)(1800799009)(64100799003)(41300700001)(2906002)(8936002)(4326008)(86362001)(5660300002)(38070700009)(8676002)(316002)(36756003)(83380400001)(38100700002)(478600001)(2616005)(1076003)(6512007)(6486002)(71200400001)(122000001)(6506007)(55236004)(91956017)(76116006)(66556008)(66446008)(26005)(6916009)(64756008)(66476007)(66946007)(54906003);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?232sTjS/Gy/kngS8P2pcprt?= =?iso-8859-1?q?A+UZK7UcGFy+3w4XwY9/Z2d5IMTkpNJsuPiH549jXIFHIriUBo49FPcfrWlB?= =?iso-8859-1?q?cMuAJZ5+rW5QAbLuIyPsOORTiGH9uY8Fm4wDLlVJ3ZtyN3ka2wNCBxA81WFB?= =?iso-8859-1?q?u7DpU3AwsW+qi2+BBxv9zkEulL54vDtcQJaSp8tXCTRid606zo8o4BucM4j/?= =?iso-8859-1?q?FBjMxCM0SOREZaHg1oDirJGuJ+GHQJnB5HkpvkRyJxTyERs3+vUfSQHmqVx2?= =?iso-8859-1?q?x9CwBGptfZQoZ3+n+ey9FYgyPDFO28t1Dk+ctp4lJsPL1fUYgJMb+xpTukdO?= =?iso-8859-1?q?J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ox5VX8dLqm+0UWKyy4+YEsuiJ?= =?iso-8859-1?q?aqqzkba6jBxtvz0Iifx5F25jz2lo4K9NFta5v2svK1kp5TBks4FQQWaUL+Qi?= =?iso-8859-1?q?RuvX41J6Oh6dUx5O0aPMur8ALdlrHp10C5beUmEONP/RhbpNUZtvwzWDqeGe?= =?iso-8859-1?q?jx81dmuADqLTlqJAK9ut7mv2xDAalRLg2jCHx/qU0k7q7/BErOUbIkriBBTu?= =?iso-8859-1?q?j62DiBXncLtTJMZWPN4+8lGVuw3/m935n2WaiX45DAiVR5UAU/J3JdqIyQJ2?= =?iso-8859-1?q?YPimJB3zTo2lQGOLlTxdFsK5ZQ9QXtFjFMqpdIovfSKyKrAJIQMtX3IpVI0t?= =?iso-8859-1?q?mOz4AcBeeBOMXugQ90976pNXmTDEG8RjCy1czQzLSbRNY9XSnuXXMFPW9Q5x?= =?iso-8859-1?q?gRR/O/j4mo9kEdBmTNiG+vEDV6d5dFu6q56qczQ=3D=3D?= MIME-Version: 1.0 X-OriginatorOrg: epam.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: VI1PR03MB3710.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5bc8600f-bd49-4902-caac-08dbe22d8aac X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Nov 2023 20:42:22.3490 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b41b72d0-4e9f-4c26-8a69-f949f367c91d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 9kgIgaLSbA0ltG1jaSIk80Pe31b2A3q3L0zvgGTgvkIsDcF81mLGR1gaUpfjxsniawGKFWNA7zylwSu+UkBu6qEdmht3+/gYttvKHfuWA4s= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0302MB8991 X-Proofpoint-GUID: kKNgRHbizpDH08hwtsCO87z5qaDmoW4x X-Proofpoint-ORIG-GUID: kKNgRHbizpDH08hwtsCO87z5qaDmoW4x X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-10_18,2023-11-09_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 malwarescore=0 suspectscore=0 mlxscore=0 phishscore=0 clxscore=1015 bulkscore=0 priorityscore=1501 mlxlogscore=631 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311100172 From: Oleksandr Tyshchenko The PV backend running in other than Dom0 domain (non toolstack domain) is not allowed to destroy frontend/backend directories. The more, it does not need to do that at all, this is purely toolstack/xl devd business. I do not know for what reason the backend does that here, this is not really needed, probably it is just a leftover and all xs_node_destroy() instances should go away completely. Signed-off-by: Oleksandr Tyshchenko Signed-off-by: Volodymyr Babchuk Signed-off-by: David Woodhouse --- hw/xen/xen-bus.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/hw/xen/xen-bus.c b/hw/xen/xen-bus.c index 06d5192aca..75474d4b43 100644 --- a/hw/xen/xen-bus.c +++ b/hw/xen/xen-bus.c @@ -598,8 +598,9 @@ static void xen_device_backend_destroy(XenDevice *xendev) g_assert(xenbus->xsh); - xs_node_destroy(xenbus->xsh, XBT_NULL, xendev->backend_path, - &local_err); + if (xenbus->backend_id == 0) + xs_node_destroy(xenbus->xsh, XBT_NULL, xendev->backend_path, + &local_err); g_free(xendev->backend_path); xendev->backend_path = NULL; @@ -754,8 +755,9 @@ static void xen_device_frontend_destroy(XenDevice *xendev) g_assert(xenbus->xsh); - xs_node_destroy(xenbus->xsh, XBT_NULL, xendev->frontend_path, - &local_err); + if (xenbus->backend_id == 0) + xs_node_destroy(xenbus->xsh, XBT_NULL, xendev->frontend_path, + &local_err); g_free(xendev->frontend_path); xendev->frontend_path = NULL;