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 2D885CA601E for ; Fri, 9 Oct 2026 12:17:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: References:In-Reply-To:Subject:Cc:To:From:Message-ID:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=6/A+on6QTcsynPBLF2wcK5YT384IqIK0ywry4fp4NAo=; b=BW1WBeAPZjbJ/3MgCqyF//k6/u 9wCr8QnMjavvFNfdsYH/t9T9GQeKjMVdudb3kMBCcygBGIcreiQQm3QFXZRgWCvQnxQClsjuxP5rf Er+MHPBeF6E2/uVbhVbFN0JTiSEKVgk5TLezTNPqj6gGuyNyvfIE+GLf4qzHjO/SHdPE0bD5f9tLx NsH/tShgNM3w1mbZOjPoGwUsCl8eHlz+5M96tTcl239iPxVETdx7mV382iRO5iGGwf2GZlQ0kcJNg 83Up05c5ml6pcm5Ez7zyO9HdUwgZHVzyfrvb3I/Olk71+fcNHJlZIYG8YvBZT4C6Pl4ambom0MhCM bv9F/cEA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1xF9X5-00000006HSR-0oF9; Fri, 09 Oct 2026 12:17:03 +0000 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1xF9X3-00000006HS1-0rOw for linux-arm-kernel@lists.infradead.org; Fri, 09 Oct 2026 12:17:01 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id A590A423E1; Fri, 9 Oct 2026 12:17:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 834B91F000FF; Fri, 9 Oct 2026 12:17:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1791548220; bh=6/A+on6QTcsynPBLF2wcK5YT384IqIK0ywry4fp4NAo=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=PL9IPTYqlfvHL+IF9BEowQEj+uuzDibLKxsIj7RBMNCrBx/PdQkyBGqsi9P9NWrWf X68m6skXLFM4qKc18VNrF8rDSSacoinKTCYD15iSoBkKIbT/Q5n9exe2z42IvNKqON pXUKAtJmt82QV4EfJDDbNdJX+o4OeJrQG2S22PLdP17PyfptkVlWxlL04uanmVqasy 0C9xFCZ4laTK1J6p10pWLJOzgQLQy64Te5n9pFKsg25loGY2K9vcqtY9wrDW6wR53M TfvExeqSQUPo1jXgoqfo+VOaGLHWtr9n/l31zaHyuncoJW1kQH1VuqyPm7kKHTy4xf oGwY+qx3CQy3A== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xF9X0-00000000zPz-1ZsQ; Fri, 09 Oct 2026 12:16:58 +0000 Date: Fri, 09 Oct 2026 13:16:57 +0100 Message-ID: <868q472hmu.wl-maz@kernel.org> From: Marc Zyngier To: Fuad Tabba Cc: Suzuki K Poulose , kvm@vger.kernel.org, kvmarm@lists.linux.dev, will@kernel.org, catalin.marinas@arm.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, steven.price@arm.com, aneesh.kumar@kernel.org, oupton@kernel.org, gshan@redhat.com, joey.gouly@arm.com, yuzenghui@huawei.com, linux-coco@lists.linux.dev, gankulkarni@os.amperecomputing.com, sdonthineni@nvidia.com, alpergun@google.com, fj0570is@fujitsu.com, WeiLin.Chang@arm.com, lpieralisi@kernel.org, enju.kohei@fujitsu.com, sudeep.holla@arm.com, jonathan.cameron@oss.qualcomm.com Subject: Re: [PATCH v23 14/14] KVM: arm64: Prevent unsupported vcpu features for VM types In-Reply-To: References: <20261007073537.2454351-1-suzuki.poulose@arm.com> <20261007073537.2454351-15-suzuki.poulose@arm.com> <86a4on2qxz.wl-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/30.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: tabba@google.com, suzuki.poulose@arm.com, kvm@vger.kernel.org, kvmarm@lists.linux.dev, will@kernel.org, catalin.marinas@arm.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, steven.price@arm.com, aneesh.kumar@kernel.org, oupton@kernel.org, gshan@redhat.com, joey.gouly@arm.com, yuzenghui@huawei.com, linux-coco@lists.linux.dev, gankulkarni@os.amperecomputing.com, sdonthineni@nvidia.com, alpergun@google.com, fj0570is@fujitsu.com, WeiLin.Chang@arm.com, lpieralisi@kernel.org, enju.kohei@fujitsu.com, sudeep.holla@arm.com, jonathan.cameron@oss.qualcomm.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, 09 Oct 2026 11:10:55 +0100, Fuad Tabba wrote: > > Hi Marc, > > On Fri, 09 Oct 2026 09:55:52 +0100, Marc Zyngier wrote: > [...] > > A rebase would be a terrible idea. This thing *must* go on its own > > branch, and not depend on anything else. > > > > I can however fix things at merge time. is something like this what > > you had in mind? It compiles, and is therefore perfect... > > Yes, that's what I had in mind, but please keep the PSCI 0.2 check > from kvm_vcpu_init_check_features(): > > /* EL2 implements PSCI 1.1; the host must not dispatch as 0.1. */ > if (vcpu_is_protected(vcpu) && > !test_bit(KVM_ARM_VCPU_PSCI_0_2, &features)) > return -EINVAL; > > Folding the allowed set into the mask covers the rest of the block you > dropped, but a mask can only reject a feature, not require one. > Without the check a protected vCPU can init without PSCI_0_2, and the > host then dispatches the forwarded calls as PSCI 0.1, while EL2 > returns 1.1 to the guest. I think eventually we will have to implement this stuff as a pair of masks on a backend basis: one for what is acceptable, one for what is mandatory. In the meantime, I'll fold the above hack in. Thanks, M. -- Without deviation from the norm, progress is not possible.