From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50971) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WR2Rv-0006aV-7U for qemu-devel@nongnu.org; Fri, 21 Mar 2014 12:37:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WR2Ro-000424-U3 for qemu-devel@nongnu.org; Fri, 21 Mar 2014 12:37:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:16973) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WR2Ro-00041s-LS for qemu-devel@nongnu.org; Fri, 21 Mar 2014 12:37:32 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s2LGbWXd023660 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 21 Mar 2014 12:37:32 -0400 Date: Fri, 21 Mar 2014 16:37:28 +0000 From: "Dr. David Alan Gilbert" Message-ID: <20140321163727.GA14504@work-vm> References: <1395408446.20837.49.camel@nilsson.home.kraxel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1395408446.20837.49.camel@nilsson.home.kraxel.org> Subject: Re: [Qemu-devel] multihead & multiseat in qemu List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: David Airlie , Lennart Poettering , qemu-devel * Gerd Hoffmann (kraxel@redhat.com) wrote: > Hi, > > I'm thinking about how to handle multihead and multiseat in qemu best. > > On multihead: Mouse in virtual machines works best with absolute > coordinates, and the way this is done today is to assign a (virtual) usb > tablet to the guest. With multihead this becomes a bit difficuilt. > Today we try to calculate the coordinates for the tablet that they cover > all displays, which has a number of drawbacks. I think it would be > better to operate more like a touchscreen, i.e. have one touch input > device for each monitor. For that to work the guest must know which > touch device belongs to which monitor. > > On multiseat: Very simliar problem here (thats why both issues in one > mail): The guest needs to know which devices belong to which seat. > > Qemu needs the grouping/assignment information too, to the the input > routing right (i.e. input from this window needs to go to that virtual > input device etc). Doing the configuration twice (once for qemu, once > for the guest) and make sure they actually match would be annoying > though. So I think we should configure qemu only, then pass that > information to the guest somehow. > > Question is how to do that best? > > 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. Can't you just do this in the serial number strings for both monitor EDID and USB device, I'm assuming that's how current multiseat setups figure stuff out. I think with the touchscreen idea that means qemu never needs itself to have a view of where it's displays are logically left/right/above/down which is probably fortunate. Dave > 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? > > cheers, > Gerd > > > -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK