Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp5934661rwr; Tue, 9 May 2023 08:07:52 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4QijwhppWM5sB62ZJrjvQzjxMYum68IvTC9KMxyAcQ4Zj+EThr0IlmUE3k3SxdBxJwoZHD X-Received: by 2002:a05:6a20:a10d:b0:101:4d10:e40a with SMTP id q13-20020a056a20a10d00b001014d10e40amr3101900pzk.12.1683644872047; Tue, 09 May 2023 08:07:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683644872; cv=none; d=google.com; s=arc-20160816; b=qBZ/mpmeagNNfmmdKeqf9EN6bFYqbUTrkW1eiFJJwiuGFILV1nwp1zEpEQZockhdTe aSWnjN/CzZ65R7h4GJJtQz0AlO4zYHWA93NSwIZTvr/IMcpugcvPknsK87aJV0bAxCZj 5Pat/Tsz2fnAAVHbBzjv67ZxtdSlAv0iideA2Uc3MvCrYvrQADZfBPEz1I4kOScT8omI 1mFVVrYddWaiAv1YupmDDLoNo6KmI70cCfS3Ybe88Ndw7+HrPcW+bC3nYOdTgX9J9X7z dFwq/eG2QY3lE7yRVvY2Nvlax2oInwdcMtrg6kUPhNzAt9uliaaweyeX41WMLUP/r8yq KUJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=H9tMz6bXtKfwO4QCThdkUnS3FmydhBHKXr9hWUjCX8Y=; b=GbSsKiuqEHK0nJ8stvLhkVffWFo0kDLK4JNnyt4pKieWN0oZdaTP0Yso8V+AeODQKm ZksyJ84G4iewPbwA7OzX1CWqwQb7bu3G9MrQomV/aKugr2uHjodq1CcKK/qFijJVYaft e4vWKRcoJjhTX0YWJT1oJydd+MfsWaaBssWXHFuID/EfT1LgtEMVAWzjOcVm0mq3nNlW w/EZ4uCZaG7WrzqjyKHB9GB31TGAVeWrh6FabH/pHrMeVVyDKOGYBNoemhkOWXm7IHPh uxWRBaO8WPmTY3HsdMhm/OkA3lY8vGYEse30GB6aNdn61bCAtR2ZpBgLuPf8TcbPCCmz xyMA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v71-20020a63894a000000b00514329f7ebdsi1674523pgd.344.2023.05.09.08.07.35; Tue, 09 May 2023 08:07:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235852AbjEIOXl (ORCPT + 99 others); Tue, 9 May 2023 10:23:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35232 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235846AbjEIOXd (ORCPT ); Tue, 9 May 2023 10:23:33 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0C1D330E5 for ; Tue, 9 May 2023 07:23:32 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4A0A1FEC; Tue, 9 May 2023 07:24:16 -0700 (PDT) Received: from e126864.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BD09D3F840; Tue, 9 May 2023 07:23:28 -0700 (PDT) From: Kristina Martsenko To: linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev Cc: Catalin Marinas , Will Deacon , Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Zenghui Yu , Mark Rutland , Mark Brown , Luis Machado , Vladimir Murzin , linux-kernel@vger.kernel.org Subject: [PATCH v2 05/11] arm64: mops: don't disable host MOPS instructions from EL2 Date: Tue, 9 May 2023 15:22:29 +0100 Message-Id: <20230509142235.3284028-6-kristina.martsenko@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230509142235.3284028-1-kristina.martsenko@arm.com> References: <20230509142235.3284028-1-kristina.martsenko@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org To allow nVHE host EL0 and EL1 to use FEAT_MOPS instructions, configure EL2 to not cause these instructions to be treated as UNDEFINED. A VHE host is unaffected by this control. Reviewed-by: Catalin Marinas Signed-off-by: Kristina Martsenko --- arch/arm64/include/asm/kvm_arm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/include/asm/kvm_arm.h b/arch/arm64/include/asm/kvm_arm.h index 7bb2fbddda54..d2d4f4cd12b8 100644 --- a/arch/arm64/include/asm/kvm_arm.h +++ b/arch/arm64/include/asm/kvm_arm.h @@ -94,7 +94,7 @@ #define HCR_HOST_VHE_FLAGS (HCR_RW | HCR_TGE | HCR_E2H) #define HCRX_GUEST_FLAGS (HCRX_EL2_SMPME) -#define HCRX_HOST_FLAGS 0 +#define HCRX_HOST_FLAGS (HCRX_EL2_MSCEn) /* TCR_EL2 Registers bits */ #define TCR_EL2_RES1 ((1U << 31) | (1 << 23)) -- 2.25.1