From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57867) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fBlkm-0007E1-8H for qemu-devel@nongnu.org; Thu, 26 Apr 2018 14:36:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fBlkj-0000oH-4g for qemu-devel@nongnu.org; Thu, 26 Apr 2018 14:36:24 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:47212 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fBlki-0000nf-W4 for qemu-devel@nongnu.org; Thu, 26 Apr 2018 14:36:21 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 949204075A77 for ; Thu, 26 Apr 2018 18:36:20 +0000 (UTC) Date: Thu, 26 Apr 2018 21:36:13 +0300 From: "Michael S. Tsirkin" Message-ID: <20180426213337-mutt-send-email-mst@kernel.org> References: <20180424063857.29246-1-kraxel@redhat.com> <20180426180955-mutt-send-email-mst@kernel.org> <20180426153148.rbjgglui2shdlzpg@sirius.home.kraxel.org> <20180426184017-mutt-send-email-mst@kernel.org> <20180426110028.738cb2f1@w520.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180426110028.738cb2f1@w520.home> Subject: Re: [Qemu-devel] [PATCH] allocate pci id for mdpy List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alex Williamson Cc: Gerd Hoffmann , qemu-devel@nongnu.org, Marcel Apfelbaum On Thu, Apr 26, 2018 at 11:00:28AM -0600, Alex Williamson wrote: > On Thu, 26 Apr 2018 18:40:40 +0300 > "Michael S. Tsirkin" wrote: > > > On Thu, Apr 26, 2018 at 05:31:48PM +0200, Gerd Hoffmann wrote: > > > On Thu, Apr 26, 2018 at 06:10:48PM +0300, Michael S. Tsirkin wrote: > > > > On Tue, Apr 24, 2018 at 08:38:57AM +0200, Gerd Hoffmann wrote: > > > > > mdpy is a sample pci device for vfio-mdev. Not (yet) merged upstream, > > > > > patch available here: > > > > > > > > > > https://www.kraxel.org/cgit/linux/commit/?h=vfio-sample-display&id=6fd86cff3d7df38ab89625b16fdd6434b1c18749 > > > > > > > > > > Cc: Alex Williamson > > > > > Signed-off-by: Gerd Hoffmann > > > > > > > > Reviewed-by: Michael S. Tsirkin > > > > > > > > I presume this should be merged together with the > > > > device implementation in qemu, or do you want this > > > > in tree sooner? > > > > > > There isn't a device implementation in qemu. It's a mdev device > > > provided by the kernel. Can be used with qemu using vfio. > > > > Why do we need a define in pci.h then? > > Because we want to allocate the device ID rather than squat on an > unused one and risk that it later conflicts with an another device. Do > we track device ID allocations from the RH vendor ID other than here in > QEMU? Thanks, > > Alex We have pci-ids.txt, yes. Unused macros just might get pruned down the line. If you like, add a comment in pci.h saying 0xf is reserved for mdpy. -- MST