From patchwork Tue Aug 16 19:25:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oliver Upton X-Patchwork-Id: 12945234 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 DE14CC25B0E for ; Tue, 16 Aug 2022 19:27:25 +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=Mi0j3pSiTFNytQkjdAeYNjOPio6mm6ELE2aFvS+s95Q=; b=E3CWLMC+E4lI8D HGHoTjHsiAExC6SueAEEmEpQHVOZwBFRQOaIqF8g8Sq72XMW3yRMZn8GWaMIGItWT4aVAszWX4+0G n8uFt4f8zAYfB2k11I4zgFKlNPhHE7hreCQFyWUYnU0CY+GcD0q2RuxlC/yjXLXegNKAdpL4GuuWc qd71bHh+NiPsSFMfvZM21jUcmr4Fx0PxSMhdAHllx0ZMfq8ftwVZh7HOHCocQNS7y9b2ufnOZtweL UZsjNatj7jEWIjoq8izk8J9GQ5Nkh/HpXepqU1J/1kdfmdxiDMspaar/rV6yH1lnL66jCVz2AurJ4 PZTiU01QM5filTM7ijGQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oO2Cc-006OL4-TT; Tue, 16 Aug 2022 19:26:15 +0000 Received: from out1.migadu.com ([91.121.223.63]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oO2Ca-006OGl-4M for linux-arm-kernel@lists.infradead.org; Tue, 16 Aug 2022 19:26:13 +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=1660677967; 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=Qyb4P3aeu3kcSplqFQPf6DeNYTbLexPY2NVEpp1YSig=; b=LCbCsDpds/zG+Va7xHgoChxHXHa8DjiiGRazo1QLBulYW9xQfLToPoGcarurdlrzvJgTpt 46OVyxAzuFiZBknosWlujn1sSL+OHdDKo3a1+m4GN5y54cxK5BSYjhHdakflruS7SQHXU+ +VPuithtmqBASaYDnrJkRq+e6+PwX28= 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 v2 0/2] KVM: arm64: Uphold 64bit-only behavior on asymmetric systems Date: Tue, 16 Aug 2022 19:25:52 +0000 Message-Id: <20220816192554.1455559-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-20220816_122612_381300_F9A131A2 X-CRM114-Status: UNSURE ( 8.60 ) 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. Applies to 6.0-rc1. v1 -> v2: - Fix a silly logic inversion in vcpu_mode_is_bad_32bit() - Rebase to 6.0-rc1 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: 568035b01cfb107af8d2e4bd2fb9aea22cf5b868