Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp387236rwl; Thu, 23 Mar 2023 18:07:30 -0700 (PDT) X-Google-Smtp-Source: AKy350Zl6G/4cmxt5oRZ4oDOST9uxPdE9U5/nNuWGtfxS+3JtYsN28QM1PhClkvDpvUzcUOSLDHK X-Received: by 2002:a17:907:3e21:b0:930:f953:9614 with SMTP id hp33-20020a1709073e2100b00930f9539614mr1138240ejc.1.1679620050130; Thu, 23 Mar 2023 18:07:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679620050; cv=none; d=google.com; s=arc-20160816; b=eGdvaqxSHqeKobVHz4NB140OLc+vyo9HhmEi99mqg8J9IQXPSpTvRgSoAUBgdtV3kN 9Vey1RT6vu7PVW4E4hM6m0TXUHrUGnTlwuRWPXZdnv/wooPEmIb+mLhSIxqGNyPJxBuZ unnakfYigdNAtWaTca8iAZvMmySkcB6e+Jv2cVOGQJTHCSrc2WKB8dnSKIrWdJJaJrDD z/ZQuyVH85aNrpSnxnVWT0lfkKW6rJIP727uHtXaTsupcbMHYDJIwxdW7IByZ2ch30HU lnqyjwiIRfcPf7+PwBt20N5Rr3IReUgbWIjGAPk8doa03itAdQLMMBBWfnOQCdcrWD98 78NA== 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=ftU4vD+82V+SY3g8V9l//B0HDUceYI4BIZjOb4nmMjE=; b=GwWGdjpjKAJiDvqTsUUC1Ku27UTmOjSxCyd5xqOZUcq6LvjpD3+GlKQK+O+k5ep84k JZKbzJi1xHUhn98FoHkLsAIj02mXcPV7LJ/X4TIHptXxLsNJrJE6IbdOrNQ8ONe2VpoE LMoIbkY3HNH0WM0YA2jeYZVyTx9aMT9doys5/2iV+dFWrXgMwpIm8TJ3vacM4MmsEtUe mUUHYAT2DY4mlogANJEyJBGqoDUgJ8adqW2Xg54RoLe/Bl5Gq0ha2v/cLykM6mbJKHNz ITxnJnTYGsH3socXICCyB8EAQQRYX0As9rrNh00WY1mq/xLvGHbAi6G167N2nhEI3/gp 6LOg== 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 ap16-20020a17090735d000b00920f334f50csi19279806ejc.78.2023.03.23.18.07.05; Thu, 23 Mar 2023 18:07:30 -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 S230098AbjCXBA5 (ORCPT + 99 others); Thu, 23 Mar 2023 21:00:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229616AbjCXBA4 (ORCPT ); Thu, 23 Mar 2023 21:00:56 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 339441D901 for ; Thu, 23 Mar 2023 18:00:54 -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 E0C631576; Thu, 23 Mar 2023 18:01:37 -0700 (PDT) Received: from [10.57.18.93] (unknown [10.57.18.93]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D33273F766; Thu, 23 Mar 2023 18:00:50 -0700 (PDT) Message-ID: <61b0e30a-568c-d7f6-7b67-e9fc8b68de25@arm.com> Date: Fri, 24 Mar 2023 01:00:43 +0000 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> From: Kristina Martsenko In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.3 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 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? No, EL1 does not need to handle the exceptions itself, but I don't see any current use case for allowing EL2 to handle it. If it was allowed, I think booting.txt would need to specify exactly what Linux expects EL2 to do if MCE2 is set (eg, that EL2 handles the exception by reformatting registers, modifying single step state, etc). > There may even be a valid case to do this at > EL2 if you run a guest that uses these instructions but has no clue on > how to deal with the specific exception like WrongOption. Not sure I follow - this series adds the exception handling, so how can a Linux guest not know how to handle the exception? Or do you mean that there may be times when EL1 can't take the exception but EL2 may move it to another CPU, and so EL2 would need to handle the exception? I'm not sure if Linux ever uses mops instructions at times like that. Note that this series does not add support for mops in guests yet. I think booting.txt can be updated when that support is added. Thanks, Kristina