diff --git a/playbook.yml b/playbook.yml index bcccf81..c54fcfe 100644 --- a/playbook.yml +++ b/playbook.yml @@ -4,39 +4,30 @@ audio: source: EasyEffects Source sink: EasyEffects Sink + # for vfio-pcie vfio_pci_ids: - - '8086:15b8' # Intel Corporation Ethernet Connection (2) I219-V - '1002:731f' # Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 [Radeon RX 5700 / 5700 XT] - '1002:ab38' # Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 HDMI Audio + # for passthrough pci_device_ids: - # Intel Corporation Ethernet Connection (2) I219-V - - domain: '0000' - bus: '00' - slot: '1f' - function: '6' # Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 [Radeon RX 5700 / 5700 XT] - domain: '0000' bus: '03' slot: '00' function: '0' + fix_reset_method: yes # Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 HDMI Audio - domain: '0000' bus: '03' slot: '00' function: '1' - # Micron/Crucial Technology P1 NVMe PCIe SSD - # - alias: ua-nvme1 - # domain: '0000' - # bus: '0b' - # slot: '00' - # function: '0' - usb_device_ids: - - '2dc8:3106' # 8BitDo Ultimate Wireless Controller - - '054c:05c4' # Sony Corp. DualShock 4 [CUH-ZCT1x] - - '046d:c539' # Logitech, Inc. USB Receiver - - '046d:c08d' # Logitech, Inc. G502 LIGHTSPEED Wireless Gaming Mouse + # ASMedia Technology Inc. ASM2142/ASM3142 USB 3.1 Host Controller + - domain: '0000' + bus: '07' + slot: '00' + function: '0' + usb_device_ids: [] keyboards: - # - '/dev/input/by-id/usb-0d3d_USBPS2-event-kbd' - '/dev/input/by-path/platform-i8042-serio-0-event-kbd' mice: [] roles: diff --git a/roles/win10/templates/archlinux_iommu.conf b/roles/win10/templates/archlinux_iommu.conf index a8c3824..6491453 100644 --- a/roles/win10/templates/archlinux_iommu.conf +++ b/roles/win10/templates/archlinux_iommu.conf @@ -2,4 +2,4 @@ title Archlinux w/ VFIO linux /vmlinuz-linux initrd /intel-ucode.img initrd /initramfs-linux.img -options mitigations=off vfio-pci.ids={{ ','.join(vfio_pci_ids) }} intel_iommu=on iommu=pt intel_iommu=igfx_off experimental_zcopytx=1 kvm.ignore_msrs=1 acpi_backlight=none root=LABEL=ARCHLINUX rw +options mitigations=off vfio-pci.ids={{ ','.join(vfio_pci_ids) }} intel_iommu=on iommu=pt intel_iommu=igfx_off hugepages=8192 rcu_nocbs=0-15 split_lock_detect=off kvm.ignore_msrs=1 kvm.report_ignored_msrs=0 root=LABEL=ARCHLINUX rw diff --git a/roles/win10/templates/hooks/qemu b/roles/win10/templates/hooks/qemu index b2148ad..b8965ee 100755 --- a/roles/win10/templates/hooks/qemu +++ b/roles/win10/templates/hooks/qemu @@ -5,22 +5,24 @@ prepare() { # https://github.com/gnif/vendor-reset/issues/46#issuecomment-992282166 {% for pci_device_id in pci_device_ids %} + {% if pci_device_id.fix_reset_method|default(False) %} echo 'device_specific' >'/sys/bus/pci/devices/{{ pci_device_id.domain }}:{{ pci_device_id.bus }}:{{ pci_device_id.slot }}.{{ pci_device_id.function }}/reset_method' + {% endif %} {% endfor %} vfio-isolate -u /tmp/win10.undo \ - drop-caches \ - compact-memory \ - irq-affinity mask C1-3,5-7 \ - cpuset-modify --cpus C0,4 /system.slice \ - cpuset-modify --cpus C0,4 /user.slice \ - cpu-governor performance C0-7 + irq-affinity mask C0-15 \ + cpuset-modify --cpus C16-19 /system.slice \ + cpuset-modify --cpus C16-19 /user.slice \ + cpu-governor performance C0-19 + # drop-caches \ + # compact-memory \ - for _ in $(seq 10); do + # for _ in $(seq 10); do # assign hugepages - sysctl -w vm.nr_overcommit_hugepages=8192 && break - sleep 1 - done + # sysctl -w vm.nr_overcommit_hugepages=8192 && break + # sleep 1 + # done # sleep 10 } diff --git a/roles/win10/templates/win10.xml b/roles/win10/templates/win10.xml index 5a1dee6..2a836bd 100644 --- a/roles/win10/templates/win10.xml +++ b/roles/win10/templates/win10.xml @@ -12,23 +12,47 @@ - 6 + 16 1 - - + + - - + + + + + + + + + + + + + + + + + - + - hvm + hvm /usr/share/ovmf/x64/OVMF_CODE.fd /var/lib/libvirt/qemu/nvram/win10_VARS.fd @@ -37,6 +61,24 @@ + + + @@ -44,23 +86,23 @@ - - + + - + - - + + + destroy - - destroy + restart destroy @@ -70,7 +112,7 @@ /usr/bin/qemu-system-x86_64 - + @@ -91,7 +133,7 @@
- +
@@ -110,7 +152,7 @@ -
+
@@ -211,6 +253,8 @@ {% if 'alias' in pci_device_id %} {% endif %} + +
{% endfor %}