On Di, 2014-05-20 at 20:08 +0200, Paolo Bonzini wrote: > Il 20/05/2014 16:00, Gerd Hoffmann ha scritto: > > + -device pci-bridge,addr=12.0,chassis_nr=2,id=head.2 \ > > + -device secondary-vga,bus=head.2,addr=02.0,id=video.2 \ > > + -device nec-usb-xhci,bus=head.2,addr=0f.0,id=usb.2 \ > > + -device usb-kbd,bus=usb.2.0,port=1,display=video.2 \ > > + -device usb-tablet,bus=usb.2.0,port=2,display=video.2 > > + > > +This places a pci bridge in slot 12, connects a display adapter and > > +xhci (usb) controller to the bridge. Then it adds a usb keyboard and > > +usb mouse, both connected to the xhci and linked to the display. > > + > > +The "display=video2" sets up the input routing. Any input coming from > > +the window which belongs to the video.2 display adapter will be routed > > +to these input devices. > > + > > Is there anything about the window that we would like to configure? If > so, should this be something like > > -object window,id=window.2 \ > -device pci-bridge,addr=12.0,chassis_nr=2,id=head.2 \ > -device secondary-vga,bus=head.2,addr=02.0,window=window.2 \ > -device nec-usb-xhci,bus=head.2,addr=0f.0,id=usb.2 \ > -device usb-kbd,bus=usb.2.0,port=1,window=window.2 \ > -device usb-tablet,bus=usb.2.0,port=2,window=window.2 > > ?
The "window" is a QemuConsole. Which is a object already, visible in /backend/console[nr]. Has a device link pointing to the display device it is bound to. QemuConsoles are automatically created by display devices and don't have ids, so we lookup them using the display device id. See qemu_input_handler_bind in patch #3. If there is anything to configure then it most likely will be ui specific, i.e. we could possibly allow something like this ... -display gtk,display=video.1 \ -vnc :0,display=video.2 ... to have one head show up on gtk and the other on vnc (needs '-vga none -device VGA,id=video.1' instead of '-vga std'). cheers, Gerd
