From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id CAD9A43101; Fri, 25 Aug 2023 16:13:16 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4B8BD40695; Fri, 25 Aug 2023 16:13:16 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 9E3C5400D5 for ; Fri, 25 Aug 2023 16:13:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1692972793; x=1724508793; h=date:from:to:cc:subject:message-id:references: content-transfer-encoding:in-reply-to:mime-version; bh=SDdG3h5uMhXdsBpkwD5Eey0KvxizOEYLfPw0toRxgZo=; b=ZhaYUk8iXy1lUKg5NH2d5t9sX/i6cNcPqxaBexzjvQ5pGnY7vOTr+WP1 P4vTtFhz/91DK6JQfUpmsXxuR1Otz3juY0dtBPyvLt/DWetr+9BxBtsjW 1Xkv/6/ZlYp/5vrpFkFMVQZVbF0ejPf8LXlOMFZ1VlHEYiWEgRex/0484 HBmvACat7TwI2itWOBOknCA2NGy8S2uSQgyvuSE9mPgMDWmjXd3ow239e srvlnWkycDIlGRBetgNZw74MwZ23PBucVUE5i0+jOvYoZ9TRMJDu4pdpX AtUDuIBXGxXIgLzZkpb7sPy+rlN9tEbuRoR6FJRSuyX12zgeauVyJ3NFa g==; X-IronPort-AV: E=McAfee;i="6600,9927,10813"; a="354249976" X-IronPort-AV: E=Sophos;i="6.02,195,1688454000"; d="scan'208";a="354249976" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2023 07:13:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10813"; a="766963413" X-IronPort-AV: E=Sophos;i="6.02,195,1688454000"; d="scan'208";a="766963413" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga008.jf.intel.com with ESMTP; 25 Aug 2023 07:13:10 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) 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.27; Fri, 25 Aug 2023 07:13:09 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) 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.27; Fri, 25 Aug 2023 07:13:09 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) 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.27 via Frontend Transport; Fri, 25 Aug 2023 07:13:09 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.169) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.27; Fri, 25 Aug 2023 07:13:09 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T975bAYL8c7qS81qH+AY6a+3JY8CllHevRQHv89n9gPOIm3LBk4Epx5N7wibGqp+0oNbz6w7wbBggxBQOWBOstq/5PJQacVM++P0XTEf7P1lZDeNBBZ31pBbRedjrpAoFIvt7M6kp4EevUGsRSU5CIdHVxXZmNBQPoZm+LBs4wo7Rk3K8j9g8Kho+1GlaH/KUue9Pb+tL09C2enpvb/el4+WgNXG1+dCur61WHI9mNihnrz/Z/9MHEecHBAgYJ8EpcTRiKamp8tNbgtb8/mB7Mdgna8P+4LCozEg9oyuZ6l4aMBEI1K2hQAc1hkf0+YeWVfLAFwTZ7GFcNFXGzEEgw== 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=kKW7cOsUTFwsN57FXoAKe0ZtnbG2CXzL0vB1Ps09MF8=; b=hVIZL4Jtiig11O7eon5bto+6pfeeBljcKzRFHS5xXpuueZxllr4yUfwoacHtSAiiTGujCppyJ/nkfKFaYYp5PftQY95Z9qxjA9srSBPrHPlTj9kVLz2WGVgJFpn1C7OW3KechxeI+9RA3H4Gnpf/FYG/LVfkOgQBcywTygo1SQ3fL1etDw25z/SSExZJRdrLUxUyYaR0wxDbHwgQcjO3ufubrBTFPbNnoQGn6k0khELV11DTHY5TQeDq+bzTFikVGrPqkFkMeE1K2qfib/x31w6aSiMKk9nKuyOAd9bD0Q1g1RApf7IcdaB66/DYBykqoD8X778pz5hQkAqllqQ9KA== 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 DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by DS0PR11MB6494.namprd11.prod.outlook.com (2603:10b6:8:c2::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.27; Fri, 25 Aug 2023 14:13:07 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::43d1:af60:464:347]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::43d1:af60:464:347%5]) with mapi id 15.20.6699.027; Fri, 25 Aug 2023 14:13:07 +0000 Date: Fri, 25 Aug 2023 15:12:59 +0100 From: Bruce Richardson To: Tyler Retzlaff CC: , Konstantin Ananyev , Ciara Power , , , , Subject: Re: [PATCH v11 05/16] eal: use umonitor umwait and tpause intrinsics Message-ID: References: <1680558751-17931-1-git-send-email-roretzla@linux.microsoft.com> <1691781658-32520-1-git-send-email-roretzla@linux.microsoft.com> <1691781658-32520-6-git-send-email-roretzla@linux.microsoft.com> Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1691781658-32520-6-git-send-email-roretzla@linux.microsoft.com> X-ClientProxiedBy: DUZPR01CA0049.eurprd01.prod.exchangelabs.com (2603:10a6:10:469::9) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|DS0PR11MB6494:EE_ X-MS-Office365-Filtering-Correlation-Id: ef7eebfd-ac6d-40d1-ba46-08dba5756767 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: G2EMmOhuIQ08aTNYY86YGEEY9Gs/bSE3zhVrW4W+/BnN2bQi/pqAVk/OerZekl7AGP90KkTCVacgErD5Td0PpRbqZmcojMtF7dxn9CWZcT6szgPFjI+Sgb+/IoHqXlTzUTiA5IHXxgWCEFC+RbdYtHSPUql7+6SOna07yVvxDldYD9WOlHAMFenytujMgEPRLHah3Uti8yOTRTUDyXWLMW4gpXC+KzX1dtRxLewuRcalDXXXr08EZ0P4OLVFkInMtzR8cFGWlIM/4/nby1V61lOvuWXxOr5lA8/fNRILD6bKnGKGSos8XkSzqujUci4OCVUaYUpJySuY/nl9AS351O+y6q9rSWZuC4AM+usBspQStFtBH2FS+H5H/EHzDoZdhvP8nmiOgITx8Dn3J6uOnDU6/kkviVa7uYJ+8StxWJDfa3SFBX5HIp0GOrhUfUExqRJPn/tyvwSeNY5KLoZO8SwesreXQfzyTaei5RjmjHGQ7l2RlgoUG7/JqWSdPnVb/4Gkeeda58BOvVccahc5vSYX4GvNau8VfNEUVP0K5u682uGScH44Ac/Gdh/Z8TtYHHqhxwAdxNhH7qtjyZey/6Oz5UJESn1RYFqj0vMugAHoPaVdxzvu4rQQkoE76vJE X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(346002)(136003)(376002)(396003)(39860400002)(366004)(451199024)(186009)(1800799009)(6506007)(54906003)(66946007)(66476007)(316002)(66556008)(82960400001)(6916009)(478600001)(44832011)(26005)(38100700002)(6666004)(41300700001)(86362001)(6486002)(2906002)(6512007)(8676002)(4326008)(8936002)(107886003)(5660300002)(66574015)(23180200003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?iso-8859-1?Q?he0GN8o/JGKgIMeLKnheOY2IdSmtCuU7LnD9/NBk8YLDfkOZHZecuOnb7u?= =?iso-8859-1?Q?e8DCHg4v1/NNS9O4PM+xfoChj+eDPNS8nZSbkCRZxJOm+rQBZbfznvUrXW?= =?iso-8859-1?Q?FL6XiM6dOC8b/xIJqPx1V6FGUt/a5H2/q6Nt7/Z0zqquVryBiK5mRpoz0Z?= =?iso-8859-1?Q?nes5mgUF+f71sqmQoJTywpE6TfivvilG+GfbRcUKCh21CvmyK2raHYwd/T?= =?iso-8859-1?Q?zEeXET/v89RZmMuDvjN2zuXZxAARAGU1yeRXmZbX4t1FEuy88pj079RlGy?= =?iso-8859-1?Q?U/ZyedO+51AD++d46mP8XLP0VbHCG5k4TNSj4r1R4SrIC6fmvISldR19eH?= =?iso-8859-1?Q?eAvI/mpoWQ5WTqMSI/XN4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K6N1IG?= =?iso-8859-1?Q?CKz8hIPK5K/mq5fVss/0wmvXBPSOEg0XEclJw2XBporFdC96RVKwUcbAh4?= =?iso-8859-1?Q?w/rsVEH2Lltv9EF9t7zLK8JiTWME2vm/fFTcP1MO2MUASi7saWYoNrHxwS?= =?iso-8859-1?Q?WRxeUNaAl/wH6AOo4xTdlIA/qLlA3bde+hyXmsZUkUosMamUo1s3HbGELl?= =?iso-8859-1?Q?198nXnymrohIcSkOCo2WZFZ3UpTPX2mVjI2BO0ZaVNQK1BaAUPcUozqgyd?= =?iso-8859-1?Q?ZrntnNyElxojvHCD+rUKr9ymiA4i1VQ4Dild3VrO8rd07l8w4MfuNsKNml?= =?iso-8859-1?Q?fvAWAzKwl4gbluAdILoYMb6RbEV5ROQt6PDUzlpPRNbxe43BHlo+eaez1t?= =?iso-8859-1?Q?yo92H+cxooiuReMsnnJkiQV4GJ0tyXfT+ItmrZsPPzAAo5tehOucxPYw?= =?iso-8859-1?Q?=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: ef7eebfd-ac6d-40d1-ba46-08dba5756767 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Aug 2023 14:13:07.0849 (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: wHBMKZeRvDbgXaGtSKOy7CcZ0XBGMurt3Mx/4LlwygRoJBfK5qixqu/dZvkSGZgMtH6WFnErIVTYbtN07Vi6+vP5ZrLeXaPlBubWBSIkpQA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR11MB6494 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Fri, Aug 11, 2023 at 12:20:47PM -0700, Tyler Retzlaff wrote: > Inline assembly is not supported for MSVC x64 instead use _umonitor, > _umwait and _tpause intrinsics. > > Signed-off-by: Tyler Retzlaff > Acked-by: Morten Brørup > Acked-by: Konstantin Ananyev > --- > lib/eal/x86/rte_power_intrinsics.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/lib/eal/x86/rte_power_intrinsics.c b/lib/eal/x86/rte_power_intrinsics.c > index f749da9..4066d13 100644 > --- a/lib/eal/x86/rte_power_intrinsics.c > +++ b/lib/eal/x86/rte_power_intrinsics.c > @@ -109,9 +109,13 @@ > */ > > /* set address for UMONITOR */ > +#if defined(RTE_TOOLCHAIN_MSVC) || defined(__WAITPKG__) > + _umonitor(pmc->addr); > +#else This change is unfortunately giving build errors on system with WAITPKG, since the intrinsics do not take volatile parameters, unlike the inline ASM which works fine with both volatile and non-volatile variables. This is the error I see: ../lib/eal/x86/rte_power_intrinsics.c: In function 'rte_power_monitor': ../lib/eal/x86/rte_power_intrinsics.c:113:22: error: passing argument 1 of '_umonitor' discards 'volatile' qualifier from pointer target type [-Werror=discarded-qualifiers] 113 | _umonitor(pmc->addr); | ~~~^~~~~~ The easy fix for now seems to be just dropping the "|| defined(__WAITPKG__)" part of the #ifdef, and leave the intrinsic for MSVC only. Any objections? /Bruce