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 X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8C587C433DB for ; Wed, 30 Dec 2020 10:08:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5187C21D94 for ; Wed, 30 Dec 2020 10:08:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726391AbgL3KHD (ORCPT ); Wed, 30 Dec 2020 05:07:03 -0500 Received: from mail.kernel.org ([198.145.29.99]:40826 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725814AbgL3KHD (ORCPT ); Wed, 30 Dec 2020 05:07:03 -0500 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1A4EA21D94; Wed, 30 Dec 2020 10:06:22 +0000 (UTC) Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94) (envelope-from ) id 1kuYN2-004YYb-0Y; Wed, 30 Dec 2020 10:06:20 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 30 Dec 2020 10:06:19 +0000 From: Marc Zyngier To: Russell King - ARM Linux admin Cc: David Brazdil , kvmarm@lists.cs.columbia.edu, Mark Rutland , Lorenzo Pieralisi , Suzuki K Poulose , Sudeep Holla , linux-kernel@vger.kernel.org, James Morse , linux-arm-kernel@lists.infradead.org, Catalin Marinas , kernel-team@android.com, Will Deacon , Julien Thierry Subject: Re: [PATCH] KVM: arm64: Allow PSCI SYSTEM_OFF/RESET to return In-Reply-To: <20201229170412.GN1551@shell.armlinux.org.uk> References: <20201229160059.64135-1-dbrazdil@google.com> <20201229170412.GN1551@shell.armlinux.org.uk> User-Agent: Roundcube Webmail/1.4.9 Message-ID: <0e1d555404e4ae8edcf6737735dc0eb7@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: linux@armlinux.org.uk, dbrazdil@google.com, kvmarm@lists.cs.columbia.edu, mark.rutland@arm.com, lorenzo.pieralisi@arm.com, suzuki.poulose@arm.com, sudeep.holla@arm.com, linux-kernel@vger.kernel.org, james.morse@arm.com, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, kernel-team@android.com, will@kernel.org, julien.thierry.kdev@gmail.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-12-29 17:04, Russell King - ARM Linux admin wrote: > On Tue, Dec 29, 2020 at 04:00:59PM +0000, David Brazdil wrote: >> The KVM/arm64 PSCI relay assumes that SYSTEM_OFF and SYSTEM_RESET >> should >> not return, as dictated by the PSCI spec. However, there is firmware >> out >> there which breaks this assumption, leading to a hyp panic. Make KVM >> more robust to broken firmware by allowing these to return. > > Are you sure you should just return? > > We've had issues in the past with Linux reboot(2) that returns > to userspace, allowing on 32-bit ARM for example watchdogs to > unexpectedly continue being serviced. I don't think this changes anything compared to the case where the PSCI relay isn't enabled. The EL1 part of the kernel would see the SYSTEM_RESET call return, and handle it accordingly (stay in a while(1) loop). This is consistent with the PSCI relay design goal of being invisible to the EL1 kernel. Thanks, M. -- Jazz is not dead. It just smells funny... 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 X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 061FFC433DB for ; Wed, 30 Dec 2020 10:06:27 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id 6E800221F8 for ; Wed, 30 Dec 2020 10:06:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6E800221F8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvmarm-bounces@lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id D1BA24B1CA; Wed, 30 Dec 2020 05:06:25 -0500 (EST) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jjD34CfGMAWu; Wed, 30 Dec 2020 05:06:24 -0500 (EST) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id C5E074B1D1; Wed, 30 Dec 2020 05:06:24 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 6BE6E4B1CB for ; Wed, 30 Dec 2020 05:06:24 -0500 (EST) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id a9iGayyXP-Qn for ; Wed, 30 Dec 2020 05:06:23 -0500 (EST) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 525C14B1CA for ; Wed, 30 Dec 2020 05:06:23 -0500 (EST) Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1A4EA21D94; Wed, 30 Dec 2020 10:06:22 +0000 (UTC) Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94) (envelope-from ) id 1kuYN2-004YYb-0Y; Wed, 30 Dec 2020 10:06:20 +0000 MIME-Version: 1.0 Date: Wed, 30 Dec 2020 10:06:19 +0000 From: Marc Zyngier To: Russell King - ARM Linux admin Subject: Re: [PATCH] KVM: arm64: Allow PSCI SYSTEM_OFF/RESET to return In-Reply-To: <20201229170412.GN1551@shell.armlinux.org.uk> References: <20201229160059.64135-1-dbrazdil@google.com> <20201229170412.GN1551@shell.armlinux.org.uk> User-Agent: Roundcube Webmail/1.4.9 Message-ID: <0e1d555404e4ae8edcf6737735dc0eb7@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: linux@armlinux.org.uk, dbrazdil@google.com, kvmarm@lists.cs.columbia.edu, mark.rutland@arm.com, lorenzo.pieralisi@arm.com, suzuki.poulose@arm.com, sudeep.holla@arm.com, linux-kernel@vger.kernel.org, james.morse@arm.com, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, kernel-team@android.com, will@kernel.org, julien.thierry.kdev@gmail.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Cc: Lorenzo Pieralisi , Will Deacon , Catalin Marinas , linux-kernel@vger.kernel.org, Sudeep Holla , kernel-team@android.com, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu On 2020-12-29 17:04, Russell King - ARM Linux admin wrote: > On Tue, Dec 29, 2020 at 04:00:59PM +0000, David Brazdil wrote: >> The KVM/arm64 PSCI relay assumes that SYSTEM_OFF and SYSTEM_RESET >> should >> not return, as dictated by the PSCI spec. However, there is firmware >> out >> there which breaks this assumption, leading to a hyp panic. Make KVM >> more robust to broken firmware by allowing these to return. > > Are you sure you should just return? > > We've had issues in the past with Linux reboot(2) that returns > to userspace, allowing on 32-bit ARM for example watchdogs to > unexpectedly continue being serviced. I don't think this changes anything compared to the case where the PSCI relay isn't enabled. The EL1 part of the kernel would see the SYSTEM_RESET call return, and handle it accordingly (stay in a while(1) loop). This is consistent with the PSCI relay design goal of being invisible to the EL1 kernel. Thanks, M. -- Jazz is not dead. It just smells funny... _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm 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 X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E20E7C433DB for ; Wed, 30 Dec 2020 10:07:35 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 957EC21D94 for ; Wed, 30 Dec 2020 10:07:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 957EC21D94 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-ID:References:In-Reply-To:Subject:To:From: Date:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=xuiL9A/LPepnuaVDLLO69arZL4kRG+Njt1AtRuJ+Uac=; b=1G1hUM8fzpS+me13FgTXLgvBR N7dqO/lkyB1FYcZrtMKvZ6sngC9hwkE50QI/WI+XprOquOPMokxErYm5V3S4NwP1nRiDJ8E+pLGG+ ngxacvBg+j7OJvoDQVNI3vMQov3YFMeI8G9pPIDKB3o7OYBzp1E6dN9UCpXc7L/kkVG/ZWJtcom/6 zYYzBfijmVinST5oEKXCPVuWduTtCAQewem7w3WIzS7omvHPdzLt/jdzf67bFOGw2UXyFrSEErdR/ Ignea8WmJZn77myDu/yto+L9dGfTgD6IHySCtQ/Z251yntnTaABn0Kv52GUcd6Dx93FSCqJYqjuhN G158M29vA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kuYN8-0005XM-Em; Wed, 30 Dec 2020 10:06:26 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kuYN5-0005Wl-Hg for linux-arm-kernel@lists.infradead.org; Wed, 30 Dec 2020 10:06:24 +0000 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1A4EA21D94; Wed, 30 Dec 2020 10:06:22 +0000 (UTC) Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94) (envelope-from ) id 1kuYN2-004YYb-0Y; Wed, 30 Dec 2020 10:06:20 +0000 MIME-Version: 1.0 Date: Wed, 30 Dec 2020 10:06:19 +0000 From: Marc Zyngier To: Russell King - ARM Linux admin Subject: Re: [PATCH] KVM: arm64: Allow PSCI SYSTEM_OFF/RESET to return In-Reply-To: <20201229170412.GN1551@shell.armlinux.org.uk> References: <20201229160059.64135-1-dbrazdil@google.com> <20201229170412.GN1551@shell.armlinux.org.uk> User-Agent: Roundcube Webmail/1.4.9 Message-ID: <0e1d555404e4ae8edcf6737735dc0eb7@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: linux@armlinux.org.uk, dbrazdil@google.com, kvmarm@lists.cs.columbia.edu, mark.rutland@arm.com, lorenzo.pieralisi@arm.com, suzuki.poulose@arm.com, sudeep.holla@arm.com, linux-kernel@vger.kernel.org, james.morse@arm.com, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, kernel-team@android.com, will@kernel.org, julien.thierry.kdev@gmail.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201230_050623_668936_B5FBA5E5 X-CRM114-Status: GOOD ( 17.17 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Lorenzo Pieralisi , Will Deacon , Suzuki K Poulose , Catalin Marinas , linux-kernel@vger.kernel.org, James Morse , Julien Thierry , Sudeep Holla , David Brazdil , kernel-team@android.com, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2020-12-29 17:04, Russell King - ARM Linux admin wrote: > On Tue, Dec 29, 2020 at 04:00:59PM +0000, David Brazdil wrote: >> The KVM/arm64 PSCI relay assumes that SYSTEM_OFF and SYSTEM_RESET >> should >> not return, as dictated by the PSCI spec. However, there is firmware >> out >> there which breaks this assumption, leading to a hyp panic. Make KVM >> more robust to broken firmware by allowing these to return. > > Are you sure you should just return? > > We've had issues in the past with Linux reboot(2) that returns > to userspace, allowing on 32-bit ARM for example watchdogs to > unexpectedly continue being serviced. I don't think this changes anything compared to the case where the PSCI relay isn't enabled. The EL1 part of the kernel would see the SYSTEM_RESET call return, and handle it accordingly (stay in a while(1) loop). This is consistent with the PSCI relay design goal of being invisible to the EL1 kernel. Thanks, M. -- Jazz is not dead. It just smells funny... _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel