From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41178) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YXlkC-0007wT-L5 for qemu-devel@nongnu.org; Tue, 17 Mar 2015 03:16:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YXlk8-0003bp-Kl for qemu-devel@nongnu.org; Tue, 17 Mar 2015 03:16:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40950) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YXlk8-0003bk-Bg for qemu-devel@nongnu.org; Tue, 17 Mar 2015 03:16:48 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t2H7GlQZ016481 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 17 Mar 2015 03:16:47 -0400 Message-ID: <1426576605.27188.10.camel@nilsson.home.kraxel.org> From: Gerd Hoffmann Date: Tue, 17 Mar 2015 08:16:45 +0100 In-Reply-To: <20150316131613-mutt-send-email-mst@redhat.com> References: <1426502203-7650-1-git-send-email-kraxel@redhat.com> <20150316131613-mutt-send-email-mst@redhat.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] add pci-bridge-seat List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: qemu-devel@nongnu.org On Mo, 2015-03-16 at 13:20 +0100, Michael S. Tsirkin wrote: > On Mon, Mar 16, 2015 at 11:36:43AM +0100, Gerd Hoffmann wrote: > > Simplifies multiseat configuration, see > > docs/multiseat.txt update for details. > > > > Signed-off-by: Gerd Hoffmann > > --- > > docs/multiseat.txt | 19 +++++++++++++++++++ > > docs/specs/pci-ids.txt | 1 + > > hw/pci-bridge/pci_bridge_dev.c | 25 ++++++++++++++++++++++++- > > include/hw/pci/pci.h | 1 + > > 4 files changed, 45 insertions(+), 1 deletion(-) > > > > diff --git a/docs/multiseat.txt b/docs/multiseat.txt > > index b963665..814496e 100644 > > --- a/docs/multiseat.txt > > +++ b/docs/multiseat.txt > > @@ -106,6 +106,25 @@ the devices attached to the seat. > > Background info is here: > > http://www.freedesktop.org/wiki/Software/systemd/multiseat/ > > > > + > > +guest side with pci-bridge-seat > > +------------------------------- > > + > > +Qemu version FIXME and newer has a new pci-bridge-seat device which > > +can be used instead of pci-bridge. Just swap the device name in the > > +qemu command line above. The only difference between the two devices > > +is the pci id. We can match the pci id instead of the device path > > +with a nice generic rule now, which simplifies the guest > > +configuration: > > + > > + [root@fedora ~]# cat /etc/udev/rules.d/70-qemu-pci-bridge-seat.rules > > + SUBSYSTEM=="pci", ATTR{vendor}=="0x1b36", ATTR{device}=="0x000a", \ > > + TAG+="seat", ENV{ID_AUTOSEAT}="1" > > + > > +Patch with this rule will be submitted to upstream udev/systemd, so > > +long-term, when systemd with this lands in distros, things will work > > +just fine without any manual guest configuration. > > + > > Enjoy! > > > > I'm confused. What's wrong with using the regular bridge, > and ATTR{vendor}=="0x1b36", ATTR{device}=="0x0001"? It works just fine, thats why the new device is identical except for the id. The whole point is to simplify guest-side configuration, by passing one bit of extra information to the guest: Whenever the pci bridge with the devices below it should be considered a new seat (-device pci-bridge-seat) or not (-device pci-bridge). cheers, Gerd