Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp835623pxk; Wed, 9 Sep 2020 22:48:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyeMNf8EWpwP0GREkTXNTxZgV0STLn9K5WqS0+thEy7fzwARtDVnodkZ9s6JespzQhO8lyS X-Received: by 2002:a17:906:6409:: with SMTP id d9mr6997581ejm.344.1599716932697; Wed, 09 Sep 2020 22:48:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599716932; cv=none; d=google.com; s=arc-20160816; b=H/4is1omDGBfxPCxYj6Ycnjq0ECCP+avi32KLHzl+6pkPw6IJ+c6XaM/PMQWLDBzYP NzUqeNiveAh30etIc24xEbHoV5Fr+SlazmcApalpz8dWmfx6qfXnGg2ReZmA51dN2Cqz 5zoKnz8d0eZfE5Y8B6sixyzCLnU83eFv90OoWkkPQ/i3vYBldywudGrev7ok0JRhpUZR 9+Ie/t0snEBLb+fvezl8x3feJD5J4XiTrX7rDcK/sKcqR3iUJcMw0j+GOK1a8ywYvSMb 5lcCwUoYFHjeqscvp5rUHF+rEOywXWkcW0e1ZIwEfrz1Rte78gGB1LYetmFYEDmUzJfJ yzuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=aQiUYsh8TgXp4sQmZDKLYBoyRpNdR2/1b88YWG5P7nM=; b=a4ecz+oxkuplkvBbrIs0k6Ev7H8sBBI8gDzq/ujvjaNehgQwymqOWmO47PbaqdjVZ6 I9e3iTxKPCmb/CvbGyrbSfEROGIWBbyhFXiIpbikml46ZW0S7X4hwQj7qoHAxgBgRrqb r5PPp9UnwjNbepZoZG62BVTuTQ0DqVubFLQFKtpwZPo0uOdsHEYIHaRieJ0sHmhcuQcf NSSS1wjQJ2Wa1L0AQoADBYRc7iZLpAaXZY72eXrRq+oP9PFujcqj2qHRKgcz+aXoySa3 pJurnexa2yUmLfGom8sgyo+NSHLBCunEty4dV+uPrkF37+b331wpXMsZOFvy1D1ApXVD 9GCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=SrI4x+Z2; 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 r21si2869962ejs.399.2020.09.09.22.48.30; Wed, 09 Sep 2020 22:48:52 -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=SrI4x+Z2; 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 S1726676AbgIJFpD (ORCPT + 99 others); Thu, 10 Sep 2020 01:45:03 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:28002 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726160AbgIJFo5 (ORCPT ); Thu, 10 Sep 2020 01:44:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599716694; 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=aQiUYsh8TgXp4sQmZDKLYBoyRpNdR2/1b88YWG5P7nM=; b=SrI4x+Z2kgRxWFEUr4vo+lGfcYPtd8npaDr3GNESOQZw1vXrF+LPg/AjQj4N5/48HdBSku XvKNlficDP5t+wtwUH9B1uI77Js+mCVw08adsjNCNBTJTYrAHBWC2GS9zIJVG6UXKTB6tB 0KdjD3CiFvoNYLXMMf2cYyTRgrZ81Xg= 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-348-LSrp4Z1OPJ2Fgl8fllR4Vg-1; Thu, 10 Sep 2020 01:44:49 -0400 X-MC-Unique: LSrp4Z1OPJ2Fgl8fllR4Vg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BFB991017DC3; Thu, 10 Sep 2020 05:44:47 +0000 (UTC) Received: from kamzik.brq.redhat.com (unknown [10.40.192.124]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C59E8838A0; Thu, 10 Sep 2020 05:44:43 +0000 (UTC) Date: Thu, 10 Sep 2020 07:44:40 +0200 From: Andrew Jones To: Richard Henderson Cc: Steven Price , Peter Maydell , Juan Quintela , Catalin Marinas , qemu-devel@nongnu.org, "Dr. David Alan Gilbert" , 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: <20200910054440.pvnzk7p7riiy45e2@kamzik.brq.redhat.com> References: <20200904160018.29481-1-steven.price@arm.com> <20200909152540.ylnrljd6aelxoxrf@kamzik.brq.redhat.com> <5cb1d7ed-54a5-4337-6c3d-2e3e7df89f17@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5cb1d7ed-54a5-4337-6c3d-2e3e7df89f17@linaro.org> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Thanks, drew