Рейтинг:3

VFIO nvidia code 43 несмотря на скрытие виртуальной машины

флаг jp

Я использую Убунту 21.04. У меня AMD Radeon RX550 и Nvidia GTX 1050Ti.

Я пытаюсь настроить сквозную передачу VFIO для карты nvidia на виртуальной машине Windows. Windows сообщает об ошибке с кодом 43 на карте nvidia в диспетчере устройств после установки драйверов nvidia на виртуальной машине, и я застрял с разрешением 800x600 на виртуальной машине.

Основной картой является AMD (то есть та, которая показывает сообщение BIOS при включении физической машины). Я удалил драйвер nvidia, внес в черный список и nvidia, и nouveau. /etc/modprobe.d/nvideoa-graphics-drivers.conf

черный список нвидиа
черный список модерн

в grub я подключаю VFIO-PCI к карте nvidea вот так

GRUB_CMDLINE_LINUX_DEFAULT="intel_iommu=on kvm.ignore_msrs=1 vfio-pci.ids=10de:1c82,10de:0fb9 vfio_iommu_type1.allow_unsafe_interrupts=1 video=vesafb:off video=efifb:off"

Я попытался выполнить эти инструкции, чтобы разрешить код 43. https://mathiashueber.com/fighting-error-43-nvidia-gpu-virtual-machine/

Моя конфигурация виртуальной машины:

<domain type="kvm">
  <name>win10</name>
  <uuid>59656775-5930-11df-bbda-8577d84ed8d3</uuid>
  <metadata>
    <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
      <libosinfo:os id="http://microsoft.com/win/10"/>
    </libosinfo:libosinfo>
  </metadata>
  <memory unit="KiB">8388608</memory>
  <currentMemory unit="KiB">8388608</currentMemory>
  <vcpu placement="static">2</vcpu>
  <os>
    <type arch="x86_64" machine="pc-q35-5.2">hvm</type>
    <loader readonly="yes" secure="yes" type="pflash">/usr/share/OVMF/OVMF_CODE_4M.secboot.fd</loader>
    <nvram>/var/lib/libvirt/qemu/nvram/win10_VARS.fd</nvram>
    <bootmenu enable="no"/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hyperv>
      <relaxed state="on"/>
      <vapic state="on"/>
      <spinlocks state="on" retries="8191"/>
      <vendor_id state="on" value="1234567890ab"/>
    </hyperv>
    <kvm>
      <hidden state="on"/>
    </kvm>
    <vmport state="off"/>
    <smm state="on"/>
    <ioapic driver="kvm"/>
  </features>
  <cpu mode="host-passthrough" check="none" migratable="on">
    <feature policy="disable" name="hypervisor"/>
  </cpu>
  <clock offset="localtime">
    <timer name="rtc" tickpolicy="catchup"/>
    <timer name="pit" tickpolicy="delay"/>
    <timer name="hpet" present="no"/>
    <timer name="hypervclock" present="no"/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <pm>
    <suspend-to-mem enabled="no"/>
    <suspend-to-disk enabled="no"/>
  </pm>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type="file" device="cdrom">
      <driver name="qemu" type="raw"/>
      <source file="/home/maria/Downloads/virtio-win-0.1.185.iso"/>
      <target dev="sdb" bus="sata"/>
      <readonly/>
      <boot order="1"/>
      <address type="drive" controller="0" bus="0" target="0" unit="1"/>
    </disk>
    <disk type="file" device="disk">
      <driver name="qemu" type="qcow2"/>
      <source file="/home/maria/virtual_machines/windows10.qcow2"/>
      <target dev="sdc" bus="sata"/>
      <boot order="2"/>
      <address type="drive" controller="0" bus="0" target="0" unit="2"/>
    </disk>
    <controller type="usb" index="0" model="qemu-xhci" ports="15">
      <address type="pci" domain="0x0000" bus="0x02" slot="0x00" function="0x0"/>
    </controller>
    <controller type="sata" index="0">
      <address type="pci" domain="0x0000" bus="0x00" slot="0x1f" function="0x2"/>
    </controller>
    <controller type="pci" index="0" model="pcie-root"/>
    <controller type="pci" index="1" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="1" port="0x10"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x0" multifunction="on"/>
    </controller>
    <controller type="pci" index="2" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="2" port="0x11"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x1"/>
    </controller>
    <controller type="pci" index="3" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="3" port="0x12"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x2"/>
    </controller>
    <controller type="pci" index="4" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="4" port="0x13"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x3"/>
    </controller>
    <controller type="pci" index="5" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="5" port="0x14"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x4"/>
    </controller>
    <controller type="pci" index="6" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="6" port="0x15"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x5"/>
    </controller>
    <controller type="pci" index="7" model="pcie-to-pci-bridge">
      <model name="pcie-pci-bridge"/>
      <address type="pci" domain="0x0000" bus="0x05" slot="0x00" function="0x0"/>
    </controller>
    <controller type="pci" index="8" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="8" port="0x16"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x6"/>
    </controller>
    <controller type="pci" index="9" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="9" port="0x8"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x0" multifunction="on"/>
    </controller>
    <controller type="pci" index="10" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="10" port="0x9"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x1"/>
    </controller>
    <controller type="pci" index="11" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="11" port="0xa"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x2"/>
    </controller>
    <controller type="pci" index="12" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="12" port="0xb"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x3"/>
    </controller>
    <controller type="pci" index="13" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="13" port="0xc"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x4"/>
    </controller>
    <controller type="pci" index="14" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="14" port="0xd"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x5"/>
    </controller>
    <controller type="pci" index="15" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="15" port="0xe"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x6"/>
    </controller>
    <controller type="pci" index="16" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="16" port="0xf"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x7"/>
    </controller>
    <controller type="pci" index="17" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="17" port="0x17"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x7"/>
    </controller>
    <controller type="pci" index="18" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="18" port="0x18"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x0" multifunction="on"/>
    </controller>
    <controller type="pci" index="19" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="19" port="0x19"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x1"/>
    </controller>
    <controller type="pci" index="20" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="20" port="0x1a"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x2"/>
    </controller>
    <controller type="pci" index="21" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="21" port="0x1b"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x3"/>
    </controller>
    <controller type="pci" index="22" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="22" port="0x1c"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x4"/>
    </controller>
    <controller type="pci" index="23" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="23" port="0x1d"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x5"/>
    </controller>
    <controller type="pci" index="24" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="24" port="0x1e"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x6"/>
    </controller>
    <controller type="virtio-serial" index="0">
      <address type="pci" domain="0x0000" bus="0x03" slot="0x00" function="0x0"/>
    </controller>
    <interface type="network">
      <mac address="52:54:00:70:14:a4"/>
      <source network="default"/>
      <model type="virtio"/>
      <address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
    </interface>
    <serial type="pty">
      <target type="isa-serial" port="0">
        <model name="isa-serial"/>
      </target>
    </serial>
    <console type="pty">
      <target type="serial" port="0"/>
    </console>
    <channel type="spicevmc">
      <target type="virtio" name="com.redhat.spice.0"/>
      <address type="virtio-serial" controller="0" bus="0" port="1"/>
    </channel>
    <input type="tablet" bus="usb">
      <address type="usb" bus="0" port="1"/>
    </input>
    <input type="mouse" bus="ps2"/>
    <input type="keyboard" bus="ps2"/>
    <graphics type="spice" autoport="yes">
      <listen type="address"/>
      <image compression="off"/>
    </graphics>
    <sound model="ich9">
      <address type="pci" domain="0x0000" bus="0x00" slot="0x1b" function="0x0"/>
    </sound>
    <video>
      <model type="none"/>
    </video>
    <hostdev mode="subsystem" type="usb" managed="yes">
      <source>
        <vendor id="0x0461"/>
        <product id="0x4e04"/>
      </source>
      <address type="usb" bus="0" port="4"/>
    </hostdev>
    <hostdev mode="subsystem" type="usb" managed="yes">
      <source>
        <vendor id="0x093a"/>
        <product id="0x2510"/>
      </source>
      <address type="usb" bus="0" port="5"/>
    </hostdev>
    <hostdev mode="subsystem" type="pci" managed="yes">
      <source>
        <address domain="0x0000" bus="0x18" slot="0x00" function="0x0"/>
      </source>
      <rom file="/usr/share/ovmf/GP107.bin"/>
      <address type="pci" domain="0x0000" bus="0x06" slot="0x00" function="0x0"/>
    </hostdev>
    <hostdev mode="subsystem" type="pci" managed="yes">
      <source>
        <address domain="0x0000" bus="0x18" slot="0x00" function="0x1"/>
      </source>
      <address type="pci" domain="0x0000" bus="0x08" slot="0x00" function="0x0"/>
    </hostdev>
    <redirdev bus="usb" type="spicevmc">
      <address type="usb" bus="0" port="2"/>
    </redirdev>
    <redirdev bus="usb" type="spicevmc">
      <address type="usb" bus="0" port="3"/>
    </redirdev>
    <memballoon model="virtio">
      <address type="pci" domain="0x0000" bus="0x04" slot="0x00" function="0x0"/>
    </memballoon>
    <shmem name="looking-glass">
      <model type="ivshmem-plain"/>
      <size unit="M">32</size>
      <address type="pci" domain="0x0000" bus="0x07" slot="0x01" function="0x0"/>
    </shmem>
  </devices>
</domain>

как видите, я скрыл виртуальную машину, и в диспетчере задач Windows 10 под процессором она отображается так, как будто это не виртуальная машина.

Мои группы IOMMU следующие:

Группа IOMMU 0 00:00.0 Хост-мост [0600]: Intel Corporation Core Processor DMI [8086:d130] (версия 11)
IOMMU Group 1 00:03.0 PCI bridge [0604]: Intel Corporation Core Processor PCI Express Root Port 1 [8086:d138] (версия 11)
IOMMU Group 2 00:08.0 Системное периферийное устройство [0880]: регистры управления системой основного процессора Intel Corporation [8086:d155] (версия 11)
IOMMU Group 3 00:08.1 Системное периферийное устройство [0880]: семафор базового процессора Intel Corporation и регистры блокнота [8086:d156] (версия 11)
IOMMU Group 4 00:08.2 Системное периферийное устройство [0880]: регистры системного контроля и состояния процессора Intel Corporation [8086:d157] (версия 11)
IOMMU Group 5 00:08.3 Системное периферийное устройство [0880]: различные регистры процессора Intel Corporation Core [8086:d158] (версия 11)
IOMMU Group 6 00:10.0 Системное периферийное устройство [0880]: Intel Corporation Core Processor QPI Link [8086:d150] (версия 11)
IOMMU Group 6 00:10.1 Системное периферийное устройство [0880]: регистры маршрутизации и протокола QPI основного процессора Intel Corporation [8086:d151] (версия 11)
IOMMU Group 7 00:16.0 Коммуникационный контроллер [0780]: Контроллер HECI набора микросхем Intel Corporation 5 Series/3400 Series [8086:3b64] (версия 06)
IOMMU Group 7 00:16.3 Последовательный контроллер [0700]: Intel Corporation 5 Series/3400 Series Chipset KT Controller [8086:3b67] (версия 06)
IOMMU Group 8 00:19.0 Ethernet-контроллер [0200]: Intel Corporation 82578DM Gigabit Network Connection [8086:10ef] (версия 05)
IOMMU Group 9 00:1a.0 USB-контроллер [0c03]: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller [8086:3b3c] (версия 05)
IOMMU Group 10 00:1b.0 Аудиоустройство [0403]: Набор микросхем Intel Corporation 5 Series/3400 Series High Definition Audio [8086:3b56] (версия 05)
IOMMU Group 11 00:1c.0 Мост PCI [0604]: Набор микросхем Intel Corporation 5 Series/3400 Series Корневой порт PCI Express 1 [8086:3b42] (версия 05)
IOMMU Group 12 00:1c.4 Мост PCI [0604]: Набор микросхем Intel Corporation 5 Series/3400 Series Корневой порт PCI Express 5 [8086:3b4a] (версия 05)
IOMMU Group 13 00:1c.6 Мост PCI [0604]: Набор микросхем Intel Corporation 5 Series/3400 Series Корневой порт PCI Express 7 [8086:3b4e] (версия 05)
IOMMU Group 14 00:1d.0 USB-контроллер [0c03]: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller [8086:3b34] (версия 05)
IOMMU Group 15 00:1e.0 Мост PCI [0604]: Intel Corporation 82801 PCI Bridge [8086:244e] (версия a5)
IOMMU Group 16 00:1f.0 ISA bridge [0601]: Intel Corporation 3450 Chipset LPC Interface Controller [8086:3b16] (версия 05)
IOMMU Group 16 00:1f.2 Контроллер шины RAID [0104]: Контроллер Intel Corporation SATA [Режим RAID] [8086:2822] (версия 05)
IOMMU Group 17 01:00.0 VGA-совместимый контроллер [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Baffin [Radeon RX 550 640SP / RX 560/560X] [1002:67ff] (rev ff)
IOMMU Group 17 01:00.1 Аудиоустройство [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Baffin HDMI/DP Audio [Radeon RX 550 640SP / RX 560/560X] [1002:aae0]
IOMMU Group 18 18:00.0 VGA-совместимый контроллер [0300]: NVIDIA Corporation GP107 [GeForce GTX 1050 Ti] [10de:1c82] (rev a1)
IOMMU Group 18 18:00.1 Аудиоустройство [0403]: Аудиоконтроллер высокой четкости NVIDIA Corporation GP107GL [10de:0fb9] (rev a1)
IOMMU Group 19 3f:00.0 Хост-мост [0600]: архитектура QuickPath Core Processor Intel Corporation Generic Non-Core Registers [8086:2c50] (версия 04)
IOMMU Group 19 3f:00.1 Хост-мост [0600]: Intel Corporation Core Processor Архитектура QuickPath Декодер системного адреса [8086:2c81] (версия 04)
IOMMU Group 20 3f:02.0 Host bridge [0600]: Intel Corporation Core Processor Core Processor Link QPI Link 0 [8086:2c90] (версия 04)
IOMMU Group 20 3f:02.1 Хост-мост [0600]: Intel Corporation Core Processor QPI Physical 0 [8086:2c91] (версия 04)
IOMMU Group 21 3f:03.0 Хост-мост [0600]: интегрированный контроллер памяти процессора Intel Corporation [8086:2c98] (версия 04)
IOMMU Group 21 3f:03.1 Хост-мост [0600]: Core Processor Intel Corporation Интегрированный контроллер памяти Декодер целевого адреса [8086:2c99] (версия 04)
IOMMU Group 21 3f:03.2 Хост-мост [0600]: Тестовые регистры встроенного контроллера памяти процессора Intel Corporation [8086:2c9a] (версия 04)
IOMMU Group 21 3f:03.4 Хост-мост [0600]: Тестовые регистры интегрированного контроллера памяти процессора Intel Corporation [8086:2c9c] (версия 04)
IOMMU Group 22 3f:04.0 Хост-мост [0600]: регистры управления канала 0 встроенного контроллера памяти процессора Intel Core [8086:2ca0] (версия 04)
IOMMU Group 22 3f:04.1 Хост-мост [0600]: Адресные регистры канала 0 встроенного контроллера памяти процессора Intel Corporation [8086:2ca1] (версия 04)
IOMMU Group 22 3f:04.2 Хост-мост [0600]: Регистры ранга канала 0 встроенного контроллера памяти процессора Intel Core [8086:2ca2] (версия 04)
IOMMU Group 22 3f:04.3 Host bridge [0600]: Intel Corporation Core Processor Integrated Memory Controller Channel 0 регистры термоконтроля [8086:2ca3] (версия 04)
IOMMU Group 23 3f:05.0 Хост-мост [0600]: регистры управления канала 1 встроенного контроллера памяти процессора Intel Core [8086:2ca8] (версия 04)
IOMMU Group 23 3f:05.1 Хост-мост [0600]: Адресные регистры канала 1 встроенного контроллера памяти процессора Intel Core [8086:2ca9] (версия 04)
IOMMU Group 23 3f:05.2 Хост-мост [0600]: Регистры ранга канала 1 встроенного контроллера памяти процессора Intel Core [8086:2caa] (версия 04)
IOMMU Group 23 3f:05.3 Host bridge [0600]: Intel Corporation Core Processor Integrated Memory Controller Channel 1 регистры термоконтроля [8086:2cab] (версия 04)

как видите, у каждого устройства есть своя группа IOMMU (это серверная материнская плата).

Ошибок от VFIO в dmesg нет. Я в недоумении, как решить эту проблему, буду признателен за любую помощь.

Ответить или комментировать

Большинство людей не понимают, что склонность к познанию нового открывает путь к обучению и улучшает межличностные связи. В исследованиях Элисон, например, хотя люди могли точно вспомнить, сколько вопросов было задано в их разговорах, они не чувствовали интуитивно связи между вопросами и симпатиями. В четырех исследованиях, в которых участники сами участвовали в разговорах или читали стенограммы чужих разговоров, люди, как правило, не осознавали, что задаваемый вопрос повлияет — или повлиял — на уровень дружбы между собеседниками.