Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp10423497pxu; Wed, 30 Dec 2020 02:11:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJz/A5kcIb08UdkdZG4LLcydTrWgUmL0Cky9ZpZ04FVEZaZTWKybc4dY8vgJEQMxEsk/TBzA X-Received: by 2002:a17:906:9386:: with SMTP id l6mr19342060ejx.425.1609323060514; Wed, 30 Dec 2020 02:11:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609323060; cv=none; d=google.com; s=arc-20160816; b=ulwtT9tevBxZGg03U/eDqL9vb2/xeOLwF3AERlh5uavNhHdaQledXssi9zmu7Gh6dO eb4asDhkHWYxSuzk2BLJKC1Kg4to3u7AaRgUsVvwiAv2ll8Kg6nsvGgfvVF32CDaRCcl v7fghvIXpCQy6NtX1h/JoOyqmfdu5on82wPxwaO4UzRA7CST8+V6UGraGgyLg5MDcsve aCfKoweuwhuFrVse22lt1Ofpei8cqoJkPTOlPTjylNwtKFKBO2TSrUVzcjcwq6x9npjZ w7tDfn/lujZlNrba4728ah9rC49HgRDw0KlMDGjqg9Adel/yed8+ebKe3j/pW9YMmFoT /siA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:user-agent:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version; bh=G8w8mpLVR5GBheKQWtNkqXUy/j4uOp1A1DamKgIz0Wo=; b=ab/bwS6KunFzF5dWVZDk2oENqk8SMrwuL/RuHWA20keMVZjSb0HMDrlHMqmUtc4MDw xJ1JzY9+5BwtlOBz3Mv34xt4vvfTyg8/eaCs4iGW07rusNIpfEeiqxuEeG5ns26eizxX 9SLWYJDw4fPrsdbOXRLOoGLkeG4ZXq6F3T72+T86ZRQNFEG4zfPaKGrSGjNFofSYCzrI vaR+9v0QPbRytNIBAJEP4lK2qB18IhhFv0g2IfhFfYci+q2Asb4EGFqUYZYJpVrzij6T KV+vVVhhWnt7kgjP9EW1kXdjcbSsGigKv3wDdaxbP9MoTm0gmguWWIxE5nEXKvw463ci sK7w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b22si24321167edj.13.2020.12.30.02.10.37; Wed, 30 Dec 2020 02:11:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726363AbgL3KHD (ORCPT + 99 others); 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...