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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 59037C433EF for ; Fri, 6 May 2022 13:02:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/med7O0EbJwoLgm0GDZjLks+yINDhphDOmdZ35tpWss=; b=eOk6T9/jBA7nwu xmeL+iioBgmhsABZArGf5ikvYLi7zcY+fz294xF809uDpDW7BqxhptIUyk68iHBmcxOvCjomEezMU HR8jQ6YzGpnXHloUM0Xc/vSn5oCaakHnGQcyt+OCuwtas/da5y7AxOZML+017E0dqa/uMxQ+Qj1wK UtXUKnLV17tRjOyMrPtkP3M5DbEZcd1QXgvax8SKHbMng4zHtOJ3eQVd0QY36YLs+31RYy552Ioy5 jzIt6tziEE2wyzVlxVtFLnEGjzakXLYMKXqgfU+uSRAzk5ETqO8qPdI3nzPnGQzA90LuetIXoY9x2 8sj22hIyxyd5P3cCes+g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nmxa7-003LSc-7U; Fri, 06 May 2022 13:01:15 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nmxa3-003LS5-9t for linux-arm-kernel@lists.infradead.org; Fri, 06 May 2022 13:01:13 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id E64AEB834C5; Fri, 6 May 2022 13:01:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5FD3FC385A8; Fri, 6 May 2022 13:01:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1651842068; bh=78TflA97GcDiKTkzTzNo81ow+4K3p0br6C/I8gs88JU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=MmYzcPDPbsRgbpJCkkBat3RoSxhsQbLi9panXSxtaUj1iBwDOvhk++5pG20q/h2cl Zs86/1Rib61rKU8TyG4KyOhrS8kbUTc3VZfSqAZwlUxE2azkFmJ1Q56SpCxjymmBXp Kv4W8OEksSNcvUu2PTH7nU33KJ+0v7cUYdwXOOdfBBySjlI4lBqNtEHOPypuH51hFy pDABUsk6DoAys6rC1XMdf34zV37PJeO5LqryIANR7KHzkbvHhhqtRkdRWp8/TNc+E+ hG+YbdnspDCaQiXPauuvlrfoTzIilfnohOpuusykYVdgzB74ulERmx0pyOYVyd+qnk ROp0WsRv4zRAQ== Date: Fri, 6 May 2022 14:01:01 +0100 From: Will Deacon To: Oliver Upton Cc: kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, Marc Zyngier , James Morse , Alexandru Elisei , Suzuki K Poulose , linux-arm-kernel@lists.infradead.org, Peter Shier , Ricardo Koller , Reiji Watanabe , Julien Thierry Subject: Re: [RFC PATCH kvmtool 0/5] ARM: Implement PSCI SYSTEM_SUSPEND Message-ID: <20220506130101.GC22892@willie-the-truck> References: <20220311174001.605719-1-oupton@google.com> <20220311175717.616958-1-oupton@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220311175717.616958-1-oupton@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220506_060111_678476_945CD2AA X-CRM114-Status: GOOD ( 23.92 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Mar 11, 2022 at 05:57:12PM +0000, Oliver Upton wrote: > This is a prototype for supporting KVM_CAP_ARM_SYSTEM_SUSPEND on > kvmtool. The capability allows userspace to expose the SYSTEM_SUSPEND > PSCI call to its guests. > > Implement SYSTEM_SUSPEND using KVM_MP_STATE_SUSPENDED, which emulates > the execution of a WFI instruction in the kernel. Resume the guest when > a wakeup event is recognized and reset it to the requested entry address > and context ID. > > Patches 2-4 are small reworks to more easily shoehorn PSCI support into > kvmtool. > > Patch 5 adds some SMCCC handlers and makes use of them to implement PSCI > SYSTEM_SUSPEND. For now, just check the bare-minimum, that all vCPUs > besides the caller have stopped. There are also checks that can be made > against the requested entry address, but they are at the discretion of > the implementation. > > Tested with 'echo mem > /sys/power/state' to see that the vCPU is in > fact placed in a suspended state for the PSCI call. Hacked the switch > statement to fall through to WAKEUP immediately after to verify the vCPU > is set up correctly for resume. > > It would be nice if kvmtool actually provided a device good for wakeups, > since the RTC implementation has omitted any interrupt support. > > kernel changes: http://lore.kernel.org/r/20220311174001.605719-1-oupton@google.com > > Oliver Upton (5): > TESTONLY: Sync KVM headers with pending changes > Allow architectures to hook KVM_EXIT_SYSTEM_EVENT > ARM: Stash vcpu_init in the vCPU structure > ARM: Add a helper to re-init a vCPU > ARM: Implement PSCI SYSTEM_SUSPEND > > arm/aarch32/kvm-cpu.c | 72 ++++++++++++++++++++ > arm/aarch64/kvm-cpu.c | 66 +++++++++++++++++++ > arm/include/arm-common/kvm-cpu-arch.h | 23 ++++--- > arm/kvm-cpu.c | 95 ++++++++++++++++++++++++++- > arm/kvm.c | 9 +++ > include/kvm/kvm-cpu.h | 1 + > include/linux/kvm.h | 21 ++++++ > kvm-cpu.c | 8 +++ > 8 files changed, 283 insertions(+), 12 deletions(-) Looks like the kernel-side changes are queued now, so please can you resend this series? I also think you can drop the AArch32 support, unless you see a compelling reason for it? Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel