From nobody Fri Nov 29 00:48:38 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1652099104; cv=none; d=zohomail.com; s=zohoarc; b=asL64n4DzpOtXPEstiURa6trTBeysg11NCRz6JzwYDZFKAKfTKFWzVV+BeoUZ66GYtzJX6ubiU/v1ypCRP6g11/XDeN4sj6/9CBoVND32Ijsw2hCFedHJlA0rhmE7uUNTE7SRvHm/BdAP7WYYbS06+l0T+/TLaUF+YOh6mWVk74= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1652099104; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=1A0B0ruzgQP5HgjRq2pyw/T9Ky2GQKzogJm7dn1310A=; b=Yz4Fgj1cyUW8Tw0ICpFePgZhse+mCUl6RBAND6mKsQ879/+uS3r++Q3wjWuQb+2rEQqBH1+yqozSENI/0tYRbTfR1oZuzI6NyiWzYXuQGAyRpI33XlhxWNmmat59SQmXgxC4y2KgyN91QVshArqUKTDy2Si7uoOCZQwHbqgodps= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1652099104919742.3821551389161; Mon, 9 May 2022 05:25:04 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.324458.546512 (Exim 4.92) (envelope-from ) id 1no2RN-0005xK-1T; Mon, 09 May 2022 12:24:41 +0000 Received: by outflank-mailman (output) from mailman id 324458.546512; Mon, 09 May 2022 12:24:41 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1no2RM-0005vV-RP; Mon, 09 May 2022 12:24:40 +0000 Received: by outflank-mailman (input) for mailman id 324458; Mon, 09 May 2022 12:24:39 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1no2RL-0005qB-Cm for xen-devel@lists.xenproject.org; Mon, 09 May 2022 12:24:39 +0000 Received: from esa2.hc3370-68.iphmx.com (esa2.hc3370-68.iphmx.com [216.71.145.153]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id fc806ad4-cf92-11ec-a406-831a346695d4; Mon, 09 May 2022 14:24:36 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: fc806ad4-cf92-11ec-a406-831a346695d4 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1652099076; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=BQHAL2/JZ7BiUyF6Ggb3MxDFFtfKott8B5+vLAiqkKM=; b=IrxhVwgaoSRLRJlxtcAUD2G2lfnSR7+Y3fNfwj4qrXE92pl5ObbED8Bi r7moyFY/qQY/gJxPGWs+Hya2l/nAXpiGChLcJ+EUhOqYHvGlt/UqEbHIm a7hkdksFVezwoJC8SNYxorRMSCZIufqGEC+km2lsrm0QgABqvpdHn20fA 0=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 5.1 X-MesageID: 70895895 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:MPrh06gOIz0p/RjHJP1zqgkRX161qRAKZh0ujC45NGQN5FlHY01je htvWWqEP/vbN2qgKNxzYY3npkICv5GBzNUwGwo6rng1EyMb9cadCdqndUqhZCn6wu8v7a5EA 2fyTvGacajYm1eF/k/F3oDJ9CU6jefSLlbFILas1hpZHGeIcw98z0M68wIFqtQw24LhXlvc4 YqaT/D3YzdJ5RYlagr41IrbwP9flKyaVOQw5wFWiVhj5TcyplFNZH4tDfjZw0jQG+G4KtWSV efbpIxVy0uCl/sb5nFJpZ6gGqECaua60QFjERO6UYD66vRJjnRaPqrWqJPwwKqY4tmEt4kZ9 TlDiXC/YTknYrLOoPUiakNzKS1MAK4dpOXkAmfq5KR/z2WeG5ft6/BnDUVwNowE4OdnR2pJ8 JT0KhhUMErF3bjvhuvmFK883azPL+GyVG8bklhmwSvUErANRpfbTr+RzdRZwC0xloZFGvO2i 88xNmI/PUmQMkAn1lE/B4kUkfqahnXDLRIEtRWXpI8Hv0zpw1kkuFTqGIWMIYHbLSlPpW6au 2bH8mLREhwcctuFxlKtzHWogePemDLhb6gbHra46/1CjUWawyoYDxh+fVG2u+Wjg0iyHddWM VUJ+zEGpLI3skesS7HVQBmQsHOC+BkGVLJ4A+A8rQ2A1KfQywKYHXQfCC5MbsQ8s807TiBs0 UWG9/vLLzFytLyeSVqG66yZ6zi1PEA9NnQebCUJSQ8E5djLo4wpiB/LCNF5H8aIYsbdQG+qh WrQ9W5n2utV3ZVjO7iHEU7vvTzwuZrxXzEMvC7tUlCY7VglPq2GeNn9gbTE1spoIIGcR1iHm XELncmC8ewDZa2weDyxrPYlR+/wuavcWNHIqRs2RsR6qWzxk5K2VdoIiAySMnuFJSrtldXBR EbI8T1c65ZIVJdBRf8mOtnhYyjGIEWJKDgEahw2RocVCnSSXFXelM2LWaJ39zq0+HXAaYllZ f+mnT+EVB7285hPwjusXPs62rQ23C04zm67bcmlkk7/jOHPPCPKE+ht3L6yggcRtvjsneko2 4wHa5viJ+t3DoUSnRU7AaZMdAtXfBDX9Lj9qtBNd/7rH+aVMDpJNhMl+pt4I9YNt/0Mzo/gp yjhMmcFmQGXrSCWdm23hoVLNeqHsWBX9iprY0TB/D+AhhAeXGpYxPpBJ8ZvIel7pYSOD5dcF pE4RilJOdwXIhyvxtjXRcKVQFBKHPhzuT+zAg== IronPort-HdrOrdr: A9a23:GYvOeaCjKkr8nWXlHemU55DYdb4zR+YMi2TC1yhKJyC9Ffbo7v xG/c5rsyMc5wxwZJhNo7y90ey7MBbhHP1OkO4s1NWZLWrbUQKTRekIh+bfKn/baknDH4ZmpN 9dmsNFaeEYY2IUsS+D2njbL+od X-IronPort-AV: E=Sophos;i="5.91,211,1647316800"; d="scan'208";a="70895895" From: Andrew Cooper To: Xen-devel CC: Andrew Cooper , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu , Stefano Stabellini , Julien Grall , Volodymyr Babchuk , Bertrand Marquis Subject: [PATCH 1/3] x86/p2m.h: Add include guards Date: Mon, 9 May 2022 13:24:07 +0100 Message-ID: <20220509122409.14184-2-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20220509122409.14184-1-andrew.cooper3@citrix.com> References: <20220509122409.14184-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1652099106968100002 Spotted by Eclair MISRA scanner. Signed-off-by: Andrew Cooper Reviewed-by: Bertrand Marquis Reviewed-by: Roger Pau Monn=C3=A9 --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 CC: Wei Liu CC: Stefano Stabellini CC: Julien Grall CC: Volodymyr Babchuk CC: Bertrand Marquis --- xen/arch/x86/mm/p2m.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xen/arch/x86/mm/p2m.h b/xen/arch/x86/mm/p2m.h index cc0f6766e4df..dc706b8e4799 100644 --- a/xen/arch/x86/mm/p2m.h +++ b/xen/arch/x86/mm/p2m.h @@ -15,6 +15,9 @@ * along with this program; If not, see . */ =20 +#ifndef __ARCH_MM_P2M_H__ +#define __ARCH_MM_P2M_H__ + struct p2m_domain *p2m_init_one(struct domain *d); void p2m_free_one(struct p2m_domain *p2m); =20 @@ -39,6 +42,8 @@ int ept_p2m_init(struct p2m_domain *p2m); void ept_p2m_uninit(struct p2m_domain *p2m); void p2m_init_altp2m_ept(struct domain *d, unsigned int i); =20 +#endif /* __ARCH_MM_P2M_H__ */ + /* * Local variables: * mode: C --=20 2.11.0 From nobody Fri Nov 29 00:48:38 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1652099108; cv=none; d=zohomail.com; s=zohoarc; b=hrVSnl7kGdRyK9Gmc+rwk34DutdlbXuM23/ICUh8Ids9uIXmvJrjadxuDiRG6KIOW2COqkVrbosb4TfjnY+I1Ee4gyThLGEmL1oskU0cYm8y5ubRFoTCvQk5wPU0WGNOlc84PLaDv+B6LZkO5lJ5Z+2WDd6qlS4coX0YjYCz5xU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1652099108; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=IDUcJ79cHmwHk/ILMAC1vZj74mMY8gmztg8Fv2azDUg=; b=QsrsSwEC94c0RsICS4i5Y5sVc3mxaD3+hfpECg0QgGzuHCxtZVpLorFvSQq4aTFfdNroFhASA7oIINzMNDFQYKAPWQLJiJt6eCMxRHqZIk3QhVJTNiwfIsFrVXFc6N8UXWJGolIWTMO9dz9m0FwQtUiwjgQACoJUQLqqDe4mS3E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1652099108584601.5772794634746; Mon, 9 May 2022 05:25:08 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.324456.546501 (Exim 4.92) (envelope-from ) id 1no2RM-0005qa-EH; Mon, 09 May 2022 12:24:40 +0000 Received: by outflank-mailman (output) from mailman id 324456.546501; Mon, 09 May 2022 12:24:40 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1no2RM-0005qT-AV; Mon, 09 May 2022 12:24:40 +0000 Received: by outflank-mailman (input) for mailman id 324456; Mon, 09 May 2022 12:24:38 +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 1no2RK-0005qA-Iv for xen-devel@lists.xenproject.org; Mon, 09 May 2022 12:24:38 +0000 Received: from esa3.hc3370-68.iphmx.com (esa3.hc3370-68.iphmx.com [216.71.145.155]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id fc755ce5-cf92-11ec-8fc4-03012f2f19d4; Mon, 09 May 2022 14:24:36 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: fc755ce5-cf92-11ec-8fc4-03012f2f19d4 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1652099076; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=uq1foPJpvaO1u+wSYrV1CFyZhCk56IBZRoJ5uogU+Oo=; b=MGXZoehUnaea7hS+Wo72qck8/13+MJ6pTQuQyizYIv56qHGyfTypqHQa 6SZoxgGmazWa0XSXbf3pTlfUEKX4V3EqeRPqRYqvdcuymdzJNr87zgrTO OT+rKRiCF0rPOjZhRm+R0Jy9KcLogVjJPP84KP3vPKSf1l3nVO49BoKsz s=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 5.1 X-MesageID: 70874005 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:AJbh3aKqaJHA+IRnFE+RGJUlxSXFcZb7ZxGr2PjKsXjdYENSgmQGz GUZWWvSa/7cYmKjedB0borj/EwD7JfcmIcyQVFlqX01Q3x08seUXt7xwmUcns+xwm8vaGo9s q3yv/GZdJhcokf0/0vrav67xZVF/fngqoDUUYYoAQgsA149IMsdoUg7wbRh39Y52YHR7z6l4 rseneWOYDdJ5BYsWo4kw/rrRMRH5amaVJsw5zTSVNgT1LPsvyB94KE3fMldG0DQUIhMdtNWc s6YpF2PEsE1yD92Yj+tuu6TnkTn2dc+NyDW4pZdc/DKbhSvOkXee0v0XRYRQR4/ttmHozx+4 P9J7ICrexclBPDJwMctTwFeFwYlbLITrdcrIVDn2SCS50jPcn+qyPRyFkAme4Yf/46bA0kXq 6ZecmpUKEne2aTmm9pXScE17ignBODtMJkSpTdLyjbBAOx9aZvCX7/L9ZlT2zJYasVmQq6OO JZBMWcHgBLoOy9uP1U8OrMFu+aKlD7jXB0JgmmWqv9ii4TU5FMoi+W8WDbPQfSIWMFUk0Cwt m/AuWPjDXkyCtubzjaU92O2scXGlyj7RYE6GaWx87hhh1j77mYeEgEMXF235/ywkFejWsl3I lYRvCEpqMAa60iDXtT7GRqirxasrhMaHtZdDeA+wAWM0bbPpRaUAHAeSTxMY8Bgs9U5LRQI/ FKUm9LiBRR0raaYD3ma89+8tiiuMCIYKWsDYy4sTgYf5dTn5oYpgXryos1LSfDvyIevQHepn m7M/HNWa6gvYdAj/aHi4Uv1kz6W+52RbT4p/gPTeTn08VYsDGK6XLCA5V/e5PdGCY+WSFido XQJ8/SjAPAy4YKlz3LUHrhUdF29z7PcaWCH3wYzd3U03271k0NPa7y8992XyK1BFs8fMQHkb 0bI0e+6zM8CZSD6BUObjm/YNijL8UQCPYm+Phw3RoAXCnSUSONg1Hs3DXN8J0i3zCARfVgXY P93i/qEA3cAErhAxzGrXeob2rJD7nlgmDmLGMuql0n4i+X2iJuppVAtagDmUwzExPnc/FW9H yh3aaNmNCmzoMWhO3KKoOb/3HgBLGQhBICeliCkXrXrH+aSI0l4U6W56ep4I+RNxv0J/s+Vr yrVchIJlzLCaYjvdFzihoZLM+u/A/6SbBsTYEQRALpf8yV9Mdv3sPdDJvPav9APrYRe8BK9d NFdE+3oPxiFYm2vF+g1BXUlkLFfSQ== IronPort-HdrOrdr: A9a23:y82ea6N6KMpEesBcTvmjsMiBIKoaSvp037Eqv3oedfUzSL3gqy nOpoV86faaslYssR0b9exofZPwJE80lqQFhrX5X43SPzUO0VHAROoJgLcKgQeQfxEWntQtrZ uIGJIeNDSfNzdHZL7BkWuFL+o= X-IronPort-AV: E=Sophos;i="5.91,211,1647316800"; d="scan'208";a="70874005" From: Andrew Cooper To: Xen-devel CC: Andrew Cooper , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu , Stefano Stabellini , Julien Grall , Volodymyr Babchuk , Bertrand Marquis Subject: [PATCH 2/3] x86/shadow: Don't use signed bitfield in sh_emulate_ctxt Date: Mon, 9 May 2022 13:24:08 +0100 Message-ID: <20220509122409.14184-3-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20220509122409.14184-1-andrew.cooper3@citrix.com> References: <20220509122409.14184-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1652099110787100002 'int' bitfields in particular have implementation defined behaviour under g= cc and can change signed-ness with -funsigned-bitfields. There is no need for low_bit_was_clear to be a bitfield in the first place;= it is only used as a boolean. Doing so even improves the code generation in sh_emulate_map_dest() to avoid emitting a merge with structure padding. Spotted by Eclair MISRA scanner. Signed-off-by: Andrew Cooper Reviewed-by: Bertrand Marquis Reviewed-by: Roger Pau Monn=C3=A9 --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 CC: Wei Liu CC: Stefano Stabellini CC: Julien Grall CC: Volodymyr Babchuk CC: Bertrand Marquis --- xen/arch/x86/mm/shadow/private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/mm/shadow/private.h b/xen/arch/x86/mm/shadow/priv= ate.h index 3dc024e30f20..772521b55dd3 100644 --- a/xen/arch/x86/mm/shadow/private.h +++ b/xen/arch/x86/mm/shadow/private.h @@ -827,7 +827,7 @@ struct sh_emulate_ctxt { #if (SHADOW_OPTIMIZATIONS & SHOPT_SKIP_VERIFY) /* Special case for avoiding having to verify writes: remember * whether the old value had its low bit (_PAGE_PRESENT) clear. */ - int low_bit_was_clear:1; + bool low_bit_was_clear; #endif }; =20 --=20 2.11.0 From nobody Fri Nov 29 00:48:38 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1652099109; cv=none; d=zohomail.com; s=zohoarc; b=GWdHUvx9+WR8M8d9ZrbHnLGDOhwJepl4BZjFTEYmdrWKQAM08ePPUi2M3AUDoMxZ0CsCvc3dZJJtX4PKIxquBnWhMxDYP/aeKhB6e6kA3sVmRERdYzB6sLg5iJDyPDMZlHY6VuERNUSOLyakftbMZLqreS5Iz4A7T3m6mpI6c/Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1652099109; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=NE/MOTwGpZ6bhphzhTvMshJ6BlYUwm1WMNoCG4VcJEk=; b=n7uHIpLL0Cs0iT/gbnQwJVNzPCn4osS2q8jYjmWxl2yAWjZ3owCzXz95Wh8ONw8KgsWNLUEFXiDO40XoIiWBa4PP/rvqY5UyqLzVKENRSDPs+mgZbThCqhMapMDV4R2zGnfKZ46r759MXf6lY4h8o04pVml5ZfJIU63IWzt6iXM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1652099109316513.320329398334; Mon, 9 May 2022 05:25:09 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.324459.546534 (Exim 4.92) (envelope-from ) id 1no2RO-0006WV-84; Mon, 09 May 2022 12:24:42 +0000 Received: by outflank-mailman (output) from mailman id 324459.546534; Mon, 09 May 2022 12:24:42 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1no2RO-0006W4-2y; Mon, 09 May 2022 12:24:42 +0000 Received: by outflank-mailman (input) for mailman id 324459; Mon, 09 May 2022 12:24:40 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1no2RM-0005qB-D3 for xen-devel@lists.xenproject.org; Mon, 09 May 2022 12:24:40 +0000 Received: from esa1.hc3370-68.iphmx.com (esa1.hc3370-68.iphmx.com [216.71.145.142]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id fe502daa-cf92-11ec-a406-831a346695d4; Mon, 09 May 2022 14:24:38 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: fe502daa-cf92-11ec-a406-831a346695d4 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1652099078; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=pISlbMmZOOlDowYEzoDw1/7aI4xrXsrkKlI9u5f/53s=; b=OdkN+dAOvi9PJp1dC9SqMjslLHlAV+ncd0i4UxLZpdEntAtWj3jnFcQ1 SlfaYh8Afg5W5YNSG39I5lEJSXhNBfazndG27RfdmfcGD1JOurl06h4R0 i2+e7d9xUVWAad6WxMA/3yUIhPuSw1hLU+yWqN3IBWVmyDaCeNNbl6dM0 Y=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 5.1 X-MesageID: 71286219 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:bqFWmahaV9g5r/LmrDery3ZJX161qRAKZh0ujC45NGQN5FlHY01je htvCm3VMvbYa2r2ctAlYd7i8EsH7cDTnNNqTQQ9qXo3RH4b9cadCdqndUqhZCn6wu8v7a5EA 2fyTvGacajYm1eF/k/F3oDJ9CU6jefSLlbFILas1hpZHGeIcw98z0M68wIFqtQw24LhXlvc4 YqaT/D3YzdJ5RYlagr41IrbwP9flKyaVOQw5wFWiVhj5TcyplFNZH4tDfjZw0jQG+G4KtWSV efbpIxVy0uCl/sb5nFJpZ6gGqECaua60QFjERO6UYD66vRJjnRaPqrWqJPwwKqY4tmEt4kZ9 TlDiXC/YQMqb7DHov9MbyZZFgJ0GZ1K2J3JDWfq5KR/z2WeG5ft6/BnDUVwNowE4OdnR2pJ8 JT0KhhUMErF3bjvhuvmFK883azPL+GyVG8bklhmwSvUErANRpfbTr+RzdRZwC0xloZFGvO2i 88xNmM1PEqaOkwn1lE/A6svmdz1vXjGSxJEuX64hvNpwHnM01kkuFTqGIWMIYHbLSlPpW6au 2bH8mLREhwcctuFxlKtzHWogePemDLhb6gbHra46/1CjUWawyoYDxh+fVG2u+Wjg0iyHddWM VUJ+zEGpLI3skesS7HVQBmQsHOC+BkGVLJ4A+A8rQ2A1KfQywKYHXQfCC5MbsQ8s807TiBs0 UWG9/vLLzFytLyeSVqG66yZ6zi1PEA9NnQebCUJSQ8E5djLo4wpiB/LCNF5H8aIYsbdQG+qh WrQ9W5n2utV3ZVjO7iHEU7vhzH9u5PzVV8J2QTSfWiB3g9ZRoCJeNn9gbTE1spoIIGcR1iHm XELncmC8ewDZa2weDyxrPYlR+/wuavcWNHIqRs2RsR6qWzxk5K2VdoIiAySMnuFJSrtldXBR EbI8T1c65ZIVJdBRf8mOtnhYyjGIEWJKDgEahw2RocVCnSSXFXelM2LWaJ39zq0+HXAaYllZ f+mnT+EVB7285hPwjusXPs62rQ23C04zm67bcmlkk7/jOHPPCPKE+ht3L6yggcRtvjsneko2 4wHa5viJ+t3DoUSnRU7AaZMdAtXfBDX9Lj9qtBNd/7rH+aVMDpJNhMl+pt4I9YNt/0Mzo/gp yjhMmcFmQGXrSCWdm23hoVLNeqHsWBX9iprY0TB/D+AhhAeXGpYxPpBJ8ZvIel7pYSOD5dcF pE4RilJOdwXIhyvxtjXRcOVQFBKHPhzuT+zAg== IronPort-HdrOrdr: A9a23:b7QBUattKOmXFOeqZ4TYEYrI7skDTNV00zEX/kB9WHVpmszxra GTdZMgpGfJYVcqKQgdcL+7Scq9qB/nmqKdpLNhWYtKPzOW3ldATrsSj7cKqgeIc0aVm4JgPO VbAs9D4bXLfCNHZK3BgDVQfexP/DD+ytHMudvj X-IronPort-AV: E=Sophos;i="5.91,211,1647316800"; d="scan'208";a="71286219" From: Andrew Cooper To: Xen-devel CC: Andrew Cooper , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu , Stefano Stabellini , Julien Grall , Volodymyr Babchuk , Bertrand Marquis Subject: [PATCH 3/3] common/spinlock: Drop inline from _spin_lock_cb() Date: Mon, 9 May 2022 13:24:09 +0100 Message-ID: <20220509122409.14184-4-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20220509122409.14184-1-andrew.cooper3@citrix.com> References: <20220509122409.14184-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1652099110773100001 This is undefined behaviour, because there is no _spin_lock_cb() in a separ= ate translation unit (C11 6.7.4.11). Moreover, MISRA prohibits this construct because, in the case where it is w= ell defined, the compiler is free to use either implementation and nothing prevents the two from being different. This function has external users, so drop the inline. Spotted by Eclair MISRA scanner. Signed-off-by: Andrew Cooper Reviewed-by: Bertrand Marquis --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 CC: Wei Liu CC: Stefano Stabellini CC: Julien Grall CC: Volodymyr Babchuk CC: Bertrand Marquis --- xen/common/spinlock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/common/spinlock.c b/xen/common/spinlock.c index 62c83aaa6a73..8cb3b316c5b1 100644 --- a/xen/common/spinlock.c +++ b/xen/common/spinlock.c @@ -159,7 +159,7 @@ static always_inline u16 observe_head(spinlock_tickets_= t *t) return read_atomic(&t->head); } =20 -void inline _spin_lock_cb(spinlock_t *lock, void (*cb)(void *), void *data) +void _spin_lock_cb(spinlock_t *lock, void (*cb)(void *), void *data) { spinlock_tickets_t tickets =3D SPINLOCK_TICKET_INC; LOCK_PROFILE_VAR; --=20 2.11.0