Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp3159237pxb; Fri, 4 Feb 2022 02:37:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJzLnoq7+SQY8AyAM6w1P/bmdgY+RuDeH+L1YGvVa0cR1urEhUqq5dvmn0V+F7GWCxyLEidv X-Received: by 2002:a05:6a00:2cf:: with SMTP id b15mr2381274pft.0.1643971030613; Fri, 04 Feb 2022 02:37:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643971030; cv=none; d=google.com; s=arc-20160816; b=ZGK3TmTmcf7RwWjVYPpe66cN39UNBXaQQ0NyrsCdHiyeMly7d/wY/QujQPbzK3762b RPC/u53iTRR0RHcbBDapu18E3RDzU6T7WUv6cHFMxfL2jqNuoEquNHdGht225jhYHla1 YqJ606HkcuNyH4uhHoE/DCLOufs0kMH6sEEf7COJE4at2SIypGjy7P5orDl4AIHIIAjq CvoYO5fuRSYI76tsdohVdpB68RUj8IzCrjkAG7NbL0b/HT8lKfsrCHTMONmreLCicYAa 8VnaU5OCgamV2P4jgxuUNS47Aqe6rAsqxab8v3HLRSI2Etmp90sOobOzlWYPvHhGGQJA TSyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :from:references:to:content-language:user-agent:mime-version:date :message-id:dkim-signature; bh=BkgyNBzgKkcPt+JlaNX4HpV+um1Dkeo4eGZDh97Gme0=; b=vuIbRuvF3pSrzdlolTZKnuUMV41XIdi+suCIPxJailo3JkAQho3xJx/PQszknlqfh0 BdAGLomZmfCCmh3ETA2/8qv9jjKWzrhgPU0nHCZNZvJ4Yfycy6O0XD32RkWJdvFIh80v sBIZ7tLjXUbA4VEU4n0JVK+M4vbUdK35div59rMGRCODIGBjIS9jM/NvF76W+b4J/ri5 ghOrDrKg4IrJayswnbSf1t6FkeJSS9Z521WmeqAG2xFErG7yubv93tu7bEkbAdEejrXo LDKqNl2PUAl/ibRYPccaTrerSjKs9dWQ8Vycwf8ZWY1ZnDpSkWeWgrB9uJWjHc/JEVAw E2Qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=LUdiFAl1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l65si1466069pge.235.2022.02.04.02.36.59; Fri, 04 Feb 2022 02:37:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=LUdiFAl1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354030AbiBCUZt (ORCPT + 99 others); Thu, 3 Feb 2022 15:25:49 -0500 Received: from mga05.intel.com ([192.55.52.43]:27029 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238135AbiBCUZr (ORCPT ); Thu, 3 Feb 2022 15:25:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643919947; x=1675455947; h=message-id:date:mime-version:to:references:from:subject: in-reply-to:content-transfer-encoding; bh=maUXWdLOoB+ER0fN6/9ymU9n/nzG5qy41XOrszB4bGA=; b=LUdiFAl1ix00sNqlsMTpeHvSPAe5n+X77YTyJ0XBV9n2+u74yYpQ+qzY CZt1Mpy4Y7LFDQ0TWGB1+no8XQjrUWAVK8UV4OqfOPhnrD0BikV/mcG3G 8in8wSX3glmoAnpQUHwPReRJx67QeOpcCy0xrxRS5GUInYMSztIMoG3t5 etOUJayCh8Zv7mSOjb4Wpwac9KQbsEEI8i9CWg14z6aJ1XNMRG+AGaGiY ZTdulRSuz4WFNEjTYXz4To0h4Dw1gk7LO2NTYtxkzUH5gPg73vMqSSNdj QmffYDYaGPlRHTbgjWG1xcRjnEu3MkFb7nR5PQBuE+3puseU515+NihkB g==; X-IronPort-AV: E=McAfee;i="6200,9189,10247"; a="334615061" X-IronPort-AV: E=Sophos;i="5.88,340,1635231600"; d="scan'208";a="334615061" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Feb 2022 12:25:47 -0800 X-IronPort-AV: E=Sophos;i="5.88,340,1635231600"; d="scan'208";a="535331874" Received: from oshoron-mobl.amr.corp.intel.com (HELO [10.209.125.125]) ([10.209.125.125]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Feb 2022 12:25:46 -0800 Message-ID: Date: Thu, 3 Feb 2022 12:25:43 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Content-Language: en-US To: Jim Mattson , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Paolo Bonzini , Tony Luck , Peter Zijlstra , "Chang S. Bae" , Juergen Gross , Andrew Cooper , Babu Moger , Jing Liu , Sean Christopherson , linux-kernel@vger.kernel.org References: <20220203194308.2469117-1-jmattson@google.com> <20220203194308.2469117-2-jmattson@google.com> From: Dave Hansen Subject: Re: [PATCH 2/2] x86/cpufeatures: Add macros for Intel's new fast rep string features In-Reply-To: <20220203194308.2469117-2-jmattson@google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/3/22 11:43, Jim Mattson wrote: > Even if no one else cares, these features should be exposed to kvm > guests, and the code for the KVM_GET_SUPPORTED_CPUID ioctl is more > readable if the bits have corresponding X86_FEATURE macros. I went digging around KVM_GET_SUPPORTED_CPUID and didn't see any obvious unreadable things resulting from not having these defines. Maybe I'm looking in the wrong spot. Do you have a slightly more specific pointer? > +#define X86_FEATURE_FZRM (12*32+10) /* Fast zero-length REP MOVSB */ > +#define X86_FEATURE_FSRS (12*32+11) /* Fast short REP STOSB */ > +#define X86_FEATURE_FSRC (12*32+12) /* Fast short REP {CMPSB,SCASB} */ If the use really is for inside the kernel, maybe we should hide them from cpuinfo: #define X86_FEATURE_FSRC (12*32+12) /* "" Fast short REP {CMPSB,SCASB} */