Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1156566lql; Tue, 12 Mar 2024 08:47:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV3vaEk9GnULqEjWdXdBwB1RWSOCUAIvJPl0/SUKm1AwMsv3BCnTVO//1P93GjJriqhbx36jnqTmy4gwuzK1CuAeHJzyFEYNWxQVbirPA== X-Google-Smtp-Source: AGHT+IG+g5inwPYJ2J4eTqkK8NJhDhR8ohxU3MVxc4ZNDmtBmJKmDQasoWaxd/joY9LRrnTT9T8U X-Received: by 2002:a50:d582:0:b0:565:f9c1:d925 with SMTP id v2-20020a50d582000000b00565f9c1d925mr592575edi.0.1710258461587; Tue, 12 Mar 2024 08:47:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710258461; cv=pass; d=google.com; s=arc-20160816; b=MLfg63FAJN9Yw8PwhxEcNW4j+cS+RK1yqNnjGM+Q2lmamOHqvc+GlGxyZm5aXpCsqq lWY3ffqkzsjjHyVzVKEaBuhJXddVZixNFbZUp8r7qQDpaCrknFCiZn6v5ivxlc1Vm9Kz djsTV0nMxdFyMVAkOYgtNcno9pUJdMpFnitniq+19//yJeiK/igqyNKwll6TuAEX0ogC 1MlM7txOXAtblxWRcv6XS72SUyZnUXaERkLhp1XfkBOUXgQP5xBDbSrUxzH3P3eBkouS zcJeGAq8q/coUY2Vl0/xdi3gLjAIR21ihZH8oz1iAzAdrZzQDDYCuhhQ8La5xyKsl66O EjXQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:dkim-signature:date; bh=IBHh3k3RuYYlysG4vpKtI1L13MnMBvP8xcIit+nrqtY=; fh=cc4nWll21/cCxlBi7UO8sh1vO7NOnf/kF/nqFQLLRRQ=; b=LaP6OFPyFmTndR/hewkHtt574MbfES4IYRY4vh9DPsu2V+V69+oXFLD38P2wrgxPEO UUFPHY8mr1gssNPUFFpihiOtzugPxDGxAmnQRQBpDt453OHxHsYokTyzXeIh6tAtNSo7 PsuvR/lXdV1BK1ehsJYz7/Yv3kQervMd39iFz2pum7EmGtpZWKiC3A0qIude7oV9MhH7 MVW1NhZKwL+CJ6CItopTuawROH+CfNP4Azk+3MU6G/NfQFbi3eTWesdu8+HmxfwXJmeo ZIbXFhQ7eXlgSd4AxnAu4rEMSPKeOn+P0lDA75yYl+2HjZD4VAcRKJk7ZFa96K6ZJ4dL mMNA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=O9yoOEgW; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-100469-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-100469-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id r17-20020a05640251d100b0056765cfc822si3622762edd.107.2024.03.12.08.47.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 08:47:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-100469-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=O9yoOEgW; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-100469-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-100469-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 4DC841F22F06 for ; Tue, 12 Mar 2024 15:47:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0E3997CF2A; Tue, 12 Mar 2024 15:47:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="O9yoOEgW" Received: from out-189.mta0.migadu.com (out-189.mta0.migadu.com [91.218.175.189]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 59A987C6C8 for ; Tue, 12 Mar 2024 15:47:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.189 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258448; cv=none; b=SHMhlqgw8fpOap/AN8zPN/fUzkufoYMcq+XmTEBVdMztXuOuj8Ta68sKwZWq8D32NwVpRoApj/EPniKz3/E8l4bbuovAJXH6eAVXQz/dkUmJLgGePtVArALbxFlV65LK9FivJovWFvLlRIFWEVB34TSDfCKOP1UhKEXhyQYYNac= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710258448; c=relaxed/simple; bh=d/S0Om5CP7kfBCh6KRIKk04Z6CFJhQl+MBCAURqIDMk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=popnIWIb0i0D5rr2c73zdQDPBQ5I7oDCXde7gCjr4VvjVhT/1QcQKuJHCehvoIE3/M8baY4P71CVjTXV+qNsuYVhNPlO73f6H8Hx+cCuLAkbhqJy1PYz5vVDpgHp9KJ+hzl4JaCUOr6KEc5IeEpAqTX97XsSlvGq3/mCdkuNq9U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=O9yoOEgW; arc=none smtp.client-ip=91.218.175.189 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Date: Tue, 12 Mar 2024 08:47:16 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1710258444; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=IBHh3k3RuYYlysG4vpKtI1L13MnMBvP8xcIit+nrqtY=; b=O9yoOEgW8BhLzG2TDA19BQDFTvIiAOMlFuKlMxTj31EWLltBgp9M1mg2KDOdV6i1POGOOz iKT4+h8XoCkn5X865U1ZnNivg1fzpmCZqJKpivy/6l/qV2eUmT/FIvLTdE9E2r3XlfwLP8 kYjxOFuqbx2cjyxgCx275UPlGHSvssI= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: David Woodhouse Cc: linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, Paolo Bonzini , Jonathan Corbet , Marc Zyngier , James Morse , Suzuki K Poulose , Zenghui Yu , Catalin Marinas , Will Deacon , Mark Rutland , Lorenzo Pieralisi , "Rafael J. Wysocki" , Len Brown , Pavel Machek , David Woodhouse , Mostafa Saleh , Jean-Philippe Brucker , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev, linux-pm@vger.kernel.org Subject: Re: [RFC PATCH 1/2] KVM: arm64: Add PSCI SYSTEM_OFF2 function for hibernation Message-ID: References: <20240312135958.727765-1-dwmw2@infradead.org> <20240312135958.727765-2-dwmw2@infradead.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240312135958.727765-2-dwmw2@infradead.org> X-Migadu-Flow: FLOW_OUT Hi, On Tue, Mar 12, 2024 at 01:51:28PM +0000, David Woodhouse wrote: > From: David Woodhouse > > The PSCI v1.3 specification (alpha) adds support for a SYSTEM_OFF2 function > which is analogous to ACPI S4 state. This will allow hosting environments > to determine that a guest is hibernated rather than just powered off, and > ensure that they preserve the virtual environment appropriately to allow > the guest to resume safely (or bump the hardware_signature in the FACS to > trigger a clean reboot instead). > > The beta version will be changed to say that PSCI_FEATURES returns a bit > mask of the supported hibernate types, which is implemented here. Have you considered doing the PSCI implementation in userspace? The SMCCC filter [*] was added for this exact purpose. There are other features being done in userspace (e.g. vCPU hotplug) built on intercepting hypercalls, this seems to be a reasonable candidate too. [*] https://docs.kernel.org/virt/kvm/devices/vm.html#attribute-kvm-arm-vm-smccc-filter-w-o -- Thanks, Oliver