Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp756519ybi; Fri, 31 May 2019 08:28:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqyf2UTG3kvCNlV7z3zml0UYdeOayDX/EfqhVdA6XFIShN2gyDmdz1rDFdDKKTrhCjsbrTQs X-Received: by 2002:a17:90a:2e87:: with SMTP id r7mr9805255pjd.112.1559316506630; Fri, 31 May 2019 08:28:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559316506; cv=none; d=google.com; s=arc-20160816; b=Yy7PDWaof9YX5HYMWG7GqVWaMnfnlTy22KnyBzi/Q0Efk3jVUr4mVu1/rOpcH3RMh+ +aNtgZpB8Wk7qaSUPoaoFL4ZVfiqaRdav6CE/bIQzFk7qu7mz5l71mKs6dyyH8qwbx2T GHd8CAGXpy+uAwkXnMN6ru9ECqo3VizygWu7DX8MmS7X7oWcj0DKMPUjXke3pHIutpXQ eOlZLch0nNW5t84ofSiexPtvntddLs4iXZ5IqwdlzSwI0OHhA0ACXxdDwbCiQJSL9AtR NPOq4MOEFX2r5PgKuyJSBzMorqj2sBkyxpwpWsSjheYc39IV57DtNagyoLH7KzL9ab+q QCkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=XuqRuO5S/sUq2bX9swaBahJJIoXwsWZ0eRFlo+HOkWQ=; b=TylMu3wwE/SwGSsN+R2A8eyfA4I9rWXJ8BUKV6QOcITV7nYU2KFPV81hfNssOGh7Yb Ng1JLSvAoUqGfEiybsNWrVmsLjIUL0vxobSguTzTAFsiZFdDUvJOpvP9cQD/AiG7q+th r3T646wfR1ShqNR+xqFkmaD2w48SFF5+jjoV1Y1jq8mgQd4UA/jje7V+HZQsc3ANlpL9 aC5BCS3/2RsHddojYWBhJ/1FLXUJamFp5W5Jq7zA72alVcQAoexWSPY30DojRMW2v2+G 1TUmgaQiY4KBjjnJydmhb5nj1lKRPWeiFA/3amyAnllWI6+jO7g8podhhuGndxy9pE0A 5l5g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 204si7318645pfz.86.2019.05.31.08.28.09; Fri, 31 May 2019 08:28:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726724AbfEaP0m (ORCPT + 99 others); Fri, 31 May 2019 11:26:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54706 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726037AbfEaP0m (ORCPT ); Fri, 31 May 2019 11:26:42 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9BD09307D9D0; Fri, 31 May 2019 15:26:36 +0000 (UTC) Received: from treble (ovpn-124-142.rdu2.redhat.com [10.10.124.142]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5B6A95DE84; Fri, 31 May 2019 15:26:28 +0000 (UTC) Date: Fri, 31 May 2019 10:26:26 -0500 From: Josh Poimboeuf To: Jiri Kosina Cc: Andy Lutomirski , Andy Lutomirski , "Rafael J. Wysocki" , "Rafael J. Wysocki" , Thomas Gleixner , the arch/x86 maintainers , Pavel Machek , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Peter Zijlstra , Linux PM , Linux Kernel Mailing List Subject: Re: [PATCH v4] x86/power: Fix 'nosmt' vs. hibernation triple fault during resume Message-ID: <20190531152626.4nmyc7lj6mjwuo2v@treble> References: <20190531051456.fzkvn62qlkf6wqra@treble> <5564116.e9OFvgDRbB@kreacher> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Fri, 31 May 2019 15:26:41 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 31, 2019 at 04:54:20PM +0200, Jiri Kosina wrote: > On Fri, 31 May 2019, Andy Lutomirski wrote: > > > For that matter, what actually happens if we get an SMI while halted? > > Does RSM go directly to sleep or does it re-fetch the HLT? > > Our mails just crossed, I replied to Josh's mwait() proposal patch a > minute ago. Good catch. I agree that mwait seems unsafe across resume and my patch is bogus. Andy, in the short term it sounds like you're proposing to make native_play_dead() use hlt_play_dead() unconditionally. Right? That would simplify things and also would fix Jiri's bug I think. The only question I'd have is if we have data on the power savings difference between hlt and mwait. mwait seems to wake up on a lot of different conditions which might negate its deeper sleep state. Andy, for your long term idea to use INIT IPI, I wonder if that would work with SMT siblings? Specifically I wonder about the Intel issue that requires siblings to have CR4.MCE set. -- Josh