From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BCB37C433E0 for ; Mon, 1 Feb 2021 09:10:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 76D4D64E51 for ; Mon, 1 Feb 2021 09:10:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232800AbhBAJKV (ORCPT ); Mon, 1 Feb 2021 04:10:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232646AbhBAJKG (ORCPT ); Mon, 1 Feb 2021 04:10:06 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5202C06174A for ; Mon, 1 Feb 2021 01:08:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=9yzCjegvphyHKQtcc4XtyEBwvus4qWtbMG0GSfGCid4=; b=OBDi9LMmWpf2HU4rvIDFnwdRC4 2hcv6AM9DaWiZ0AedpjNIdtgchaF3xV8K7W8WfqiABRTmss08+mG8s/midjGnrmKRdYvKAvHEnlcx 6r0DvF8aDdt1/C7qeVD80oU2i1mghRDmzn7jAg6decZygDFWPRQ8refs7VPFPge1MCHZ3cDOCzhSD FDO+CXWDtLRw15D1G0barDHI0T9mYX6aUfNkL+SjNtzTyMiTpzJRkwsF2R+GwZ6AMmHlIEiFhb+CD /IdEgiR3HXkF7T2l3Nq1SAiNAj4sFbmARwkXNdJxdNhEIB53shsM2Dtwv1kkIUbqZ+iddf5K89WbN pVTClI/g==; Received: from hch by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1l6VCK-00DZh1-7m; Mon, 01 Feb 2021 09:08:40 +0000 Date: Mon, 1 Feb 2021 09:08:40 +0000 From: Christoph Hellwig To: Andy Lutomirski Cc: x86@kernel.org, LKML , Dave Hansen , Alexei Starovoitov , Daniel Borkmann , Yonghong Song , Masami Hiramatsu , Peter Zijlstra Subject: Re: [PATCH 06/11] x86/fault: Improve kernel-executing-user-memory handling Message-ID: <20210201090840.GB3229269@infradead.org> References: <05e787a0d0661d0bfb40e44db39bf5ead5f7e4ef.1612113550.git.luto@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <05e787a0d0661d0bfb40e44db39bf5ead5f7e4ef.1612113550.git.luto@kernel.org> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jan 31, 2021 at 09:24:37AM -0800, Andy Lutomirski wrote: > #if defined(CONFIG_X86_64) && defined(CONFIG_CPU_SUP_AMD) > + if (likely(boot_cpu_data.x86_vendor != X86_VENDOR_AMD > + || boot_cpu_data.x86 != 0xf)) Same nitpick as for the other patch. Maybe we wan a little inline helper for the specific erratum that includes the vendor and family checks in adddition to using IS_ENABLED for the config options?