From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A050C47080 for ; Tue, 1 Jun 2021 14:14:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7828A6139A for ; Tue, 1 Jun 2021 14:14:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234114AbhFAOQL (ORCPT ); Tue, 1 Jun 2021 10:16:11 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:58228 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233797AbhFAOQK (ORCPT ); Tue, 1 Jun 2021 10:16:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622556868; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KpiWH2OF1AIjpHGMXBLG1eY5FgHukExavmmxWGJkjnQ=; b=XFdRstnBjTlGk82H16xoh/fWyDeNfMLSNgHFOvsB3v3C3tas4mCjSdMouuxGelY0RbscVo b4flUpvlGgyTGO4UA13m0XCISlRFQaH0+JVd48KqNBg+BpmqDLwxs2wVQXwSh6miv14XHI n6OXf8P9yGks0E0+IXlHN72JiKuDFCE= Received: from mail-ot1-f70.google.com (mail-ot1-f70.google.com [209.85.210.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-254-liRGJHgkM7yXwEUwcIuWLQ-1; Tue, 01 Jun 2021 10:14:27 -0400 X-MC-Unique: liRGJHgkM7yXwEUwcIuWLQ-1 Received: by mail-ot1-f70.google.com with SMTP id a1-20020a9d47010000b0290320d09a96aaso8778764otf.16 for ; Tue, 01 Jun 2021 07:14:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:organization:mime-version:content-transfer-encoding; bh=KpiWH2OF1AIjpHGMXBLG1eY5FgHukExavmmxWGJkjnQ=; b=ghrVUrWXunEk0U+gq9G1DmguvboJgpJaWQwsWVr/cT8FeCWmZ+fRmFHq4UODiD2fT8 bJ0RteRnNd7Bee2AD29G58Fo0rmpCunrFgLA/Cdi1v6ma6wT6EUhg1qlUigTOVNJ0vUX XKfqRft3nXfB0UlXxT7FPN3Hp7iHq18ZCLL3pt7Oz7sMAOGjS2j1X+nnJmbs6SqJWCYN Lc0Ex40pCDM92RUZrPLB33LW6XG1OYKQPa1zQmb9zq0eU5XaNO4vkxcI3dA+2IzbKIgS sbNeoGfVDVMlD/MEvE6gpLtXaTBy6Ei5lHQzVkRucIxHDBqR0aiFq7Aj55LCSfyeKXrT geDQ== X-Gm-Message-State: AOAM532+60HI7jGuGDKgAbfcp0HcfemAf0s94XUlsBg4gquZRXEPdY5Z z7/igrQLwQLO20avdsKL0Vud2+eraAJEfugXuLAMo2DIt4XdqaX50liDLX+LbJL3J7nX4u9TiCK Tw9UVrkM+LCpEEuRQk1AjHCRA X-Received: by 2002:a9d:6756:: with SMTP id w22mr9616044otm.369.1622556866640; Tue, 01 Jun 2021 07:14:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJypX5OsdgNqG/xhEKJRirJFbF8Kz/olgrue4ZioE6i9lq13z56SQDOo8JHl9jrBJLQT6BsJcQ== X-Received: by 2002:a9d:6756:: with SMTP id w22mr9616027otm.369.1622556866443; Tue, 01 Jun 2021 07:14:26 -0700 (PDT) Received: from redhat.com ([198.99.80.109]) by smtp.gmail.com with ESMTPSA id a7sm188619oos.45.2021.06.01.07.14.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Jun 2021 07:14:25 -0700 (PDT) Date: Tue, 1 Jun 2021 08:14:23 -0600 From: Alex Williamson To: Thanos Makatos Cc: "vfio-users@redhat.com" , John Levon , Swapnil Ingle , "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" Subject: Re: semantics of VFIO_IOMMU_DIRTY_PAGES_FLAG_GET_BITMAP Message-ID: <20210601081423.47689d7a.alex.williamson@redhat.com> In-Reply-To: References: Organization: Red Hat X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 1 Jun 2021 13:48:22 +0000 Thanos Makatos wrote: > (sending here as I can't find a relevant list in > http://vger.kernel.org/vger-lists.html) $ ./scripts/get_maintainer.pl include/uapi/linux/vfio.h Alex Williamson (maintainer:VFIO DRIVER) Cornelia Huck (reviewer:VFIO DRIVER) kvm@vger.kernel.org (open list:VFIO DRIVER) linux-kernel@vger.kernel.org (open list) > I'm trying to understand the semantics of > VFIO_IOMMU_DIRTY_PAGES_FLAG_GET_BITMAP. My (very rough) understanding > so far is that once a page gets pinned then it's considered dirty and > if the page is still pinned then it remains dirty even after we're > done serving VFIO_IOMMU_DIRTY_PAGES_FLAG_GET_BITMAP. Is my > understanding correct? This is the current type1 implementation, but the semantics only require that a page is reported dirty if it's actually been written. Without support for tracking DMA writes, we assume that any page accessible to the device is constantly dirty. This will be refined over time as software and hardware support improves, but we currently error on the side of assuming all pinned pages are always dirty. Thanks, Alex