From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web10.2012.1685951109076056228 for ; Mon, 05 Jun 2023 00:45:09 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=BiW9jMe7; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: yong.li@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1685951109; x=1717487109; h=message-id:date:subject:from:to:cc:references: in-reply-to:content-transfer-encoding:mime-version; bh=Mv4enuz4Epomk9/fUid8XLtE0CzEZoO5Hs4f5tWhT6M=; b=BiW9jMe7HqWH6hkq6c+S2hc4eZtlAme4U4Dv1fD+bZDRZGmcDuCP3YjM fLKozrn7AE0I6YxWmpuwAGIz5SdyWzI2H05hNFD+R3NIUyE/fb6vfSyiA agGETo6wDlhF+gHZg4B7zx8LA0hPG0eqG6l8mv642uwYdwmOPysrFmCS6 dDQjVL0VeGIFNwmXwibc9Q8BRZ5V/u/Z7jsNQRjiTnqODkO5ZGHVc5a2f 6CqP1A7W3mJRgGz9DKDQkgHie0/pUpoE+AIj8EqVhf8v5gPqzDwf2JsAm GGXhBvWdN0mBOA/opQVD0AOoRh38N4191Tf8/Ko5lVvuUN9fHyxYowj72 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10731"; a="422131464" X-IronPort-AV: E=Sophos;i="6.00,217,1681196400"; d="scan'208";a="422131464" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2023 00:45:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10731"; a="778442947" X-IronPort-AV: E=Sophos;i="6.00,217,1681196400"; d="scan'208";a="778442947" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmsmga004.fm.intel.com with ESMTP; 05 Jun 2023 00:45:07 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Mon, 5 Jun 2023 00:45:07 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Mon, 5 Jun 2023 00:45:06 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23 via Frontend Transport; Mon, 5 Jun 2023 00:45:06 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.171) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.23; Mon, 5 Jun 2023 00:45:06 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=esLsbRPUBiCzBBYHWUJF5zi/2pfZFAwU8wRb6bd711UKAIEDqQF31YhHfwLZ0EBfras3bD3Wo8IaK+K7ZImzxlbT/shNyQkvr2HE1pnEjYwFl3kgCEAh8O1KQusKWx2GilZdJkYrKz37XELpjeump+YpwdgR6N1emQNhCdH+MviYIUqsLeUbkMacpezZZB3lV71rhh8i8AuDDdZd6nk8nkQLdIU0+9fHm4I8ZLuV++D/x3jVUg/rEO1RBI/h2QgimsQUf7GYKj7mALt4/CGXZmQeF4N5pR9UUL2wfmdS/rwYVG61hScme06e5frvRx4iqj3XDv9r5Q6qkP09x3Kd8w== 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=KMBOMS8mc+n+S3tIzMcTMoz0nDemKaUcCMtX4Zq3JFk=; b=H4gva8FyBrF0N2s3dtU/LXBlXyQZeRyEKA7EPuZyIUTFcQVJIZqrbJtgrHG8Ra5nLuDmEltvcr/DYHnaDuP1Qp01QM18nTtumjpeDAbFjVtlCrWeFbzZEvnd+huC9aHBC4Jwx5HOdFPnqnk87UmNjPt0VYzSydAkfP6cDBk6L2tG6tdlA1+52/ESuU9yHXTw4cg/khhrfrXBYCinV5dsE2tyklohLSswWK6oL8TR8fI7QZY78KzThQZABYNY1UPc26/nzby4ImlyBQklFbRIMzniLzMhSbMvRhUN8sSiOs9RW26w2rneLekyoitlUUHfq9FnzqdL/hrowad6cAyvqg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from BY5PR11MB3861.namprd11.prod.outlook.com (2603:10b6:a03:18d::13) by PH0PR11MB4901.namprd11.prod.outlook.com (2603:10b6:510:3a::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.33; Mon, 5 Jun 2023 07:45:03 +0000 Received: from BY5PR11MB3861.namprd11.prod.outlook.com ([fe80::74e4:2d5c:be5d:14b2]) by BY5PR11MB3861.namprd11.prod.outlook.com ([fe80::74e4:2d5c:be5d:14b2%4]) with mapi id 15.20.6455.030; Mon, 5 Jun 2023 07:45:03 +0000 Message-ID: Date: Mon, 5 Jun 2023 15:44:54 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: [edk2-devel] [PATCH v2 1/1] MdePkg/BaseLib: Add SpeculationBarrier implementation for RiscV64 From: "Li, Yong" To: , , , CC: Andrei Warkentin , Evan Chai , Tuan Phan References: <5105ea68520e82932c4253e087438db53546ea6d.1685616822.git.yong.li@intel.com> In-Reply-To: X-ClientProxiedBy: SGAP274CA0015.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::27) To BY5PR11MB3861.namprd11.prod.outlook.com (2603:10b6:a03:18d::13) Return-Path: yong.li@intel.com MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR11MB3861:EE_|PH0PR11MB4901:EE_ X-MS-Office365-Filtering-Correlation-Id: e73aa5d7-2c77-4d63-9748-08db6598c5e0 X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OLvUir4mwxOztDuqkZfnO1j/7uIVyhrfawVzuzG5TYSj17od1fDICah7TNirLeyc5WSVCLg3gbBtv77q2Yr3jTdG9BOD7lePMTcNxSdoiLWJlKql5mDMj4JsgIpknyHbXsG4d6D4Y4W0ocGEiSaHpoRKRtLql0/jQOP6fpQ6oNVvMzj7P4GbGxMm/04cQGfKRhGaqCvMl+Bw/Cpo796k0h9s76jEQHUfa2WFQhTpiSBCuKWC4GYlrduCoAHTzVEfiTdd9u5Jw+i57LZxhcEWTyI4NOMSzpMC7kaniTc2tJ7JFPotIUMTc01g49EjmNnz6I1irgg1b3pFs0vK4gvD4r/4I4THDcPIDhnzTGccgCTDRev76d+dr8ITM3cT5Pxq+PtuxdOAknETrFRd3rz84lm/OdNH9evmLIDRgN7wcptyTiYCGD33PMSuy3hlE+c4VNxDW+ruVLXjn+8ZtDWrWZ63+P0g3a+C/Bon9XCnu9q14jiu0mj4zO/VUrhBzCY2Y497rXVJrCpfgxsTO3t8KVEL39fYZxoXRrWcvImeu2ZKrA4srv3E6apbtIdYW1CtKhcgybqCUEH8XRiPI3kPVeyQ/SiDTEjsHP/X8bJCYxrqz8Hfna+EnzeqwrLUjAR+rxLWHmfAmWBd0vFwt7Hsasazbe0fPdTQFKQ6xCIEuOzJsekcAfdfPLaWVZfAHWLs X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BY5PR11MB3861.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(346002)(366004)(396003)(376002)(39860400002)(136003)(451199021)(54906003)(19627235002)(478600001)(82960400001)(8936002)(8676002)(4326008)(66946007)(66556008)(66476007)(316002)(38100700002)(41300700001)(2616005)(186003)(83380400001)(966005)(6666004)(6486002)(53546011)(6512007)(26005)(6506007)(31696002)(86362001)(5660300002)(2906002)(36756003)(66899021)(31686004)(45980500001)(43740500002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZVgwVmIremMwU2xZbHNLNk5JYkJ0cHlTZ3dtZkhHZWQ2NFU2Sy8vNmsxUTRW?= =?utf-8?B?aThXSmN6U2xwcUNDQzdCN0RDR0FkbWFIdm11cTIySVZNQVRyeW9oZE4zRWNB?= =?utf-8?B?a3gxQzNFbnY0ZURNeUUvM2pHQk5xOEdQRGZuNzJuenlFazNYSFVOaDRkUXUv?= =?utf-8?B?RkFveFozeUpnVGx1bHQrbnM5Vy9sR3F1WkpwbVE0NlBTRktEZTg2K3ZVYklW?= =?utf-8?B?ZjREWWFkWjdyRWt4ZmhuTmRtQityNTBIMHYvK1VtR01nUmlwc2ZkVEUzSW5W?= =?utf-8?B?c2ZqeTByZWQza0xDaFM3NnlYUGdCYW1xcTFBQlFoQnMyWmZqR3FaVndxYURJ?= =?ut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CSLj07G?= X-MS-Exchange-CrossTenant-Network-Message-Id: e73aa5d7-2c77-4d63-9748-08db6598c5e0 X-MS-Exchange-CrossTenant-AuthSource: BY5PR11MB3861.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jun 2023 07:45:03.5428 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: eiSlqCGzY32OiG5IBojgpkRu0WcMqSKsJG0eo6wk+VZnXEN7sa2KWLjABbVZhoujZjT85+/gOUeIweY60Zknaw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4901 X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Hi Michael, I updated the commit messages and the EDK II CI passes, The PR link is as below. https://github.com/tianocore/edk2/pull/4480 Please help merge, thanks for the helping On 2023/6/3 14:13, Li, Yong wrote: > Hi Michael > > This is the change to MdePkg/Library/BaseLib/RiscV64. > Since it is for RiscV specific, I somehow got the review from Sunil. > Not sure need additional reviewer and or anything else from my side ? > It is my first patch to edk2, please help proceed and look for the feedback. Thanks > > > On 2023/6/3 1:09, Sunil V L wrote: >> On Thu, Jun 01, 2023 at 06:56:05PM +0800, Yong Li wrote: >>> Implement the SpeculationBarrier with implementations consisting of >>> fence instruction which provides finer-grain memory orderings. >>> Perform Data Barrier in RiscV: fence rw,rw >>> Perform Instruction Barrier in RiscV: fence.i; fence r,r >>> More detail is in Appendix A: RVWMO Explanatory Material in >>> https://github.com/riscv/riscv-isa-manual >>> >>> This API is first introduced in the below commits for IA32 and x64 >>> https://github.com/tianocore/edk2/commit/d9f1cac51bd354507e880e614d11a1dc160d38a3 >>> https://github.com/tianocore/edk2/commit/e83d841fdc2878959185c4c6cc38a7a1e88377a4 >>> and below the commit for ARM and AArch64 implementation >>> https://github.com/tianocore/edk2/commit/c0959b4426b2da45cdb8146a5116bb4fd9b86534 >>> >>> This commit is to add the RiscV64 implementation which will be used by >>> variable service under Variable/RuntimeDxe >>> >>> Cc: Andrei Warkentin >>> Cc: Evan Chai >>> Cc: Sunil V L >>> Cc: Tuan Phan >>> Signed-off-by: Yong Li >>> --- >> >> Reviewed-by: Sunil V L >> >> Thanks, >> Sunil >> >> >> >> >>