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 8C34CC43334 for ; Thu, 16 Jun 2022 16:53:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233494AbiFPQxk (ORCPT ); Thu, 16 Jun 2022 12:53:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378462AbiFPQs3 (ORCPT ); Thu, 16 Jun 2022 12:48:29 -0400 Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC4F2403F8 for ; Thu, 16 Jun 2022 09:48:20 -0700 (PDT) Received: by mail-pl1-x62b.google.com with SMTP id m14so1722336plg.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=vu0bCoIFDcmoOLJZwEfVmVeKhqz4wtwanMz3PZqSu1wLXlqs8Cw9weBb6Sx+hIHf4Q IeSVD+zA7yIODg+MGCaYiW2IVFNTNmPAmiW6crty/ke9Ixzvr8ohCSpyq5+EEzxnNQ9p U/mx9XU673R3yn8fPyg9wXzSZ9uegq3Z+0k0Gdd0n+bpRZJBhkEBYlbukN9QjSPzvJ7C Jo7oj0kXzhuNDO54ZmqML+KzJYwdnnS18BGtGhIZ9X0si+96VfNPUyPK6EVCbjcaFWoZ epAGhsb7sS6MIWQfJhyOC8sH9FaFrV/lpvE7JwDRebB1uVNA8VbiCmZspkoplNYNg4iO HgcQ== X-Gm-Message-State: AJIora+ZMV6bTMjepbfqaZ3UDM5DeqgVyF8+zb/z6RMCQbj6vhuDY7aC 0ed9blWls3nxrV4zIlPH2Src0A== 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: kvm@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?