Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1211096pxj; Fri, 4 Jun 2021 08:40:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLvTfi2iHtAVEmK+9vNEXZtsPDHi1zrLUXsAhuAnRlxbI+0n4Ll4/gLOMq1dzi+yNNHSWU X-Received: by 2002:a05:6402:2547:: with SMTP id l7mr5408280edb.73.1622821211029; Fri, 04 Jun 2021 08:40:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622821211; cv=none; d=google.com; s=arc-20160816; b=otFGt+zXk0wOSddqL63pnvdt9lvAks5NNAhxcD9Uaz6OB7gWpZXdktbwYBHnQ2OBjl yqKctsgk9g6MFnuaFYZP1hj4xemSR4+7SQ4m+cm6H3G4kX490EQPWmZuqd7Opfpbx2Pi ci3swbgkfezzfjefLXloXrTfe/5w4kUuj+b0G3eAV433KcWcg28qmlMM1r83Fy45qRkF WPLdeczfL4MXhxLyhh75zOIBg9ohtLM2HUAEgD4NaxDhiDKso1xQ7imZ9AySdBT5FmJd TlwoQTjMhd4yKCFJur0tT3Gx1skQMZG6+asVr2/9A9vmFZLIRQxA2V+LD59KFZE1/AWw AMEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=pHiBAl8+vXrofNAjjOJ84eNcT7KcR0jKQ6aIcGHntvY=; b=nQmLnyj50YG3b81VpgDO5felo/fP9F5uVbP+GvzR1EP8Vw4Dji0omzyp9Lz+g9bAw8 0lzSJzazrV1vadbbe9MujgJPBUrmvhN7vMfL02Arel7zTBi+ZEGUm03veZi4dPDLM1AY ob9aOJpa1AuFTct15lsuE22tGrZr54cTEsHiTHIYgEOgm+KqiYYaxEjhEUqdA7FUQPln sC4qsNfsIdtO8NZ4zhUGMiqJoSBUSnGmQZUByQ1xgbsyjv4pauv6R/V4MXbDbJBeTF2B nzDyMRrXIx1QU2EZtGESUdw5XFT+hkcLGHleUrtW2gtGFnlKYd9zic6nACnSRo2o7T2E MsWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=C5Ko4dYu; 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 z3si4836828ejr.183.2021.06.04.08.39.42; Fri, 04 Jun 2021 08:40:11 -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=C5Ko4dYu; 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 S230034AbhFDPjq (ORCPT + 99 others); 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-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