From patchwork Thu Aug 11 17:02:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oliver Upton X-Patchwork-Id: 12941650 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 1317BC19F2A for ; Thu, 11 Aug 2022 17:03:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=XMhnAEbze6mwdQRIS8A8NaOu8HnlywueaDLsp+kSRcc=; b=NeyhK6PA2URHmX 04NHMx7YqvCD2u5d9M/9RDRWhZiy4Xe1TSa99JDMb0p7prZhIFRWnhCuDApA6r1zM6ZfkrjZzWe0D pF/oFlr9POUoBT8J5buiVX/yY4L7of9nU7HDprahbxY+6xjRsC8qEg+gE9KjRvl8YVV+YlOpe+SQO ZiVPau6Wb3H3rrqBlG+FZ54cWDFIyIWazvY+qVyxLCgGCOwJgIxsiwFaE3E1P0Cgeqfi1ykqIm1uQ nDdhOvWsB4CrYQyQRCX82wkcYc9CT2RoqgCdJ2p03zYIsatmINe4rF4swgITgsVNUMTsdnh4Ut2xI OV/lauN0Q36392jMfCXQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oMBZz-00FX9B-WC; Thu, 11 Aug 2022 17:02:44 +0000 Received: from out2.migadu.com ([2001:41d0:2:aacc::]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oMBZt-00FX36-Q8 for linux-arm-kernel@lists.infradead.org; Thu, 11 Aug 2022 17:02:41 +0000 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1660237353; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=aRu2Qz6xb8tRmhzinXW+uqzNL8wj7Il9t5HyZbqL6Tg=; b=SNu3vi3owseg596wltVqJROBlTin96X5tvt0yK/GkSaYWcOt6/lp6NMQ45Ni63ZoaGOi4x CMavQI/m2OuZPnzo5X14fxUNJG9AnbeV4LHHRWBrrfQcaoVsdQ0t2C8TbE+1pTFW4mqtgF 3cT0+yIXdS5WBRGSAxdpM1Tu7rmW2MI= From: Oliver Upton To: kvmarm@lists.cs.columbia.edu Cc: kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, maz@kernel.org, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, will@kernel.org, Oliver Upton Subject: [PATCH 0/2] KVM: arm64: Uphold 64bit-only behavior on asymmetric systems Date: Thu, 11 Aug 2022 17:02:19 +0000 Message-Id: <20220811170221.3771048-1-oliver.upton@linux.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220811_100240_255843_D8368755 X-CRM114-Status: UNSURE ( 8.21 ) X-CRM114-Notice: Please train this message. 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 Small series to fix a couple issues around when 64bit-only behavior is applied. As KVM is more restrictive than the kernel in terms of 32bit support (no asymmetry), we really needed our own predicate when the meaning of system_supports_32bit_el0() changed in commit 2122a833316f ("arm64: Allow mismatched 32-bit EL0 support"). Lightly tested as I do not have any asymmetric systems on hand at the moment. Attention on patch 2 would be appreciated as it affects ABI. Oliver Upton (2): KVM: arm64: Treat PMCR_EL1.LC as RES1 on asymmetric systems KVM: arm64: Reject 32bit user PSTATE on asymmetric systems arch/arm64/include/asm/kvm_host.h | 4 ++++ arch/arm64/kvm/arm.c | 3 +-- arch/arm64/kvm/guest.c | 2 +- arch/arm64/kvm/sys_regs.c | 4 ++-- 4 files changed, 8 insertions(+), 5 deletions(-) base-commit: 21f9c8a13bb2a0c24d9c6b86bc0896542a28c197