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: 12945231 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EB574C25B0E for ; Tue, 16 Aug 2022 19:26:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237165AbiHPT0L (ORCPT ); Tue, 16 Aug 2022 15:26:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237156AbiHPT0K (ORCPT ); Tue, 16 Aug 2022 15:26:10 -0400 Received: from out1.migadu.com (out1.migadu.com [91.121.223.63]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42932659EB for ; Tue, 16 Aug 2022 12:26:09 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.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