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, URIBL_BLOCKED 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 D34ADC2D0A3 for ; Fri, 6 Nov 2020 12:26:20 +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 45808204EC for ; Fri, 6 Nov 2020 12:26:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="SqLOryMS"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="KtXHeJtg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 45808204EC 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=zv1NBXhDhAEncOyHvppscrAw7pEYUawa0mwG4jDaN4c=; b=SqLOryMSCzmP9/RuNSKwY4zlt gvcyDFktsgar4+MvWVuOa6o7HDX3Jk11jlk71Rsznl9J6FV59/CkfjFcyXa7FB48wXvgEKGO5EvQG 3qjKqUziryqPusc8G+IK5KzjeedFLHPWEZEAmVn4S8Ct+bgUZj48eY7Ck4/Zz6/zkthyhZhUb7MVY ANJR2oJzF1DvWn1f6ss7sTknE9YpYTq/YxFTRrbKABtOBy6fwsXRRzqJHE5UHBRGxa3kuWC8p0XHW TTQR/pD7O3p9bVwQQwmhU6CdKpQbcV43FUJzIDFpFay42pGW9ihB++R3A9Bl/8RD6+DDVNTGY/FWv CYRqoXe5Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kb0nn-0002Ba-Ao; Fri, 06 Nov 2020 12:25:11 +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 1kb0nk-0002B9-NU for linux-arm-kernel@lists.infradead.org; Fri, 06 Nov 2020 12:25:09 +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 4854220728; Fri, 6 Nov 2020 12:25:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604665507; bh=V/Ngl+S6qEm3sU0uEaVkuAcYmnBwh6ZSK48gtM1t+SM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=KtXHeJtgR+x5+njnUSXftuBQbkIMrGAotZNXi4Ldu2y2k2D61oENT054zurjalV97 Xwk+0XMHlRdo2bs6E2LsG3diL6HX6DDgF7Uwt5a1/TMPp5aARhqQS3VC0bUY4UFytz vGpkXJY4ciGO2qWrbnqJLwMUYNTVwgKaANhMuAqk= 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 1kb0nh-008CCI-4P; Fri, 06 Nov 2020 12:25:05 +0000 MIME-Version: 1.0 Date: Fri, 06 Nov 2020 12:25:05 +0000 From: Marc Zyngier To: David Brazdil Subject: Re: [RFC PATCH 00/26] kvm: arm64: Always-on nVHE hypervisor In-Reply-To: <20201104183630.27513-1-dbrazdil@google.com> References: <20201104183630.27513-1-dbrazdil@google.com> User-Agent: Roundcube Webmail/1.4.9 Message-ID: <60a77f17737ffcfa31c3d1dfacc24384@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: dbrazdil@google.com, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, james.morse@arm.com, julien.thierry.kdev@gmail.com, suzuki.poulose@arm.com, catalin.marinas@arm.com, will@kernel.org, dennis@kernel.org, tj@kernel.org, cl@linux.com, mark.rutland@arm.com, lorenzo.pieralisi@arm.com, qperret@google.com, ascull@google.com, kernel-team@android.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-20201106_072508_939671_D913A414 X-CRM114-Status: GOOD ( 22.67 ) 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 , kernel-team@android.com, Suzuki K Poulose , Catalin Marinas , Quentin Perret , linux-kernel@vger.kernel.org, James Morse , linux-arm-kernel@lists.infradead.org, Tejun Heo , Dennis Zhou , Christoph Lameter , Will Deacon , kvmarm@lists.cs.columbia.edu, Julien Thierry , Andrew Scull 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-11-04 18:36, David Brazdil wrote: > As we progress towards being able to keep guest state private to the > host running nVHE hypervisor, this series allows the hypervisor to > install itself on newly booted CPUs before the host is allowed to run > on them. > > To this end, the hypervisor starts trapping host SMCs and intercepting > host's PSCI CPU_ON/OFF/SUSPEND calls. It replaces the host's entry > point > with its own, initializes the EL2 state of the new CPU and installs > the nVHE hyp vector before ERETing to the host's entry point. > > Other PSCI SMCs are forwarded to EL3, though only the known set of SMCs > implemented in the kernel is allowed. Non-PSCI SMCs are also forwarded > to EL3. Future changes will need to ensure the safety of all SMCs wrt. > private guests. > > The host is still allowed to reset EL2 back to the stub vector, eg. for > hibernation or kexec, but will not disable nVHE when there are no VMs. > > Tested on Rock Pi 4b. > > > Sending this as an RFC to get feedback on the following decisions: > > 1) The kernel checks new cores' features against the finalized system > capabilities. To avoid the need to move this code/data to EL2, the > implementation only allows to boot cores that were online at the time > of > KVM initialization. > > 2) Trapping and forwarding SMCs cannot be switched off. This could > cause > issues eg. if EL3 always returned to EL1. A kernel command line flag > may > be needed to turn the feature off on such platforms. I'd rather have it the other way around (buy-in rather than turn off). On top of the potential issue with stupid EL3s, there is the issue that PSCI is optional, and that protected VMs won't be able to work without it. Another related thing is that EL3 itself is optional. Note that this flag shouldn't be specific to PSCI proxying. It should also control Stage-2 wrapping, and the whole pKVM. 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