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=-0.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 54D0FC2D0CE for ; Tue, 21 Jan 2020 14:18:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2B5E52087E for ; Tue, 21 Jan 2020 14:18:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="JpWOw12Q" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729247AbgAUOSA (ORCPT ); Tue, 21 Jan 2020 09:18:00 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:39516 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728978AbgAUOR6 (ORCPT ); Tue, 21 Jan 2020 09:17:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579616277; 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=weYoN+US5pU0ArR581BNHqxlBCJqtsz9O4P+flr6fqg=; b=JpWOw12Q/S4S+W9MCN7LRsTWUudx3xZMS0UNwKrk5fpktEmSPg0yQC12PbZHLEnZI1TDNl Ft8b7FBePVoyM3U2kCUdrtgVIU+Z+8nnZ+DRGPdn8NEpZPMyIDJZ4RGqW06e01VhMcGCSP B8E4lff2TvBk0l9H0gl7yaVijzjTaFg= Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-302-jsr6mrmGOBSwhjM3TXxElw-1; Tue, 21 Jan 2020 09:17:54 -0500 X-MC-Unique: jsr6mrmGOBSwhjM3TXxElw-1 Received: by mail-qv1-f71.google.com with SMTP id a14so1639995qvy.23 for ; Tue, 21 Jan 2020 06:17:54 -0800 (PST) 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:references :mime-version:content-disposition:in-reply-to; bh=weYoN+US5pU0ArR581BNHqxlBCJqtsz9O4P+flr6fqg=; b=pSe33NnuT3GZQDtTEGrj38NUabArwR8QpmyXORUhefDjIDsTyCBVU0PEkHG+TPVEtq thw/gwuwikMYszOCwcYqDwXumy4uozkk+itn3jL6ciVwMQACY21V7eOXm6OILymAdKTk 2A7o9TlbXxYb/e5YjUUTTjRP/ibICyYIt6bLoecj6cvfCs89QWtbbPQgBqwB7CCMct4R xFn7X949CzRlv1TdxbW0MKQ6R1tkSUiDdEqz9RdWlWfcF1fJtqNtXhKiWwMgB/y36qA+ 9vjbvpsQsFU1mm3cLOjRHPHpkUk1kJWA9IPTpofksD0UWzXZ6CglDKfFyvJnrm6VY4mE a06g== X-Gm-Message-State: APjAAAU6ZYyKu5ykNONWinuM1F8QohbBAJKn2kxegfOj773fwvlFnXA4 hvHPQocWupqAT6Cuhi89/Yt4o2z5CxG/3f/dTgep5v/FhSqI+VAT79XLzZESG2xPaHb4CqaG/pi pFjzVxFvLEtru X-Received: by 2002:a37:ad0e:: with SMTP id f14mr4590845qkm.213.1579616274071; Tue, 21 Jan 2020 06:17:54 -0800 (PST) X-Google-Smtp-Source: APXvYqwj1pwuzC/egPO4VzjPyAoce9o3J4cQVep1NUGRibBObTVNFPOqxPxAnfDJfRf0s0obsdxWcg== X-Received: by 2002:a37:ad0e:: with SMTP id f14mr4590813qkm.213.1579616273755; Tue, 21 Jan 2020 06:17:53 -0800 (PST) Received: from redhat.com (bzq-79-179-85-180.red.bezeqint.net. [79.179.85.180]) by smtp.gmail.com with ESMTPSA id u4sm17072928qkh.59.2020.01.21.06.17.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jan 2020 06:17:53 -0800 (PST) Date: Tue, 21 Jan 2020 09:17:45 -0500 From: "Michael S. Tsirkin" To: Jason Gunthorpe Cc: Jason Wang , Shahaf Shuler , Rob Miller , "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" , "virtualization@lists.linux-foundation.org" , Netdev , "Bie, Tiwei" , "maxime.coquelin@redhat.com" , "Liang, Cunming" , "Wang, Zhihong" , "Wang, Xiao W" , "haotian.wang@sifive.com" , "Zhu, Lingshan" , "eperezma@redhat.com" , "lulu@redhat.com" , Parav Pandit , "Tian, Kevin" , "stefanha@redhat.com" , "rdunlap@infradead.org" , "hch@infradead.org" , Ariel Adam , "jakub.kicinski@netronome.com" , Jiri Pirko , "hanand@xilinx.com" , "mhabets@solarflare.com" Subject: Re: [PATCH 3/5] vDPA: introduce vDPA bus Message-ID: <20200121091636-mutt-send-email-mst@kernel.org> References: <239b042c-2d9e-0eec-a1ef-b03b7e2c5419@redhat.com> <20200120174933.GB3891@mellanox.com> <2a324cec-2863-58f4-c58a-2414ee32c930@redhat.com> <20200121004047-mutt-send-email-mst@kernel.org> <20200121031506-mutt-send-email-mst@kernel.org> <20200121140456.GA12330@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200121140456.GA12330@mellanox.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Tue, Jan 21, 2020 at 02:05:04PM +0000, Jason Gunthorpe wrote: > On Tue, Jan 21, 2020 at 03:15:43AM -0500, Michael S. Tsirkin wrote: > > > This sounds more flexible e.g driver may choose to implement static mapping > > > one through commit. But a question here, it looks to me this still requires > > > the DMA to be synced with at least commit here. Otherwise device may get DMA > > > fault? Or device is expected to be paused DMA during begin? > > > > > > Thanks > > > > For example, commit might switch one set of tables for another, > > without need to pause DMA. > > I'm not aware of any hardware that can do something like this > completely atomically.. FWIW VTD can do this atomically. > Any mapping change API has to be based around add/remove regions > without any active DMA (ie active DMA is a guest error the guest can > be crashed if it does this) > > Jason Right, lots of cases are well served by only changing parts of mapping that aren't in active use. Memory hotplug is such a case. That's not the same as a completely static mapping. -- MST