Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1617766iog; Thu, 16 Jun 2022 10:00:18 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sDFO1oh1pGSVyN8qFsJWID8ufJOxwkD7T6hNPg6wWuM99d2dnIbxFkWboBkVj9rIKSXSi0 X-Received: by 2002:a17:902:7d8e:b0:168:ab37:3288 with SMTP id a14-20020a1709027d8e00b00168ab373288mr5630972plm.54.1655398818617; Thu, 16 Jun 2022 10:00:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655398818; cv=none; d=google.com; s=arc-20160816; b=cJy4xvjKkHJz04hGbwzLyGlR84F1QNNhD0gZeJzwrveTSTVYGs2GOMNO0W0T3Tj2z6 mp5wobeZmPlEBR6yWVoV1IGjGfL2wrNcGQlzOTVCxS+MbyDc/n2CaqHidWiVhvUrOVzg aE/qaglCdM0smuqJB7KU5i84N6/JUWoT9sEOiXNv7JL5u2JKyTC5PSu2/FDNa46QAcOD EhwHBTq+xFAoLYgLovHuA5v3a82hzJUiIkwIg7AmT64n6zbg1/Dbzml/QFacO8ECbh6G T2vDQ4Iqx9mbsVKKlmlM7ENiDrBQitDy46XLB/41psT2Ij83CPO0YhE7GBt+gxEUmawV W97A== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=/kn16vTwAaiq9Bc2ILIkOn3nZMwcL4ACg5m6p87/3Yo=; b=h7WhEpwo6cAZpjO5MQxJPW/pLiFfqLoWbqWRbvL/gA1R8qwFI69p8TZRQqHVs8Gmpp gKnVkAXhLDPf7uu5M/3r0EB9niSLyj6whJszl+9qEosZG49ut7jZT9xZ1N5B6OlZM1DB eGXmwn23R51scB/+EDHc6bbme1p57+m2V1scA9q4VEZnD3Q81Bny/9m1ItJO8JC1Qiwx DJqo6idcRBsAOrfagLDGLAGChiGqP1ru72sDCoZGuUFUWMf9GtmxGo6+/eqdc4ddhuAk SZqsJLo4erBeyh4EwzrlhTMe4tx5Z5lJznKTO9WCTMi/fFbao2h+a0HyEX3P4Ddm2Zet SZIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="PRRxzD/c"; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cn4-20020a17090af08400b001eaa975a864si6166043pjb.134.2022.06.16.10.00.05; Thu, 16 Jun 2022 10:00:18 -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=@google.com header.s=20210112 header.b="PRRxzD/c"; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348511AbiFPQtD (ORCPT + 99 others); Thu, 16 Jun 2022 12:49:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378466AbiFPQsa (ORCPT ); Thu, 16 Jun 2022 12:48:30 -0400 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6395403C2 for ; Thu, 16 Jun 2022 09:48:20 -0700 (PDT) Received: by mail-pl1-x632.google.com with SMTP id o17so1718655pla.6 for ; Thu, 16 Jun 2022 09:48:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=/kn16vTwAaiq9Bc2ILIkOn3nZMwcL4ACg5m6p87/3Yo=; b=PRRxzD/clcgliJHEd07/uq15rx/yBZ9V4j/rYWq4ZHrSp30epHtSPOlJiP59CoqqZr 6c1JmzQXK2eO929G6Ykm1fK/53At6DA/HfU+VdIRzVij4QeUeNz26ZovCUMIy/fEqvk4 JM/pLBrzU8c2a0aiSiWN7IXGKNVRF8+wynuX/BN73HFNKFTlbDiKzEaEsYMdnPFk9yyI GVHyulrayWn/dcsOkO0yjThufPqncch97jY/VlU6HRpIQcMWDL5ERCShy+I9KvEM7UZg vzbcHTshM7cmF0QzoRdyO34Xk9YZOKwVNUbTLAU2ZwSgTtziSbN2uOYvamfTR/Ncpnu3 ABjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=/kn16vTwAaiq9Bc2ILIkOn3nZMwcL4ACg5m6p87/3Yo=; b=5cXi7DKErvMcnr+vZgEArLjnJl9l559IxhsOc/RfWCEilz7m2anUeC/0ItvIyrgVg3 1e3pVqP8a8ETttspYL71MTFJkOQaJ2Rpj5IKjQy9iDnT9PfyIIdiFB0WFHP/lNNUmkhp BIOSCjb3s/4RiqYh5MhmQY7RKeTuKfjHSJQOE6PnXKmMlTmtKQqMYo1iDPLsQLrOor33 fMmj7rfXmYYpS0/CVu2i6/UVa/fven5K+9jg7R0Byw8jYnJ6708B81czoDdpVPwlyg6P 50n+ib+V6U2R7zbCvibeZ3a0/cpublDNofnzvzT0+Hvb1vn9HKX/Ie0q5rklBboCKWlr 9YqQ== X-Gm-Message-State: AJIora9DPiwcYEXP0R2ycSfcqpbZASmm+Ayh36pxyNkkLgR3gQ87mO+e gzaHijXDQNj0tE/RtMXpeTFPKw== X-Received: by 2002:a17:902:e889:b0:167:523c:6011 with SMTP id w9-20020a170902e88900b00167523c6011mr5191842plg.114.1655398099979; Thu, 16 Jun 2022 09:48:19 -0700 (PDT) Received: from google.com (123.65.230.35.bc.googleusercontent.com. [35.230.65.123]) by smtp.gmail.com with ESMTPSA id p14-20020a170902e74e00b00163bfaf0b17sm1881313plf.233.2022.06.16.09.48.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jun 2022 09:48:19 -0700 (PDT) Date: Thu, 16 Jun 2022 16:48:15 +0000 From: Sean Christopherson To: Grzegorz Jaszczyk Cc: linux-kernel@vger.kernel.org, Dmytro Maluka , Zide Chen , Peter Fang , Tomasz Nowicki , Paolo Bonzini , Jonathan Corbet , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , "H. Peter Anvin" , "Rafael J. Wysocki" , Len Brown , Pavel Machek , Ashish Kalra , Mario Limonciello , Hans de Goede , Sachi King , Arnaldo Carvalho de Melo , David Dunn , Wei Wang , Nicholas Piggin , "open list:KERNEL VIRTUAL MACHINE (KVM)" , "open list:DOCUMENTATION" , "open list:ACPI" , "open list:HIBERNATION (aka Software Suspend, aka swsusp)" , Dominik Behr , Dmitry Torokhov Subject: Re: [PATCH 1/2] x86: notify hypervisor about guest entering s2idle state Message-ID: References: <20220609110337.1238762-1-jaz@semihalf.com> <20220609110337.1238762-2-jaz@semihalf.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable 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 Wed, Jun 15, 2022, Grzegorz Jaszczyk wrote: > pt., 10 cze 2022 o 16:30 Sean Christopherson napisaƂ(a): > > MMIO or PIO for the actual exit, there's nothing special about hypercalls. As for > > enumerating to the guest that it should do something, why not add a new ACPI_LPS0_* > > function? E.g. something like > > > > static void s2idle_hypervisor_notify(void) > > { > > if (lps0_dsm_func_mask > 0) > > acpi_sleep_run_lps0_dsm(ACPI_LPS0_EXIT_HYPERVISOR_NOTIFY > > lps0_dsm_func_mask, lps0_dsm_guid); > > } > > Great, thank you for your suggestion! I will try this approach and > come back. Since this will be the main change in the next version, > will it be ok for you to add Suggested-by: Sean Christopherson > tag? If you want, but there's certainly no need to do so. But I assume you or someone at Intel will need to get formal approval for adding another ACPI LPS0 function? I.e. isn't there work to be done outside of the kernel before any patches can be merged?