1
0
Fork 0

update config for new software version

This commit is contained in:
Massaki Archambault 2021-11-21 02:09:25 -05:00
parent 4abd973336
commit c12bdd4855
3 changed files with 19 additions and 21 deletions

View File

@ -10,7 +10,8 @@
- '046d:c539' # Logitech, Inc. USB Receiver - '046d:c539' # Logitech, Inc. USB Receiver
- '046d:c08d' # Logitech, Inc. G502 LIGHTSPEED Wireless Gaming Mouse - '046d:c08d' # Logitech, Inc. G502 LIGHTSPEED Wireless Gaming Mouse
keyboards: keyboards:
- '/dev/input/by-id/usb-0d3d_USBPS2-event-kbd' # - '/dev/input/by-id/usb-0d3d_USBPS2-event-kbd'
- '/dev/input/by-path/platform-i8042-serio-0-event-kbd'
mice: [] mice: []
roles: roles:
- win10 - win10

View File

@ -7,8 +7,8 @@ prepare() {
drop-caches \ drop-caches \
compact-memory \ compact-memory \
irq-affinity mask C1-3,5-7 \ irq-affinity mask C1-3,5-7 \
cpuset-create --cpus C0,4 /host.slice \ cpuset-modify --cpus C0,4 /system.slice \
cpuset-create --cpus C1-3,5-7 -nlb /win10.slice \ cpuset-modify --cpus C0,4 /user.slice \
move-tasks / /host.slice \ move-tasks / /host.slice \
cpu-governor performance C0-7 cpu-governor performance C0-7
@ -21,15 +21,8 @@ prepare() {
} }
release() { release() {
echo "Restore system"
# restore cgroupv2
systemctl set-property --runtime -- user.slice AllowedCPUs=0,1,2,3,4,5,6,7
systemctl set-property --runtime -- system.slice AllowedCPUs=0,1,2,3,4,5,6,7
systemctl set-property --runtime -- init.scope AllowedCPUs=0,1,2,3,4,5,6,7
vfio-isolate restore /tmp/win10.undo
systemctl stop win10-usb systemctl stop win10-usb
vfio-isolate restore /tmp/win10.undo
sysctl -w vm.nr_hugepages=0 sysctl -w vm.nr_hugepages=0
} }

View File

@ -64,7 +64,7 @@
<cache mode='passthrough'/> <cache mode='passthrough'/>
<feature policy='require' name='invtsc'/> <feature policy='require' name='invtsc'/>
<!-- required for Genshin Impact, come with a performance hit --> <!-- required for Genshin Impact, come with a performance hit -->
<feature policy="disable" name="hypervisor"/> <!-- <feature policy="disable" name="hypervisor"/> -->
</cpu> </cpu>
<clock offset='localtime'> <clock offset='localtime'>
<timer name='rtc' present='no' tickpolicy='catchup'/> <timer name='rtc' present='no' tickpolicy='catchup'/>
@ -173,7 +173,9 @@
<address type='pci' domain='0x0000' bus='0x08' slot='0x00' function='0x0'/> <address type='pci' domain='0x0000' bus='0x08' slot='0x00' function='0x0'/>
</interface> </interface>
<input type='mouse' bus='ps2'/> <input type='mouse' bus='ps2'/>
<input type='mouse' bus='virtio'/>
<input type='keyboard' bus='ps2'/> <input type='keyboard' bus='ps2'/>
<input type='keyboard' bus='virtio'/>
<graphics type='spice'> <graphics type='spice'>
<listen type='socket' socket='/tmp/win10-spice.sock'/> <listen type='socket' socket='/tmp/win10-spice.sock'/>
<image compression='off' /> <image compression='off' />
@ -218,17 +220,19 @@
<size unit='M'>32</size> <size unit='M'>32</size>
<address type='pci' domain='0x0000' bus='0x02' slot='0x04' function='0x0'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x04' function='0x0'/>
</shmem> </shmem>
</devices>
<qemu:commandline>
<!-- keyboard evdev passthrough -->
{% for item in keyboards %}
<qemu:arg value='-object'/>
<qemu:arg value='input-linux,id=kbd1,evdev=/dev/input/by-id/uinput-persist-keyboard{{ loop.index0 }},grab_all=off,repeat=on'/>
{% endfor %}
<!-- mouse evdev passthrough --> <!-- mouse evdev passthrough -->
{% for item in mice %} {% for item in mice %}
<qemu:arg value='-object'/> <input type='evdev'>
<qemu:arg value='input-linux,id=input5,evdev=/dev/input/by-id/uinput-persist-mouse{{ loop.index0 }}'/> <source dev='/dev/input/by-id/uinput-persist-mouse{{ loop.index0 }}'/>
</input>
{% endfor %} {% endfor %}
<!-- keyboard evdev passthrough -->
{% for item in keyboards %}
<input type='evdev'>
<source dev='/dev/input/by-id/uinput-persist-keyboard{{ loop.index0 }}' grab='all' repeat='on'/>
</input>
{% endfor %}
</devices>
<qemu:commandline>
</qemu:commandline> </qemu:commandline>
</domain> </domain>