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 7333CCCA480 for ; Thu, 16 Jun 2022 16:48:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377923AbiFPQsz (ORCPT ); Thu, 16 Jun 2022 12:48:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378465AbiFPQsa (ORCPT ); Thu, 16 Jun 2022 12:48:30 -0400 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDDAD42A0C for ; Thu, 16 Jun 2022 09:48:20 -0700 (PDT) Received: by mail-pj1-x102d.google.com with SMTP id k5-20020a17090a404500b001e8875e6242so1978660pjg.5 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=AT1rIEFg/FEjwMtGlOuxX0TzZM5WN0cF0L5NUXacNiJCzzy06Yffs6iIXp+2Fp1ZdQ sguztb6byDV80z8/HAmvkEGwJxGyMLeJlZIsNkH7Jakq0eKnRGLGKNW3PfQ4tmsiya/R GcdWIYJpe44hdikUQpkgYAqapEwOXsD/S8h08+igTuYwhMGH+/8KAgdCHm3krivrUYT6 BgAKOHSdlx0BGSnkkbcakdZ57KYNquMrJTDzm7WfTi9n0WukOy4TfF/kyLO+w2cxoKzQ 8/cqfYuIE3FsLuxAk4lb/lO1FZ+MqUw02HKNTjVMVCQ4kDqFDqLjIUPYXhBR7gtU7/dU dCOA== X-Gm-Message-State: AJIora8nK5N09mCzeYv+72xkfxRpZiU4VjpuNJJOfcwXDCSlH6TDko4E xuJnvPuRHUUoDST40Ao+e7UtcQ== 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-pm@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?