Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp752103pxk; Wed, 9 Sep 2020 19:05:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQI9YlyFeWj9sWRHrE171O/ZBFGoaFKGcWda7I6rpPhclueR9eZqSw7sILTxptXdhnvd1F X-Received: by 2002:a05:6402:3050:: with SMTP id bu16mr7208251edb.343.1599703532633; Wed, 09 Sep 2020 19:05:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599703532; cv=none; d=google.com; s=arc-20160816; b=Inp0scS+FYTcYsyXQ8pJDYkIelIW576JhydXH33bFP5J98qYBO3XGkQ+gExio+DQzz Ce2BPnwa0UnAAeFipFynAJE19X92egtditDIEdjRAfYYiN3hK9NbcR3iET3fl3RaDykm Kc908bt0EAimMXuEvgyaph8bKYEhwntZcrsZvf++GoFXkD8lZc2aVtMm++1dP/F+YNWq bwBsaB6F4G5utoZblkRIIU/mFJv/WojL3sgSSDwS8XY3q9CdmHJytRrX0hLlqVs4KdJX fh/735bJLf91VRD3dsknSbdiK7XoUzWJGv8AhNpIcO+jcGyOfEIaFdWjLHcJ+jbBKjtI Fzyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=srlzi6kO9KxXkI8QJDt5Z43HoR7v2ko9LYXQ8jt4y44=; b=TO7+MBQTcz/LXxkAJH09LNIKmHUfkya3j8UmJPiLVPY0ozwRoS84WJ8iOyCq6l2Vex rLRmoXR2taLLYH5BO37vRe5ifEgOzXHE5GKzDtREyFH3Z+fAC+1QGxjoY52dMd8Pdhr5 cu3+rO0dWjVFW0Ewy7gaMm41IZ/pwjUVY4Yn5RlDaxrKgwIsSIb4tPxGKxhJm+lfoBvu aFC45SGmiN3R/59GOgZwtVAQN0ZzzuhxJWfQuotpLwYAlYzB38qykNr2fu+UJ1kttVS/ PRqz+HmIvPy3xbPyC/7Scl1ZRbhovk8LDjjlQioDf3QiZ8SRwluCx/IyISyplcnhJIDe 4sow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="u/iv2lgV"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r2si3056897edx.134.2020.09.09.19.05.10; Wed, 09 Sep 2020 19:05:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="u/iv2lgV"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726883AbgIJCEZ (ORCPT + 99 others); Wed, 9 Sep 2020 22:04:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729935AbgIJBph (ORCPT ); Wed, 9 Sep 2020 21:45:37 -0400 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EE89C061342 for ; Wed, 9 Sep 2020 18:45:37 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id 34so3344154pgo.13 for ; Wed, 09 Sep 2020 18:45:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=srlzi6kO9KxXkI8QJDt5Z43HoR7v2ko9LYXQ8jt4y44=; b=u/iv2lgVycfu88AolfBLdcxoQkKwFXlBKbtJ8zj8UK6eoFLqKxQheAfb05BlbcjwKz G8IsBcKBAAda2DaUi0COUFu04Hgo/bR90dfH8TpuflZRaHnC1khAEnRbSFJQPHZdmbOU 52oCPFtp2JMMYx+7+DIob4TqY2CPbrFgfDAD4HYjqQ0FZNHOF9gB/q+C2Fs3bpOQg0YE hue7OYmW6G4eWQeXxXOT1y6I0qdgh2BpgOh4Ybit8LKhLF1Gi1vG2NHllpk0fVbF9hS8 f0vWsNBOavuocqCQkz3yBm5hrrBsPxXEPuV1wvG1Tk++5ZE9iciU1ZSfbVrnFoMcVRO7 rjYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=srlzi6kO9KxXkI8QJDt5Z43HoR7v2ko9LYXQ8jt4y44=; b=RkdOxXI5C4zaiXNb9DIec+Cbg/SdQS+oGJ63qkH6PiKvQS0vKBq6QBOeiJJSzweZXU vLI86bB9HuT0njKQQXsS3vqnE6wvs4JFn8JRbo0Ee2tNRL/TNALPctgi+UflmwxrOo+J jJDEiDMYde1JZ2SanLAkyM9bGi67TAV+NkODYZ3UqGmxq8yrWQlyNoJDn6mMjnPcCRsD PzkLBS20erHT9PJY/CYDrHk80x4ZogUQ/HmXleUrH1Xo9DoNXAMFt+71GA6acEqRKtWe 2c7mADynioRawJJwmVTJ5GH0DG/Dp5qgKMLqsMy5L05E6+JQThrpbt0GXgWJcdGSiRG0 p9xg== X-Gm-Message-State: AOAM5304fV3LUr7SpIzaCi/wWRhzUBCOsRK5K/3eGwEIedWFMHleadK1 N2gXcZA1CP+FSpHlP5asXKtfVA== X-Received: by 2002:a62:b407:: with SMTP id h7mr3166747pfn.134.1599702336093; Wed, 09 Sep 2020 18:45:36 -0700 (PDT) Received: from [192.168.1.11] ([71.212.141.89]) by smtp.gmail.com with ESMTPSA id s20sm3936396pfu.112.2020.09.09.18.45.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Sep 2020 18:45:35 -0700 (PDT) Subject: Re: [PATCH v2 0/2] MTE support for KVM guest To: Andrew Jones , Steven Price Cc: Catalin Marinas , Marc Zyngier , Will Deacon , "Dr. David Alan Gilbert" , Peter Maydell , qemu-devel@nongnu.org, Dave Martin , Juan Quintela , linux-kernel@vger.kernel.org, Thomas Gleixner , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org References: <20200904160018.29481-1-steven.price@arm.com> <20200909152540.ylnrljd6aelxoxrf@kamzik.brq.redhat.com> From: Richard Henderson Message-ID: <5cb1d7ed-54a5-4337-6c3d-2e3e7df89f17@linaro.org> Date: Wed, 9 Sep 2020 18:45:33 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200909152540.ylnrljd6aelxoxrf@kamzik.brq.redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/9/20 8:25 AM, Andrew Jones wrote: >> * Provide a KVM-specific method to extract the tags from guest memory. >> This might also have benefits in terms of providing an easy way to >> read bulk tag data from guest memory (since the LDGM instruction >> isn't available at EL0). > > Maybe we need a new version of KVM_GET_DIRTY_LOG that also provides > the tags for all addresses of each dirty page. KVM_GET_DIRTY_LOG just provides one bit per dirty page, no? Then VMM copies the data out from its local address to guest memory. There'd be no difference with or without tags, afaik. It's just about how VMM copies the data, with or without tags. >> * Provide support for user space setting the TCMA0 or TCMA1 bits in >> TCR_EL1. These would allow the VMM to generate pointers which are not >> tag checked. > > So this is necessary to allow the VMM to keep tag checking enabled for > itself, plus map guest memory as PROT_MTE, and write to that memory when > needed? I don't see a requirement for the VMM to set TCMA0. r~