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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51544C433EF for ; Thu, 16 Jun 2022 16:49:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238472AbiFPQtE (ORCPT ); Thu, 16 Jun 2022 12:49:04 -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-Google-Smtp-Source: AGRyM1t3uWSAXvdTnUwhyjK92FH1zEVpL2y3mTXY46DWvFJiA+j/mfNxm/+AhMgmBmGLFn0ua19XVQ== 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: 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?