Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp7520138rwr; Tue, 25 Apr 2023 14:31:51 -0700 (PDT) X-Google-Smtp-Source: AKy350aAu412Kwhh6sJCm0xpVKNTMpevvJpDWdHegGaXmmWpshWwWzcxX4bR4CMSu/dqhPKyBKlb X-Received: by 2002:a05:6a00:1749:b0:63d:6228:6888 with SMTP id j9-20020a056a00174900b0063d62286888mr26374625pfc.3.1682458311489; Tue, 25 Apr 2023 14:31:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682458311; cv=none; d=google.com; s=arc-20160816; b=Re021/qXDXWKfXg51ujMrzHcGwhthT4RafzpQ+ATX7dfVHkfe0kiQja/nD697Bm17K 9Ta/a8Oi/As230qXUwCMcQ60U7j+mVv1CLSnE3xcU4ilePPMsPcP2rHrqtQoY80i8VWY 5csRNb+rnZ9MFd3hEe4jXW5AFfTYkiStF6S7YFcTXttDMCJWkuwzls19hGN6U53wRppd lBXGKNi3FTqnuCjgHRJ7d3uDrhP8c4JZIGruGfqOIp4GxYPgrj9avURiOk72qutfQZlb JhRuswqIp7zhRvbSzRtQ5xDZpilDyNVspkjPcpXXzFUBcsDAzK4eFlPtdfMvlW1Kh0Ty ljEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=aYEG3s29bEMINEEMcsxnboCa0Df1QW92P8NWJ27Cooc=; b=w01Z4XNfZQbUw1aGCDScfdrMEh45hiH+rmIg5VqR4+x68L0jomI0JyAC/25n2e4jNb kicFUwHqiZae/o5uwbQGzesfFac+LFoIQI2SmgIsehZmd4zZpqBccQ8km5onO3Jcqh3K LVCaafgLTA0K9FmZetUFDuP1d2u/k339G/6a7rsoGhPUMwWL2GD/V+itiZndul+vAU+8 2gYZh6x9nBrhm77v5QeFTXyF2OQjnZvtHwQKbEm3pwysb+L8BC82LI24M9udHaXrxc7B TEcM3rw3tNkQRKju2U/jX2pIvmmPhmonwFwESPHrYAIJBOovV9AqrK0h7UicZhIpvtPG eAzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=JbVMULhn; 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=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w5-20020a63fb45000000b0051453dfd139si14534497pgj.613.2023.04.25.14.31.36; Tue, 25 Apr 2023 14:31:51 -0700 (PDT) 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=@alien8.de header.s=dkim header.b=JbVMULhn; 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=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236321AbjDYVHC (ORCPT + 99 others); Tue, 25 Apr 2023 17:07:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232235AbjDYVHB (ORCPT ); Tue, 25 Apr 2023 17:07:01 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4D6516186 for ; Tue, 25 Apr 2023 14:06:59 -0700 (PDT) Received: from zn.tnic (p5de8e8ea.dip0.t-ipconnect.de [93.232.232.234]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 542E71EC056D; Tue, 25 Apr 2023 23:06:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1682456818; 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:in-reply-to:in-reply-to: references:references; bh=aYEG3s29bEMINEEMcsxnboCa0Df1QW92P8NWJ27Cooc=; b=JbVMULhnGQJE7u/lglvhfmEb/BGcv7o6Eir9RvTkWsn5VXytZERsI4VhGmkkQdfo91fBT8 A4CEcTmZ/Z1nQZJtAcHmfrsxH1yWK30K4xgL5PjHNoEEbPMx8p6ZeDU/81XzjgtrW3Kfpd 95FZQT5Y6CB0pgvgm8XAPIRUUteqlPs= Date: Tue, 25 Apr 2023 23:06:54 +0200 From: Borislav Petkov To: Dave Hansen Cc: Tony Battersby , Thomas Gleixner , Ingo Molnar , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Mario Limonciello , Tom Lendacky , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH RFC] x86/cpu: fix intermittent lockup on poweroff Message-ID: <20230425210654.GFZEhA7p7p/FXht76v@fat_crate.local> References: <3817d810-e0f1-8ef8-0bbd-663b919ca49b@cybernetics.com> <1955637d-b7ab-20a8-558a-6b909b7069a9@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1955637d-b7ab-20a8-558a-6b909b7069a9@intel.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 25, 2023 at 01:34:48PM -0700, Dave Hansen wrote: > > 0x0000000b 0x00: eax=0x00000001 ebx=0x00000002 ecx=0x00000100 edx=0x00000000 > > which does have BIT(0) set. Yeah, or the last basic leaf 0x0000000b 0x01: eax=0x00000005 ebx=0x0000000c ecx=0x00000201 edx=0x00000000 but that one has bit 0 set too, so yeah, patch is correct. I'll queue it after -rc1. But Tony, please change your commit message to say something like this: "Check the maximum supported extended CPUID level because on Intel, querying an invalid extended CPUID leaf returns the values of the maximum basic CPUID leaf and if bit 0 in EAX is set, the check falsely evaluates to true and WBINVD is wrongly executed where it shouldn't." Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette