Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3381826rdh; Thu, 28 Sep 2023 09:59:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEMFayTc5ld1eHwoVwtgpRq1yB5d67cahBZT0nioUjtdaEIvbq/i48kDvQDvxegOaAKBMGp X-Received: by 2002:a05:6a20:3d90:b0:15e:10e:12f3 with SMTP id s16-20020a056a203d9000b0015e010e12f3mr2056811pzi.0.1695920365417; Thu, 28 Sep 2023 09:59:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695920365; cv=none; d=google.com; s=arc-20160816; b=umrFXDj1o70TjI/Z6EIp0+vsuY8X6YF9DEEh8BqdbgNnldLIp0WJR2kMSE2n7S2OEy vDupLYP3q7uUtaBRSA8GASOTe8XDh4x3iWroJfMp1egB/S19qexW4dcHoDDHLFlLj2K3 iEp5dL7mWcxD2ElnqWg9yPNIVgveklZD5YMOziyJXc+RJSbQa2hwIbCeBitGGtGjnpcP Ii7JTcAybwmN7oMGNW5SfzOC1zPt8l2NY9zQ1asY43OQ2xXIdtTfm40U+s65iENv8BWR Pnl56HB/ExMgSb5MzfmUiVB1og7PT72csAEmqwPyZ6ivg/NR34ckuvy+S8bUacNz8aLB LQ9Q== 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=ikSX0Ff/6+i0pz1vBeNIedtlbplhhT0F0nS2VqWEeBg=; fh=L/xV7Hc5CYYoYFFw0o4GlxbgRmRFNQe1Cimk2io+YOo=; b=Lu+d+tI0ieEclq484vut23edl8Dmnjw6Xms2kujjb9kMqVbaBOAtLcogFiWj0Nk6KZ kzkQ+62k+0617bNa9I1F1Llfk10SRK1tW+AC7gSEJ7eNxDyyXHe9rcn1SIMPXs8gGSBu k0MsZvi/RVgTFtwAlKpQj7hcriqBhTpt9dyBC2PC0oBmf3PMTHBh9xvSGbwMcVUMEKdS D13x0Y8pet98E1zPtiKiTnnAN1Loi5airRHbwrdihxGgmgmzSz/Z1zuQa0Ocj1xqTBDO jwKfkrFxklBJm1+1VE6fRPnu6KxdI20ljir+lVEGVW9M8JB1QSDReCe0JlDDNgt6SK5x 5OFg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id o15-20020a656a4f000000b00578d08489a8si22247769pgu.832.2023.09.28.09.59.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 09:59:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 5CFFB801B936; Thu, 28 Sep 2023 09:56:06 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231332AbjI1Qzz (ORCPT + 99 others); Thu, 28 Sep 2023 12:55:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231263AbjI1Qzy (ORCPT ); Thu, 28 Sep 2023 12:55:54 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7F6F71A3 for ; Thu, 28 Sep 2023 09:55:52 -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 829881FB; Thu, 28 Sep 2023 09:56:30 -0700 (PDT) Received: from [10.1.32.180] (e126864.cambridge.arm.com [10.1.32.180]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 90DAA3F5A1; Thu, 28 Sep 2023 09:55:49 -0700 (PDT) Message-ID: <6687f58c-0da9-0583-2dc1-2089f292b745@arm.com> Date: Thu, 28 Sep 2023 17:55:39 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH v2 0/2] KVM: arm64: Support for Arm v8.8 memcpy instructions in KVM guests Content-Language: en-US To: Oliver Upton Cc: kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Marc Zyngier , James Morse , Suzuki K Poulose , Zenghui Yu , Catalin Marinas , Will Deacon , Vladimir Murzin , Colton Lewis , linux-kernel@vger.kernel.org References: <20230922112508.1774352-1-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.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Thu, 28 Sep 2023 09:56:06 -0700 (PDT) On 27/09/2023 07:00, Oliver Upton wrote: > Hi Kristina, Hi Oliver, > > On Fri, Sep 22, 2023 at 12:25:06PM +0100, Kristina Martsenko wrote: >> Hi, >> >> This is v2 of the series to allow using the new Arm memory copy instructions >> in KVM guests. See v1 for more information [1]. > > > Thanks for sending out the series. I've been thinking about what the > architecture says for MOPS, and I wonder if what's currently in the > Arm ARM is clear enough for EL1 software to be written robustly. > > While HCRX_EL2.MCE2 allows the hypervisor to intervene on MOPS > exceptions from EL1, there's no such control for EL0. So when vCPU > migration occurs EL1 could get an unexpected MOPS exception, even for a > process that was pinned to a single (virtual) CPU implementation. > > Additionally, the wording of I_NXHPS seems to suggest that EL2 handling > of MOPS exceptions is only expected in certain circumstances where EL1 is > incapable of handling an exception. Is the unwritten expectation then > that EL1 software should tolerate 'unexpected' MOPS exceptions from EL1 > and EL0, even if EL1 did not migrate the PE context? > > Perhaps I'm being pedantic, but I'd really like for there to be some > documentation that suggests MOPS exceptions can happen due to context > migration done by a higher EL as that is the only option in the context > of virtualization. That's a good point. This shouldn't affect Linux guests as Linux is always able to handle a MOPS exception coming from EL0. But it would affect any non-Linux guest that pins all its EL0 tasks and doesn't implement a handler. It's not clear to me what the expectation for guests is, I'll ask the architects to clarify and get back to you. Thanks for the feedback! Kristina