You are not logged in.
Hi everyone,
I'm trying to install a Windows VM using KVM/QEMU and VFIO and PCI passthrough resources.
I've read the tutorials I found here, here and here.
This is my hardware:
Motherboard: Gigabyte GA-B75M-D3H
CPU: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
Primary VGA: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller (i915)
Secondary (passed through) VGA: GTX 680
Monitor: BenQ XL2420T
As for the kernel, I've already seen this, but since I'm stuck in such an early stage of the process, I don't think a broken kernel has necessarily to do with it.
Kernel:
[xleonardox@pequod ~]$ uname -a
Linux pequod 4.2.4-1-ARCH #1 SMP PREEMPT Fri Oct 23 07:32:38 CEST 2015 x86_64 GNU/LinuxQEMU
[xleonardox@pequod ~]$ qemu-system-x86_64 -version
(process:4019): GLib-WARNING **: gmem.c:482: custom memory allocation vtable not supported
QEMU emulator version 2.4.0.1, Copyright (c) 2003-2008 Fabrice BellardThere's a couple of extra parameters in my cmdline because I dual boot my Arch install with a Hackintosh. This is the way I found to boot via EFI.
[xleonardox@pequod ~]$ cat /proc/cmdline
vmlinuz-linux dart=0 darkwake=0 kext-dev-mode=1 nvda_drv=1 root=UUID=163f32ba-fc90-456a-b9ef-853b98cdd39d resume=UUID=a819ecdf-ed99-464d-bd8e-329da2183854 rw add_efi_memmap intel_iommu=on initrd=/initramfs-linux.imgIOMMU GROUPS
[xleonardox@pequod ~]$ find /sys/kernel/iommu_groups/ -type l
/sys/kernel/iommu_groups/0/devices/0000:00:00.0
/sys/kernel/iommu_groups/1/devices/0000:00:01.0
/sys/kernel/iommu_groups/1/devices/0000:01:00.0
/sys/kernel/iommu_groups/1/devices/0000:01:00.1
/sys/kernel/iommu_groups/2/devices/0000:00:02.0
/sys/kernel/iommu_groups/3/devices/0000:00:14.0
/sys/kernel/iommu_groups/4/devices/0000:00:16.0
/sys/kernel/iommu_groups/5/devices/0000:00:1a.0
/sys/kernel/iommu_groups/6/devices/0000:00:1b.0
/sys/kernel/iommu_groups/7/devices/0000:00:1c.0
/sys/kernel/iommu_groups/8/devices/0000:00:1c.4
/sys/kernel/iommu_groups/9/devices/0000:00:1d.0
/sys/kernel/iommu_groups/10/devices/0000:00:1e.0
/sys/kernel/iommu_groups/11/devices/0000:00:1f.0
/sys/kernel/iommu_groups/11/devices/0000:00:1f.2
/sys/kernel/iommu_groups/11/devices/0000:00:1f.3
/sys/kernel/iommu_groups/12/devices/0000:03:00.0[xleonardox@pequod ~]$ dmesg|grep -e DMAR -e IOMMU
[ 0.000000] ACPI: DMAR 0x00000000C5D42850 0000B8 (v01 INTEL SNB 00000001 INTL 00000001)
[ 0.000000] DMAR: IOMMU enabled
[ 0.024287] DMAR: Host address width 36
[ 0.024289] DMAR: DRHD base: 0x000000fed90000 flags: 0x0
[ 0.024296] DMAR: dmar0: reg_base_addr fed90000 ver 1:0 cap c0000020e60262 ecap f0101a
[ 0.024297] DMAR: DRHD base: 0x000000fed91000 flags: 0x1
[ 0.024300] DMAR: dmar1: reg_base_addr fed91000 ver 1:0 cap c9008020660262 ecap f0105a
[ 0.024301] DMAR: RMRR base: 0x000000c5bc3000 end: 0x000000c5bcffff
[ 0.024302] DMAR: RMRR base: 0x000000c7800000 end: 0x000000cf9fffff
[ 0.024304] DMAR-IR: IOAPIC id 2 under DRHD base 0xfed91000 IOMMU 1
[ 0.024304] DMAR-IR: HPET id 0 under DRHD base 0xfed91000
[ 0.024305] DMAR-IR: Queued invalidation will be enabled to support x2apic and Intr-remapping.
[ 0.024533] DMAR-IR: Enabled IRQ remapping in x2apic mode
[ 0.284348] DMAR: No ATSR found
[ 0.284417] DMAR: dmar0: Using Queued invalidation
[ 0.284771] DMAR: dmar1: Using Queued invalidation
[ 0.284777] DMAR: Setting RMRR:
[ 0.284786] DMAR: Setting identity map for device 0000:00:02.0 [0xc7800000 - 0xcf9fffff]
[ 0.285324] DMAR: Setting identity map for device 0000:00:14.0 [0xc5bc3000 - 0xc5bcffff]
[ 0.285339] DMAR: Setting identity map for device 0000:00:1a.0 [0xc5bc3000 - 0xc5bcffff]
[ 0.285352] DMAR: Setting identity map for device 0000:00:1d.0 [0xc5bc3000 - 0xc5bcffff]
[ 0.285360] DMAR: Prepare 0-16MiB unity mapping for LPC
[ 0.285365] DMAR: Setting identity map for device 0000:00:1f.0 [0x0 - 0xffffff]
[ 0.285686] DMAR: Intel(R) Virtualization Technology for Directed I/O
[ 0.345658] [drm] DMAR active, disabling use of stolen memory
[ 4.436520] vboxpci: IOMMU foundI've got this in my mkinitcpio.conf
MODULES="i915 vfio vfio_iommu_type1 vfio_pci vfio_virqfd"[xleonardox@pequod ~]$ lsmod | grep vfio
vfio_pci 32768 0
vfio_virqfd 16384 1 vfio_pci
vfio_iommu_type1 20480 0
vfio 24576 2 vfio_iommu_type1,vfio_pciHere's the significant part of a lspci:
00:00.0 Host bridge [0600]: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor DRAM Controller [8086:0150] (rev 09)
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK104 [GeForce GTX 680] [10de:1180] (rev a1)
01:00.1 Audio device [0403]: NVIDIA Corporation GK104 HDMI Audio Controller [10de:0e0a] (rev a1)01:00.0 0300: 10de:1180 (rev a1)
Subsystem: 1458:353c
Kernel driver in use: vfio-pci
Kernel modules: nouveau
01:00.1 0403: 10de:0e0a (rev a1)
Subsystem: 1458:353c
Kernel driver in use: vfio-pci
Kernel modules: snd_hda_intel[xleonardox@pequod ~]$ cat /etc/modprobe.d/vfio.conf
options vfio-pci ids=10de:1180,10de:0e0aBefore running KVM.
[xleonardox@pequod ~]$ dmesg | grep -i vfio
[ 0.571102] VFIO - User Level meta-driver version: 0.3
[ 0.583832] vfio_pci: add [10de:1180[ffff:ffff]] class 0x000000/00000000
[ 0.597174] vfio_pci: add [10de:0e0a[ffff:ffff]] class 0x000000/00000000After running KVM.
[xleonardox@pequod ~]$ dmesg | grep vfio
[ 0.583832] vfio_pci: add [10de:1180[ffff:ffff]] class 0x000000/00000000
[ 0.597174] vfio_pci: add [10de:0e0a[ffff:ffff]] class 0x000000/00000000
[ 3182.192258] vfio-pci 0000:01:00.0: enabling device (0000 -> 0003)
[ 3182.192386] vfio_ecap_init: 0000:01:00.0 hiding ecap 0x19@0x900[xleonardox@pequod ~]$ dmesg | grep vgaarb
[ 0.186604] vgaarb: setting as boot device: PCI:0000:00:02.0
[ 0.186605] vgaarb: device added: PCI:0000:00:02.0,decodes=io+mem,owns=io+mem,locks=none
[ 0.186608] vgaarb: device added: PCI:0000:01:00.0,decodes=io+mem,owns=none,locks=none
[ 0.186609] vgaarb: loaded
[ 0.186610] vgaarb: bridge control possible 0000:01:00.0
[ 0.186610] vgaarb: no bridge control possible 0000:00:02.0
[ 0.345717] vgaarb: device changed decodes: PCI:0000:00:02.0,olddecodes=io+mem,decodes=none:owns=io+mem
[ 0.572405] vgaarb: device changed decodes: PCI:0000:01:00.0,olddecodes=io+mem,decodes=io+mem:owns=none
[ 13.193732] vgaarb: device changed decodes: PCI:0000:01:00.0,olddecodes=io+mem,decodes=io+mem:owns=none
[ 13.206373] vgaarb: device changed decodes: PCI:0000:01:00.0,olddecodes=io+mem,decodes=io+mem:owns=none
[ 2319.146020] vgaarb: device changed decodes: PCI:0000:01:00.0,olddecodes=io+mem,decodes=io+mem:owns=none
[ 2319.159069] vgaarb: device changed decodes: PCI:0000:01:00.0,olddecodes=io+mem,decodes=io+mem:owns=none- I've already blacklisted nouveau.
- I've also tried this:
modprobe -r kvm_intel
modprobe kvm_intel emulate_invalid_guest_state=0- I've tried this parameter on the bootloader:
i915.enable_hd_vgaarb=1- I'm trying to use the same monitor with two different inputs (DVI on Intel and HDMI on GTX 680), and swtiching the inputs as needed.
The trouble I'm having is that once I run KVM (command posted below... I tried to keep it basic, just to have some output and debug my instalation), I get a small qemu screen, but once I switch to the other monitor input I get a "no signal" message. It seems that the passed through VGA just doesn't work...
sudo qemu-system-x86_64 \
-enable-kvm \
-m 8192 \
-vga none \
-cpu host,kvm=off \
-smp 4,sockets=1,cores=4,threads=8 \
-device vfio-pci,host=01:00.0,multifunction=on \
-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.fdI've revised every step of the installation / configuration process. The IOMMU groups are enabled and verified, VGA and audio sssignment is correctly bound (at least it seems correct, judging by the logs posted). Is there anything I could possibly be doing wrong? Any logs that could help me?
Any help would be appreciated.
Last edited by xlx (2015-11-02 10:43:39)
Offline
Anyone?
Offline