[vfio-users] passthrough VGA for widespread use?

thibaut noah thibaut.noah at gmail.com
Wed Mar 2 22:49:33 UTC 2016


Bumping this, could a fedora user explain to me in a very noob friendly way
(let's assume everything you're gonna say to me is chinese) how to patch
qemu.
Said qemu being installed following alex's blog by adding fedora virt
preview repo.
Adding the repo installed a lot of packages and i actually have no idea
which file to patch and long story short i never did something fancy on
linux except using docker before setting up my vga passthrough.

2016-03-01 15:46 GMT+01:00 Jonathan Scruggs <j.scruggs at gmail.com>:

> The patches apply to Qemu 2.5. You will need to recompile it after
> applying the patches. See your distro's help section on working with source
> files. You should be able to add these to the RPM/DEP/Ebuild scripts
> easily. There are script files inside RPMs and DEBs that tell rpm/deb how
> to build those packages, thus editing that will compile the patches in for
> you and build the installable RPM/DEB.
>
> The following patches need to be applied in the order listed. They are
> taken from Gerd's qemu work branch. He's a qemu developer, btw. ;)
>
> https://www.kraxel.org/cgit/qemu/patch/?id=0d60ce8e719b5c49ba69c42080f7724fc7de5c1f
>
> https://www.kraxel.org/cgit/qemu/patch/?id=f3617dde4efc245313694ec1c48a0c94e3da6632
>
> https://www.kraxel.org/cgit/qemu/patch/?id=94cf5984085d74b3c1fc9bfb2713c3a931d19d08
>
> https://www.kraxel.org/cgit/qemu/patch/?id=caef8b88fecf1496fa5b623aa2c08544726e36f7
>
> https://www.kraxel.org/cgit/qemu/patch/?id=96c8276c04d609e880a0eb01298d73f46585225d
>
> https://www.kraxel.org/cgit/qemu/patch/?id=9e129397cfd6a733fb4c865e1b605c5c1eb07cff
>
> https://www.kraxel.org/cgit/qemu/patch/?id=6c1c299b65af44e1d81142efb944a9b1009ad725
>
> https://www.kraxel.org/cgit/qemu/patch/?id=0767759d388b0f1bdd9b0445b41b4e88bf980ede
>
> For ebuilds, I added this to the qemu ebuild:
> # Add input patches
> epatch "${FILESDIR}"/${P}-input-01-add-qemu-input.patch
> epatch "${FILESDIR}"/${P}-input-02-linux-evdev-support.patch
> epatch
> "${FILESDIR}"/${P}-input-03-add-option-to-toggle-grab-on-all-devices.patch
> epatch
> "${FILESDIR}"/${P}-input-04-add-name-strings-for-linux-input-layer-defines.patch
> epatch "${FILESDIR}"/${P}-input-05-event-logging-to-stderr.patch
> epatch "${FILESDIR}"/${P}-input-06-catch-and-handle-read-errors.patch
> # epatch "${FILESDIR}"/${P}-input-07-adapt-to-qapi-changes.patch <--
> needs development branch to work. Don't use.
> epatch "${FILESDIR}"/${P}-input-08-EAGAIN-is-not-fatal.patch
> epatch
> "${FILESDIR}"/${P}-input-09-add-switch-to-enable-auto-repeat-events.patch
>
> Then in my libvirt xml file, I enabled qemu direct commandline control:
>   <qemu:commandline>
>     <qemu:arg value='-input-linux'/>
>     <qemu:arg
> value='/dev/input/by-path/pci-0000:00:14.0-usb-0:9.1:1.0-event-kbd,grab-all=on,repeat=on'/>
>     <qemu:arg value='-input-linux'/>
>     <qemu:arg
> value='/dev/input/by-path/pci-0000:00:14.0-usb-0:9.1:1.1-event-mouse'/>
>     <qemu:arg value='-input-linux'/>
>     <qemu:arg
> value='/dev/input/by-path/pci-0000:00:14.0-usb-0:9.1:1.2-event-joystick'/>
>   </qemu:commandline>
>
> The Joystick is actually the keypad. I have a Microsoft sculpt set that
> comes with three separate pieces.
> Replace your keyboard and mouse with the correct paths in the
> /dev/input/by-path section.
>
> It will be cool when the execute program on switch is added, then just
> pressing both CTRL keys will switch monitor inputs as well!
>
> Jon
>
> On 1 March 2016 at 12:43, thibaut noah <thibaut.noah at gmail.com> wrote:
>
>>
>> 2016-03-01 11:08 GMT+01:00 Jonathan Scruggs <j.scruggs at gmail.com>:
>>
>>> I have no lag. The patches make the keyboard/mouse directly available on
>>> the guest as a real device. This way I have one keyboard and mouse for both
>>> host and guest. The technical bit is that the input buffers are forwarded
>>> to the guest. Synergy is nice but there is lag with that. These patches are
>>> real time! I play the latest AAA games too. I haven't noticed anything. It
>>> doesn't hurt to try. I can post my libvirt config if need be. I'll need to
>>> get the git address of the latest version.
>>
>>
>> That is pretty much why my synergy server is on the guest, but i have to
>> swift my mouse every time i boot, not good for the usb ports.
>> Are the patches applied with patch -p1?
>> No kernel recompilation needed?
>> If so could you copy paste them please?
>> That would be indeed glorious, and free 2ports on my usb controller (also
>> i have usb ports dedicated to gaming periph on my motherboard)
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/vfio-users/attachments/20160302/bd73c890/attachment.htm>


More information about the vfio-users mailing list