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 68DB74293D; Fri, 14 Apr 2023 09:05:54 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 42D37410F6; Fri, 14 Apr 2023 09:05:54 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 9690F400D5 for ; Fri, 14 Apr 2023 09:05:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681455952; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fDea8FBo0f7KAPL2cBeo8wqBQ6U9fj85VibfYjoaYsc=; b=QAnug8cFENzGHly4jrt45nhhZYFZY18V1OXk8OL7J5Uw4JIUaa38mwaN/B9W0q0lDWd7OD QWqJussR94QzyFfpleU9UJrbeomXJqxk/XLL0EDodStEbwd0UK12R2DHq+AMdmUVbLA+SZ IHjkW4aSsjLQiOZztqtzz3s4rd83bLQ= Received: from mail-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-108-q4TDFA6xMRelV2W5Mw0oSA-1; Fri, 14 Apr 2023 03:05:48 -0400 X-MC-Unique: q4TDFA6xMRelV2W5Mw0oSA-1 Received: by mail-pj1-f72.google.com with SMTP id z18-20020a17090acb1200b00246eef2845aso3765568pjt.3 for ; Fri, 14 Apr 2023 00:05:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681455947; x=1684047947; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fDea8FBo0f7KAPL2cBeo8wqBQ6U9fj85VibfYjoaYsc=; b=GIbvqQfMhjDE/6v5al2jXCpjypLl8j5oYBAJzuUrdomSUAFvi2k7GqN+rdopUJQe+L t4Syr8NestbCQBf/pnvI+YMAW37DJzT13N/H/Ak96dSC4X/lSFqpA8VvlM/9s/BFWGI1 tJucOg2IuZHPsd3kuTdwLdGMPMb7eO4QKuldVPS2LEwfSprKXS3hQn1W1zhxNTR2GCs5 E8XAXl0ll40Qilmc9r9JXiR5yBs+mqBi6iPLQ4X+6+cgAShcNmN2exP0OOv1miBOhuTo MkoV0usJx5qXyhy1O81il/C1eMKY+ZytWofy+N9/lMRuO33v6bcK10kjWP4CBEFzdbIw nfog== X-Gm-Message-State: AAQBX9cagrSPgBghTp5kt23OKhcXvNui+D1DKnWiHEBX80lReGD9hYnT 5r4UrZmlhe/a9EWKmxmQp3HMCYgtnqr7fXutl5lZHJPGe8IWTXxb/dCob3RiV4mcj3XuKCOG0NL HpLMCdgzZkBnvJQttO/c= X-Received: by 2002:a17:903:1112:b0:19a:7f9c:66e3 with SMTP id n18-20020a170903111200b0019a7f9c66e3mr634705plh.5.1681455946806; Fri, 14 Apr 2023 00:05:46 -0700 (PDT) X-Google-Smtp-Source: AKy350Z0QCF8djGwAxqa+8E7VVOsMaaAwC5wATqZubS0sXRJmFTiQ0zsD2gOZ9jTg2+xD35RDhsMoH9GgS+aUe1RcjY= X-Received: by 2002:a17:903:1112:b0:19a:7f9c:66e3 with SMTP id n18-20020a170903111200b0019a7f9c66e3mr634699plh.5.1681455946530; Fri, 14 Apr 2023 00:05:46 -0700 (PDT) MIME-Version: 1.0 References: <20230413115334.43172-1-sivaprasad.tummala@amd.com> In-Reply-To: From: David Marchand Date: Fri, 14 Apr 2023 09:05:35 +0200 Message-ID: Subject: Re: [PATCH v2 1/3] eal: add x86 cpuid support for monitorx To: "Tummala, Sivaprasad" Cc: "david.hunt@intel.com" , "dev@dpdk.org" , Thomas Monjalon , "Burakov, Anatoly" X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Thu, Apr 13, 2023 at 7:51=E2=80=AFPM Tummala, Sivaprasad wrote: > > [AMD Official Use Only - General] > > Hi David, > > > -----Original Message----- > > From: David Marchand > > Sent: Thursday, April 13, 2023 5:30 PM > > To: Tummala, Sivaprasad > > Cc: david.hunt@intel.com; dev@dpdk.org; Thomas Monjalon > > ; Burakov, Anatoly > > Subject: Re: [PATCH v2 1/3] eal: add x86 cpuid support for monitorx > > > > Caution: This message originated from an External Source. Use proper ca= ution > > when opening attachments, clicking links, or responding. > > > > > > On Thu, Apr 13, 2023 at 1:54=E2=80=AFPM Sivaprasad Tummala > > wrote: > > > > > > Add a new CPUID flag to indicate support for monitorx instruction on > > > AMD Epyc processors. > > > > > > Signed-off-by: Sivaprasad Tummala > > > --- > > > lib/eal/include/generic/rte_cpuflags.h | 2 ++ > > > lib/eal/x86/include/rte_cpuflags.h | 1 + > > > lib/eal/x86/rte_cpuflags.c | 3 +++ > > > 3 files changed, 6 insertions(+) > > > > > > diff --git a/lib/eal/include/generic/rte_cpuflags.h > > > b/lib/eal/include/generic/rte_cpuflags.h > > > index d35551e931..db653a8dd7 100644 > > > --- a/lib/eal/include/generic/rte_cpuflags.h > > > +++ b/lib/eal/include/generic/rte_cpuflags.h > > > @@ -26,6 +26,8 @@ struct rte_cpu_intrinsics { > > > /**< indicates support for rte_power_pause function */ > > > uint32_t power_monitor_multi : 1; > > > /**< indicates support for rte_power_monitor_multi function *= / > > > + uint32_t amd_power_monitorx : 1; > > > + /**< indicates amd support for rte_power_monitor function */ > > > > I did not look at the patch detail, I just stopped at this part. > > What makes the AMD monitorx stuff special that it needs to be exposed i= n the > > generic API? > > Monitorx is different ISA /opcode (0F 01 FA) as compared to UMonitor (0F = 01 C8). This need to be distinguished > on specific x86 platforms. Hence in the current power intrinsics, for x86= we require a new flag to > distinguish MonitorX and UMonitor and invoke the appropriate x86 ISA in t= he datapath. Requiring a new x86 cpuflag to identify this ISA presence is ok. But here, I am talking about the generic power instrinsic API. Let me phrase my comment differently... As described in the API: uint32_t power_monitor : 1; /**< indicates support for rte_power_monitor function */ Does AMD thing behave completely different from the x86? Looking at patch 3, I understand this is not the case. So we don't need a "amd" flag in the generic flags. The indirection for calling the right ISA should be hidden in rte_power_* helpers implemented for x86. --=20 David Marchand