Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1075807pxk; Thu, 10 Sep 2020 06:33:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwvaQC9dpMSd/0m9drC3dky0a4cF9C4Fuw68MYi9w4sa+L2mA1foOjoaSpekG2dGVc2ifNv X-Received: by 2002:a17:906:69c9:: with SMTP id g9mr9261219ejs.313.1599744798435; Thu, 10 Sep 2020 06:33:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599744798; cv=none; d=google.com; s=arc-20160816; b=cPzUnyEczJ6hOHjKG5K31muNLAI2bR0R4n6QF2/3AjailxP7wqHCv3pbOZHqeS4Yr/ PKXZFLOCmIBmA1mBRQTSVr2NrlNydoilWz577T8enu0kkIhTAHeV/Prrg3XFXxpSnllk 7LOLbg+nr9LsJT2qQ4g87IJNo4MJ5s/P0Do4c/PewEDjR2dezC5/v2W2oKxgVdKQUANA ehM21DElTEinkJ+1+DA9Qdf6P+ZRIHxUk6Zaqp0F+gupwniaDc06S1O8OFuZ2VrCK2SO ew/391ILop/RfoEsYE/Y97danx9uQBX6IOCkzwRatkowvDClj0gDfZyAzrmF437SwZqe N56A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=/m+8BzcTQhMcOHlC8kleMb4zFUjUqXj7v07BC3dfEx0=; b=Yo93Tqdv2RTh6yHDdw9eZIGJ1CtwdazCqN58AMSD2Tx4A1Z3aHyLXbzasFQp74NxJm +PLjo3tNRfdTZmFJAcXAvRIWzPmyaspNvYubY0aAgzPRymtWMbZnJelCAG3mVwFGAMWF blUFUtPwh6hh+hjCyILDEy1OXYGjwdStNXKYyJXp32hUbq6mPLKgJZpKuG0nHL8Garh7 wuEyZBik1nbinbA1eNR7p4hIGpEXd2DEO3IQUi6qw9vwMhOn9zLtTn/dTugHvuPP/1gi PC/xI98vR9peJI4nvSEPGLG+WXuInSQmM33wPXdTCspQMVbupvilPa4QsV0/cJW7o811 lixg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DzGgN564; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h21si4046898edj.244.2020.09.10.06.32.55; Thu, 10 Sep 2020 06:33:18 -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=@redhat.com header.s=mimecast20190719 header.b=DzGgN564; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730368AbgIJNbU (ORCPT + 99 others); Thu, 10 Sep 2020 09:31:20 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:21196 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730821AbgIJN2E (ORCPT ); Thu, 10 Sep 2020 09:28:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599744477; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=/m+8BzcTQhMcOHlC8kleMb4zFUjUqXj7v07BC3dfEx0=; b=DzGgN564wsyfSk9eWic4PI8FLT5q1/IDt782KpTB+aRcM1h6imlJdrs3Q4QRSVKaf9TdRI rIRnsKVcn9B+6nHMf07P6w0j4oUAQ0756mTE2lp0vZLhYGOByj8uVvK1uJjbfqu2hKUyq6 SOJ4/CP1FtIv92q+4sRPVxA8LbRaPEY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-191-GGMbtMqWME-oXJaqIo8ZqA-1; Thu, 10 Sep 2020 09:27:55 -0400 X-MC-Unique: GGMbtMqWME-oXJaqIo8ZqA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2B93B425D2; Thu, 10 Sep 2020 13:27:54 +0000 (UTC) Received: from work-vm (ovpn-113-128.ams2.redhat.com [10.36.113.128]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6612F19C59; Thu, 10 Sep 2020 13:27:51 +0000 (UTC) Date: Thu, 10 Sep 2020 14:27:48 +0100 From: "Dr. David Alan Gilbert" To: Andrew Jones Cc: Richard Henderson , Steven Price , Peter Maydell , Juan Quintela , Catalin Marinas , qemu-devel@nongnu.org, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, Marc Zyngier , Thomas Gleixner , Will Deacon , Dave Martin , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 0/2] MTE support for KVM guest Message-ID: <20200910132748.GF2814@work-vm> References: <20200904160018.29481-1-steven.price@arm.com> <20200909152540.ylnrljd6aelxoxrf@kamzik.brq.redhat.com> <5cb1d7ed-54a5-4337-6c3d-2e3e7df89f17@linaro.org> <20200910054440.pvnzk7p7riiy45e2@kamzik.brq.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200910054440.pvnzk7p7riiy45e2@kamzik.brq.redhat.com> User-Agent: Mutt/1.14.6 (2020-07-11) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Andrew Jones (drjones@redhat.com) wrote: > On Wed, Sep 09, 2020 at 06:45:33PM -0700, Richard Henderson wrote: > > 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. > > Right, as long as it's fast enough to do > > for_each_dirty_page(page, dirty_log) > for (i = 0; i < host-page-size/16; i += 16) > append_tag(LDG(page + i)) > > to get all the tags for each dirty page. I understood it would be faster > to use LDGM, but we'd need a new ioctl for that. So I was proposing we > just piggyback on a new dirty-log ioctl instead. That feels a bad idea to me; there's a couple of different ways dirty page checking work; lets keep extracting the tags separate. Dave > Thanks, > drew -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK