Received: by 2002:ac2:464d:0:0:0:0:0 with SMTP id s13csp3269186lfo; Mon, 23 May 2022 00:21:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxqs0AlZR/hiUFD1aNfsfioBeMo4VwlCCFZc4aIewpHwqmty/BQ/XAz3YstVaZlWMKD8xE6 X-Received: by 2002:a17:90a:e7d2:b0:1e0:237:d3fe with SMTP id kb18-20020a17090ae7d200b001e00237d3femr15785522pjb.50.1653290478943; Mon, 23 May 2022 00:21:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653290478; cv=none; d=google.com; s=arc-20160816; b=R+YUfwTTekhkRixqOxR5obqqbdb9o24tiQbBT7+igVVVS9R3PxYfSN82VXf2oJYdH1 R+wBneGVwFHuebxnfDtTeLDVQKNxtswMqV0S4UJpYOFlE2QgvAiRdukqHMjantfX+5dF XSF8x8/CBuGICGuMumMrsk0fW4/niqqxBtlV9xRxaWzzfCaYwjFIiFZHLSn3OF9BJY+8 NiqjZYbLGrjlQ8VYJHaQleynrSAsk/kN2NlUkxLpBk2IeGpi86NoaPKw54E5yYzruo8c 55V3/coNEnFfkaIdG6YXlyyxX94Pbs3EPklcHVpInaHyXn83fZ04rEA+ETdxFwLvPIZb VlwQ== 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=D0rE5ocQaNvc6gwUw0uCA5HZ3TY/Uz1wLd+/r/5igCI=; b=Gbms3I02IJ8NXXPAM9/YuGfsML3JasL24ekx2dHcLOIEN+3Or75igh32Lija6hsthr EBDktTwmdpstGxg0VIHHlAP3IPDH2pl5xqNHU+3Hb+HnG3085kDVYghz+qsaPfb31nN8 s+4A2xdA4NM/jyczbFtRjdHf50hHt+6Jrd0pEntUUasHpa9n0qjaQx8C0Ff5dGZ6nNmw gTZoCrzlNwBqxdKTA5uAJFaU+EyvIdYyXmO0JPBOWUL72oyhXBh1ZYnt9YOPq5nHnG3a jKtGdCbHfhADtbJIFdIccwngiEgOWOeC5ZC0KGCWQNCnRac8t9PLKwN00Wsr+O87ijeY 0Stw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=T1fD6vnP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id a73-20020a63904c000000b003f6ba0c3e77si9403147pge.40.2022.05.23.00.21.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 00:21:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=T1fD6vnP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B31A09B1A3; Sun, 22 May 2022 23:37:05 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245375AbiETM6v (ORCPT + 99 others); Fri, 20 May 2022 08:58:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236706AbiETM6u (ORCPT ); Fri, 20 May 2022 08:58:50 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30B4716A26A for ; Fri, 20 May 2022 05:58:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; 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=D0rE5ocQaNvc6gwUw0uCA5HZ3TY/Uz1wLd+/r/5igCI=; b=T1fD6vnPvo1v8eK3XVf+kwOwIz fyqe8th/EBUGWxrvd9S4j2qFFfpJCYQbBs08b4RzbLonNEtXVhGG12SU2wP7mAZ5Gvenp/Clks2dt 4Uh8/WXm6GcQo2gpWYVnYHwAsTG5RyN7/1w/h4kE8GgsfbMrXois4NAmDFSU0bxnG0hnDHJZw6cBO Kru9QFej4iDxqpA5KLaFqfp8qd+SekLezdWIqwX3Vthc2mmbWxgXXTVQvfIymELESJIH2Jmwq5hwD eChtTwAPMHpqJovzeVrzmdGvLfZWz8nJS71GT8v34u+FsXP1WU0rvG4YSJz7XdqRmjqPxPi8dPwo9 JBiUMC0Q==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=worktop.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1ns2Cz-002Kur-Rn; Fri, 20 May 2022 12:58:22 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id 1D7E3981243; Fri, 20 May 2022 14:58:19 +0200 (CEST) Date: Fri, 20 May 2022 14:58:19 +0200 From: Peter Zijlstra To: "Kirill A. Shutemov" Cc: Isaku Yamahata , "Kirill A. Shutemov" , frederic@kernel.org, paulmck@kernel.org, rjw@rjwysocki.net, x86@kernel.org, linux-kernel@vger.kernel.org, jpoimboe@kernel.org Subject: Re: [RFC][PATCH 9/9] arch/idle: Change arch_cpu_idle() IRQ behaviour Message-ID: <20220520125819.GS2578@worktop.programming.kicks-ass.net> References: <20220519212750.656413111@infradead.org> <20220519213422.119695559@infradead.org> <20220519220349.GM2578@worktop.programming.kicks-ass.net> <20220520022052.mkrc4v4evtp74bxe@black.fi.intel.com> <20220520070614.GP2578@worktop.programming.kicks-ass.net> <20220520101322.flxf52mg6vkkbc7r@box.shutemov.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220520101322.flxf52mg6vkkbc7r@box.shutemov.name> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Fri, May 20, 2022 at 01:13:22PM +0300, Kirill A. Shutemov wrote: > So you want to call call the HLT hypercall with .irq_disabled=false and > .do_sti=false, but actual RFLAGS.IF in the guest is 0 and avoid CLI on > wake up expecting it to be cleared already, right? Yep, just like MWAIT can, avoids pointless IF flipping. > My reading of the spec is "don't do that". But actual behaviour is up to > VMM and TDX module implementation. VMM doens't have access to the guest > register file, so it *may* work, I donno. Yeah, it totally *can* work, but I've no idea if they done the right thing.