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,URIBL_BLOCKED,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 97E91C47083 for ; Fri, 4 Jun 2021 15:38:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 79B5261400 for ; Fri, 4 Jun 2021 15:38:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231280AbhFDPjq (ORCPT ); Fri, 4 Jun 2021 11:39:46 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:29535 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230108AbhFDPjp (ORCPT ); Fri, 4 Jun 2021 11:39:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622821078; 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=pHiBAl8+vXrofNAjjOJ84eNcT7KcR0jKQ6aIcGHntvY=; b=C5Ko4dYu8z8LJKyyBGKChosP5gsdkhbehNnMIUD8EIobIwfLn1MkzvIEy9VgWkDRB8XU+D KtzBLQY9e2qpzuTS/WA5Tvli2/57w07i6za8xhBpFM5bEoZCGTn61yDybvWIDlGzwSi+Pv Klxzx1+5VR7t9nQyLLxhKalNtznZxdI= Received: from mail-il1-f200.google.com (mail-il1-f200.google.com [209.85.166.200]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-482-UN_7vhqpOGShKM3SwjjJcg-1; Fri, 04 Jun 2021 11:37:57 -0400 X-MC-Unique: UN_7vhqpOGShKM3SwjjJcg-1 Received: by mail-il1-f200.google.com with SMTP id d17-20020a9236110000b02901cf25fcfdcdso6731800ila.9 for ; Fri, 04 Jun 2021 08:37:57 -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=pHiBAl8+vXrofNAjjOJ84eNcT7KcR0jKQ6aIcGHntvY=; b=NnmaLj/bDxLJiBVpp8QzA1qR3OXPyX5Zt13g9GrVrnVNrWOVMyVWnpc0ZYL1fY+WSF 6vBSUgbKzCbx1DCaONDdZ/des3kjO3l7JPYMh+3/1ISd4l4PybRcG5I0iPafMaAjjVIG lDHH6mQJqCqdWNvfrvnECpQPpnaCzW9L6S+HAd0XCl2R3m/ct9LKZlbdxXWw4f00MVsN y8EhTur7zWvvBfBpp2MbNamAFiEnXd6MOYEx/PAcIqOuKJC03tCNiL29/15U5sOgC/J3 c/V4d6YW14byEXg7hkUBwA0HjciY6l7zm97djr1lcUweognJPnaDjtCPquX4Z2mbqfzi 5xSw== X-Gm-Message-State: AOAM532mbON6idnHwM0p91vFRdBajjpUwUGgyA5588q/rD660KYi9+He lr8VSxyUwceliP0q8DemboXkqavEeYapjuwUz3x4KOPlGbnGktq8EyoXYdO62MHqb9LiAoPjx3R qCqBQRdDZCdquYdnX6eQSRifH X-Received: by 2002:a05:6638:183:: with SMTP id a3mr4732199jaq.47.1622821076881; Fri, 04 Jun 2021 08:37:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwQxo+zfw3yLheApkfMNT19Kxv+RF4mWzeBkwzbgyKeWykIJlgSP3F1B+dw6s35/Bocj5BfPQ== X-Received: by 2002:a05:6638:183:: with SMTP id a3mr4732182jaq.47.1622821076638; Fri, 04 Jun 2021 08:37:56 -0700 (PDT) Received: from redhat.com (c-73-14-100-188.hsd1.co.comcast.net. [73.14.100.188]) by smtp.gmail.com with ESMTPSA id d2sm3775869ilu.60.2021.06.04.08.37.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Jun 2021 08:37:56 -0700 (PDT) Date: Fri, 4 Jun 2021 09:37:55 -0600 From: Alex Williamson To: "Tian, Kevin" Cc: Jason Gunthorpe , Jean-Philippe Brucker , "Jiang, Dave" , "Raj, Ashok" , "kvm@vger.kernel.org" , Jonathan Corbet , Robin Murphy , LKML , "iommu@lists.linux-foundation.org" , David Gibson , Kirti Wankhede , "David Woodhouse" , Jason Wang Subject: Re: [RFC] /dev/ioasid uAPI proposal Message-ID: <20210604093755.1d660a47.alex.williamson@redhat.com> In-Reply-To: References: <20210602111117.026d4a26.alex.williamson@redhat.com> <20210602173510.GE1002214@nvidia.com> <20210602120111.5e5bcf93.alex.williamson@redhat.com> <20210602180925.GH1002214@nvidia.com> <20210602130053.615db578.alex.williamson@redhat.com> <20210602195404.GI1002214@nvidia.com> <20210602143734.72fb4fa4.alex.williamson@redhat.com> <20210602224536.GJ1002214@nvidia.com> <20210602205054.3505c9c3.alex.williamson@redhat.com> <20210603124036.GU1002214@nvidia.com> <20210603144136.2b68c5c5.alex.williamson@redhat.com> 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 Fri, 4 Jun 2021 09:19:50 +0000 "Tian, Kevin" wrote: > > From: Alex Williamson > > Sent: Friday, June 4, 2021 4:42 AM > > > > > 'qemu --allow-no-snoop' makes more sense to me > > > > I'd be tempted to attach it to the -device vfio-pci option, it's > > specific drivers for specific devices that are going to want this and > > those devices may not be permanently attached to the VM. But I see in > > the other thread you're trying to optimize IOMMU page table sharing. > > > > There's a usability question in either case though and I'm not sure how > > to get around it other than QEMU or the kernel knowing a list of > > devices (explicit IDs or vendor+class) to select per device defaults. > > > > "-device vfio-pci" is a per-device option, which implies that the > no-snoop choice is given to the admin then no need to maintain > a fixed device list in Qemu? I think we want to look at where we put it to have the best default user experience. For example the QEMU vfio-pci device option could use on/off/auto semantics where auto is the default and QEMU maintains a list of IDs or vendor/class configurations where we've determined the "optimal" auto configuration. Management tools could provide an override, but we're imposing some pretty technical requirements for a management tool to be able to come up with good per device defaults. Seems like we should consolidate that technical decision in one place. Thanks, Alex