Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp5789303rwl; Tue, 11 Apr 2023 09:59:56 -0700 (PDT) X-Google-Smtp-Source: AKy350bP6bNimP0kK2mHcpBY+dk5RukQ7UIwYT948ZyUgqNKAfkwJ5yKmdCtxl433V0PIsnSJZ0+ X-Received: by 2002:a17:90b:507:b0:246:88c7:4374 with SMTP id r7-20020a17090b050700b0024688c74374mr12586164pjz.34.1681232396204; Tue, 11 Apr 2023 09:59:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681232396; cv=none; d=google.com; s=arc-20160816; b=twgci1Wk6xDe+8VzBMVNUQVSBClmd3BZ5Mt5dETy/Eqx4UbbKXF+i1MGwSpHbzqY23 sNnP71EmhChRDBqO18mFkj25pP5WbiPKbbbBOBX/vx5AiWPAhI1dKz9PUuY2OuKrgb/1 S4JwScyKwwKNR3DqaUV1Z8hmdl63eQqtLq7AKKZfFq472Pbu9K6KdSooRNgtmm668BhF o/MkRK0W4MtKyQP1p3fp5NTpLdxFd3st9v8gH1OxCU+EpV1hAaow6Nivl+hCZ3XMNO9Z QeVmrb1Mls3Ic6eO9ybnsZ+WWhzuGS6PLXKVWQhW1GjXSrhX8qV9URe6Ld8a7ygJhS+z k26w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=63/TtPOTneJKE+RVmCXfs6qjCpRFt8y8/5sszuRnYVM=; b=e6L7+y84ISeLVZq/tKIShjYPv/+h+fLnTRBT30RVV3nrn5IS0afyaD7+YqEqu6EfVd 2iBB6a5USj8HkvpDxuuXJ1pVtwAWPQCHnmq7Y7ugElyell0IHOYdiBZ9Vrz8jl6QKxn1 xoA7Bpry+ilV6ItxtFgnXx9j5AnX/sZoKxTWW69f3SmLUDiRC1KMbv2h7rhBd9aZRJUO m/NoKFLWc0DjIngRL/UDeJAkItdGwCbO5NtGvZYSfh7cvYbP8RIGRiFrTmSZNRPl3pip 9Ka3QwcuYg8z95TQMQsCj/zZVVyg40cTPCRn93LASUJpPIexydkWFoeL6zm38RXjWUcs l9tA== 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 o23-20020a17090a421700b002402275fc56si13357029pjg.118.2023.04.11.09.59.44; Tue, 11 Apr 2023 09:59:56 -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 S229490AbjDKQ6H (ORCPT + 99 others); Tue, 11 Apr 2023 12:58:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229450AbjDKQ6G (ORCPT ); Tue, 11 Apr 2023 12:58:06 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 467BB198 for ; Tue, 11 Apr 2023 09:58:05 -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 4BED4D75; Tue, 11 Apr 2023 09:58:49 -0700 (PDT) Received: from [10.1.38.164] (e126864.cambridge.arm.com [10.1.38.164]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 04A943F73F; Tue, 11 Apr 2023 09:58:01 -0700 (PDT) Message-ID: Date: Tue, 11 Apr 2023 17:57:34 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH 04/10] arm64: mops: document boot requirements for MOPS Content-Language: en-US To: Catalin Marinas Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, 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 References: <20230216160012.272345-1-kristina.martsenko@arm.com> <20230216160012.272345-5-kristina.martsenko@arm.com> <61b0e30a-568c-d7f6-7b67-e9fc8b68de25@arm.com> From: Kristina Martsenko In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.5 required=5.0 tests=NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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 On 04/04/2023 11:50, Catalin Marinas wrote: > On Fri, Mar 24, 2023 at 01:00:43AM +0000, Kristina Martsenko wrote: >> On 17/03/2023 15:07, Catalin Marinas wrote: >>> On Thu, Feb 16, 2023 at 04:00:06PM +0000, Kristina Martsenko wrote: >>>> + For CPUs with Memory Copy and Memory Set instructions (FEAT_MOPS): >>>> + >>>> + - If the kernel is entered at EL1 and EL2 is present: >>>> + >>>> + - HCRX_EL2.MSCEn (bit 11) must be initialised to 0b1. >>>> + >>>> + - HCRX_EL2.MCE2 (bit 10) must be initialised to 0b0. >>> >>> Regarding MCE2, does EL1 actually care if EL2 wants to handle all the >>> memcpy/memset exceptions? >> >> Note that this series does not add support for mops in guests yet. > > You mean there's no KVM support. But Linux may be run under a different > hypervisor (e.g. Hyper-V) as a guest. > >> I think booting.txt can be updated when that support is added. > > In booting.txt, when you say the kernel entered at EL1, it implies that > it may be run as a guest under a random hypervisor. > > So maybe we should detail the MCE2 requirement a bit, saying that it can > be either 0 or 1 but, for the latter, the hypervisor must handle the > corresponding exceptions. That makes sense. I was going to add this, but then realized that MCE2 only traps memcpy exceptions from EL1, not EL0, so it does not have any effect with this series. So I think we can just drop the MCE2 requirement entirely for now and specify the requirement later when we add memcpy instructions into the kernel itself. Thanks, Kristina