You are not logged in.
I feel really close but seem to be missing something small,
I have my host as a headless arch system running on my internal graphics (intel i7-4790k integrated defined as default in bios)
I am following the guide at https://wiki.archlinux.org/index.php/PC … h_via_OVMF
I am trying to leave the host headless and then just have the guest vm display on the monitor connected to the 01:00:0 graphics card (my end goal is to have 2 970's each with a vm guest and me and my wife play games on one physical box)
when I go to start the vm guest, I get the following message.
Could not initialize SDL(No available video device) - exiting
I am using pci-stub and then binding to vfio-pci after bootup manually
vfio-bind 0000:01:00.0
vfio-bind 0000:01:00.1
/usr/bin/vfio-bind contains:
#!/bin/bash
modprobe vfio-pci
for dev in "$@"; do
vendor=$(cat /sys/bus/pci/devices/$dev/vendor)
device=$(cat /sys/bus/pci/devices/$dev/device)
if [ -e /sys/bus/pci/devices/$dev/driver ]; then
echo $dev > /sys/bus/pci/devices/$dev/driver/unbind
fi
echo $vendor $device > /sys/bus/pci/drivers/vfio-pci/new_id
done
my grub cmdline is
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on pci-stub.ids=10de:13c2,10de:0fbb i915.enable_hd_vgaarb=1"
/etc/mkinitcpio.conf
MODULES="pci-stub"
/etc/modprobe.d/modprobe.conf:
blacklist nvidia
blacklist nouveau
My QEMU start script
cp /usr/share/edk2.git/ovmf-x64/OVMF_VARS-pure-efi.fd /tmp/my_vars.fd
qemu-system-x86_64 \
-enable-kvm \
-m 2048 \
-cpu host,kvm=off \
-vga none \
-device vfio-pci,host=01:00.0 \
-device vfio-pci,host=01:00.1 \
-drive if=pflash,format=raw,readonly,file=/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd \
-drive if=pflash,format=raw,file=/tmp/my_vars.fd
dmesg|grep -e DMAR -e IOMMU:
[ 0.000000] ACPI: DMAR 0x00000000A4CC7B20 0000B8 (v01 INTEL BDW 00000001 INTL 00000001)
[ 0.000000] DMAR: IOMMU enabled
[ 37.795739] DMAR: Host address width 39
[ 37.795740] DMAR: DRHD base: 0x000000fed90000 flags: 0x0
[ 37.795745] DMAR: dmar0: reg_base_addr fed90000 ver 1:0 cap c0000020660462 ecap f0101a
[ 37.795746] DMAR: DRHD base: 0x000000fed91000 flags: 0x1
[ 37.795748] DMAR: dmar1: reg_base_addr fed91000 ver 1:0 cap d2008c20660462 ecap f010da
[ 37.795749] DMAR: RMRR base: 0x000000a4c35000 end: 0x000000a4c42fff
[ 37.795750] DMAR: RMRR base: 0x000000a7000000 end: 0x000000af1fffff
[ 37.795751] DMAR-IR: IOAPIC id 8 under DRHD base 0xfed91000 IOMMU 1
[ 37.795752] DMAR-IR: HPET id 0 under DRHD base 0xfed91000
[ 37.795752] DMAR-IR: x2apic is disabled because BIOS sets x2apic opt out bit.
[ 37.795753] DMAR-IR: Use 'intremap=no_x2apic_optout' to override the BIOS setting.
[ 37.795948] DMAR-IR: Enabled IRQ remapping in xapic mode
[ 38.036235] DMAR: No ATSR found
[ 38.036285] DMAR: dmar0: Using Queued invalidation
[ 38.036328] DMAR: dmar1: Using Queued invalidation
[ 38.036333] DMAR: Setting RMRR:
[ 38.036340] DMAR: Setting identity map for device 0000:00:02.0 [0xa7000000 - 0xaf1fffff]
[ 38.036838] DMAR: Setting identity map for device 0000:00:14.0 [0xa4c35000 - 0xa4c42fff]
[ 38.036856] DMAR: Setting identity map for device 0000:00:1a.0 [0xa4c35000 - 0xa4c42fff]
[ 38.036869] DMAR: Setting identity map for device 0000:00:1d.0 [0xa4c35000 - 0xa4c42fff]
[ 38.036879] DMAR: Prepare 0-16MiB unity mapping for LPC
[ 38.036884] DMAR: Setting identity map for device 0000:00:1f.0 [0x0 - 0xffffff]
[ 38.036929] DMAR: Intel(R) Virtualization Technology for Directed I/O
[ 47.159241] [drm] DMAR active, disabling use of stolen memory
lspci -nnk:
00:00.0 Host bridge [0600]: Intel Corporation 4th Gen Core Processor DRAM Controller [8086:0c00] (rev 06)
Subsystem: ASUSTeK Computer Inc. Device [1043:8534]
Kernel driver in use: hsw_uncore
00:01.0 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller [8086:0c01] (rev 06)
Kernel driver in use: pcieport
Kernel modules: shpchp
00:02.0 VGA compatible controller [0300]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller [8086:0412] (rev 06)
DeviceName: Onboard IGD
Subsystem: ASUSTeK Computer Inc. Device [1043:8534]
Kernel driver in use: i915
Kernel modules: i915
00:14.0 USB controller [0c03]: Intel Corporation 9 Series Chipset Family USB xHCI Controller [8086:8cb1]
Subsystem: ASUSTeK Computer Inc. Device [1043:8534]
Kernel driver in use: xhci_hcd
Kernel modules: xhci_pci
00:16.0 Communication controller [0780]: Intel Corporation 9 Series Chipset Family ME Interface #1 [8086:8cba]
Subsystem: ASUSTeK Computer Inc. Device [1043:8534]
Kernel driver in use: mei_me
Kernel modules: mei_me
00:19.0 Ethernet controller [0200]: Intel Corporation Ethernet Connection (2) I218-V [8086:15a1]
DeviceName: Onboard LAN
Subsystem: ASUSTeK Computer Inc. Device [1043:85c4]
Kernel driver in use: e1000e
Kernel modules: e1000e
00:1a.0 USB controller [0c03]: Intel Corporation 9 Series Chipset Family USB EHCI Controller #2 [8086:8cad]
Subsystem: ASUSTeK Computer Inc. Device [1043:8534]
Kernel driver in use: ehci-pci
Kernel modules: ehci_pci
00:1c.0 PCI bridge [0604]: Intel Corporation 9 Series Chipset Family PCI Express Root Port 1 [8086:8c90] (rev d0)
Kernel driver in use: pcieport
Kernel modules: shpchp
00:1c.3 PCI bridge [0604]: Intel Corporation 82801 PCI Bridge [8086:244e] (rev d0)
00:1d.0 USB controller [0c03]: Intel Corporation 9 Series Chipset Family USB EHCI Controller #1 [8086:8ca6]
Subsystem: ASUSTeK Computer Inc. Device [1043:8534]
Kernel driver in use: ehci-pci
Kernel modules: ehci_pci
00:1f.0 ISA bridge [0601]: Intel Corporation 9 Series Chipset Family Z97 LPC Controller [8086:8cc4]
Subsystem: ASUSTeK Computer Inc. Device [1043:8534]
Kernel driver in use: lpc_ich
Kernel modules: lpc_ich
00:1f.2 RAID bus controller [0104]: Intel Corporation SATA Controller [RAID mode] [8086:2822]
Subsystem: ASUSTeK Computer Inc. Device [1043:8534]
Kernel driver in use: ahci
Kernel modules: ahci
00:1f.3 SMBus [0c05]: Intel Corporation 9 Series Chipset Family SMBus Controller [8086:8ca2]
Subsystem: ASUSTeK Computer Inc. Device [1043:8534]
Kernel modules: i2c_i801
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM204 [GeForce GTX 970] [10de:13c2] (rev a1)
Subsystem: eVga.com. Corp. Device [3842:2975]
Kernel driver in use: vfio-pci
Kernel modules: nouveau
01:00.1 Audio device [0403]: NVIDIA Corporation GM204 High Definition Audio Controller [10de:0fbb] (rev a1)
Subsystem: eVga.com. Corp. Device [3842:2975]
Kernel driver in use: vfio-pci
Kernel modules: snd_hda_intel
03:00.0 PCI bridge [0604]: ASMedia Technology Inc. ASM1083/1085 PCIe to PCI Bridge [1b21:1080] (rev 04)
Id rather be a noob eager to learn, then a professional closed minded to new information
Offline
You don't use the pci-stub module for -device vfio-pci, but the vfio-pci module, which takes ids just like pci-stub.
If you registered the ids in the kernel command line, you don't need to do that again after boot. Instead, you need to bind it to vfio-pci after you unbind the device from its driver. Although it's not necessary if you blacklisted all the driver it might boot up with, in that case vfio-pci will bind the device when it register the ids automatically.
Offline