Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1316068ybl; Fri, 6 Dec 2019 15:14:17 -0800 (PST) X-Google-Smtp-Source: APXvYqxr5AmbcjWgP2Dr+DdU4VQEZJRoEoQeZzSIzyMbvrlEguLz0hR4DpQtIFFszmkowgnKub4W X-Received: by 2002:aca:48cd:: with SMTP id v196mr15259840oia.102.1575674057094; Fri, 06 Dec 2019 15:14:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575674057; cv=none; d=google.com; s=arc-20160816; b=uvVWrkLDfMJrbqCQF0DWZ7puubHPz8WX5Vy/gjSt99AuK+jXJXJlFP8/hJqTVJzbWR /IvajGosHQS2vTflTy4ATBrA1CPCufkjgr9VezqYT7MEbyyREH9bgmKFEq/ZkgNxRoyR m2Psk9N90/OdDYZSQSDT75/ZTP7g+QBxV8+7RydbTbcF+zZ8PYJzlJePVc4hykE/Em8Q tRQRMKpvDLJB51jbgLdD3mXaGvl8hot4Rw9IpDzYAVMXFZqE7QWhTZutd2M0Jkgb0sgj QU3VqbOPEJyIIKmQkeb4N6Uz0scwNU+38yC0kGf1NqoD6VReknDaL5/5XfyyNZCtCOC4 N+bA== 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:organization:from:references:cc:to:subject :dkim-signature; bh=c2liiLua+vDGh/gfnmWAijNKZrk6v9hVwlYubgc588Q=; b=bPxzJgppX+Pp+pSfSjDp22K/Y2zCJ5k0TZDdKzY6a1wy46YLaMeEuy9fgiUyhLDoiV 157HvY9e+DqOY/6ByviB74ngWIZdAV5S6psqYQXya5tF4bcLjUrN+PJJkuvUMHvxYDYU Xpsks580/OY+bBq/qUfAgR8C3i++CecXmmhmytxJ/dMV+GoaVRvEaztMgGHaKjT+aLiz QvMeJ/1yMMt0GHCDhe731nlnj54N351rZEs2yZ64+BP4+nnI0T2CaGnq67na9/s+kxVM qMnX7HrrSvOsBFODKZncjhZv1sCHRNcHq6R1brzaZSOtrnWSXS42iRRC2MLQ4Ec1htNk k0pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BSkmX+XL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id c10si8392459oto.293.2019.12.06.15.14.05; Fri, 06 Dec 2019 15:14:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BSkmX+XL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1726397AbfLFXNl (ORCPT + 99 others); Fri, 6 Dec 2019 18:13:41 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:28216 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726374AbfLFXNl (ORCPT ); Fri, 6 Dec 2019 18:13:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575674020; 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=c2liiLua+vDGh/gfnmWAijNKZrk6v9hVwlYubgc588Q=; b=BSkmX+XLKNGwcWE5iWFXH8OPPDLsGKPCZ1Lm+8oBcGnMHhZEAj8YW+KWbd5CgD+aaj3B4e b17RijDUhFRBgDCNQ9Vl7wPYTvD8ZKiSTOsCoL1ZJVQ6d/N3ECafl/OZ2SEPzFiy08qv7b bSRJK4Mq/pFLrTqwbt07zTBKNf4Mqa0= 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-167-ke8FPo4OP5W046Jk9LX56w-1; Fri, 06 Dec 2019 18:13:38 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E4919107ACC7; Fri, 6 Dec 2019 23:13:36 +0000 (UTC) Received: from [10.3.116.171] (ovpn-116-171.phx2.redhat.com [10.3.116.171]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7C3D65D6BB; Fri, 6 Dec 2019 23:13:31 +0000 (UTC) Subject: Re: [RFC PATCH 1/9] vfio/pci: introduce mediate ops to intercept vfio-pci ops To: Yan Zhao , alex.williamson@redhat.com Cc: kevin.tian@intel.com, kvm@vger.kernel.org, libvir-list@redhat.com, cohuck@redhat.com, linux-kernel@vger.kernel.org, zhenyuw@linux.intel.com, qemu-devel@nongnu.org, shaopeng.he@intel.com, zhi.a.wang@intel.com References: <20191205032419.29606-1-yan.y.zhao@intel.com> <20191205032536.29653-1-yan.y.zhao@intel.com> From: Eric Blake Organization: Red Hat, Inc. Message-ID: <9461f821-73fd-a66f-e142-c1a55e38e7a0@redhat.com> Date: Fri, 6 Dec 2019 17:13:30 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <20191205032536.29653-1-yan.y.zhao@intel.com> Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-MC-Unique: ke8FPo4OP5W046Jk9LX56w-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/4/19 9:25 PM, Yan Zhao wrote: > when vfio-pci is bound to a physical device, almost all the hardware > resources are passthroughed. The intent is obvious, but it sounds awkward to a native speaker. s/passthroughed/passed through/ > Sometimes, vendor driver of this physcial device may want to mediate some physical > hardware resource access for a short period of time, e.g. dirty page > tracking during live migration. > > Here we introduce mediate ops in vfio-pci for this purpose. > > Vendor driver can register a mediate ops to vfio-pci. > But rather than directly bind to the passthroughed device, the passed-through -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org