From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53045) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WS0Fo-0008Fd-Cf for qemu-devel@nongnu.org; Mon, 24 Mar 2014 04:29:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WS0Fi-0006zd-E7 for qemu-devel@nongnu.org; Mon, 24 Mar 2014 04:29:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:18401) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WS0Fi-0006z6-7E for qemu-devel@nongnu.org; Mon, 24 Mar 2014 04:29:02 -0400 Message-ID: <1395649735.15484.22.camel@nilsson.home.kraxel.org> From: Gerd Hoffmann Date: Mon, 24 Mar 2014 09:28:55 +0100 In-Reply-To: References: <1395408446.20837.49.camel@nilsson.home.kraxel.org> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] multihead & multiseat in qemu List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Dave Airlie Cc: David Airlie , Lennart Poettering , qemu-devel Hi, > > I'd like to have some way to assign tags such as seat=foo or head=1 to > > devices. Preferably in some way which can easily picked up with udev > > rules, so it is easily usable by system-logind and Xorg server. > > The only current example of seat autoconfiguration is for the usb hubs > from displaylink I think, which have video/audio/ethernet/usb behind a > hub that udev detects as being part of a seat, I'd need to look up the > specifics, udev can match upstream devices, so it's easy to tag all devices below the usb hub as belonging to the seat. > > We have virtio devices (virtio-gpu for example). For these it is easy, > > we can put something into the virtio protocol, and the guest driver can > > create a sysfs file where udev/systemd can pick it up. > > > > We have pci devices (cirrus for example). One idea for them would be to > > create a vendor-specific pci capabiliy for tags. Probably needs some > > small utility to read them, or kernel driver support to export them via > > sysfs. > > > > We have usb devices (kbd/mouse/tablet). We could put something into the > > string table, or have some vendor-specific descriptor. Same problem > > here, not easy accessible, needs a tool or kernel support. > > > > Comments? Better ideas? Other suggestions? > > It does seems like tagging the devices somehow would be better than providing > a seat device, like we could in theory have a pci and usb controller > per seat, and > have devices move around between them, this would be like what we for > the real hw, > however per-device tags does look like it might be nicer in the long run. I've been thinking about this too. Use a pci-bridge, then group the devices belonging to the seat below the pci-bridge for easy udev matching. That doesn't help for the multihead case though. And we have to tag the devices for qemu's internal usage (host-side input routing) anyway. Thats why I think the tagging will work better. cheers, Gerd