virt-manager A passagem PCI fornece o erro “No IOMMU Found” mesmo com o Intel IOMMU ativado [fechado]

2

Estou tentando configurar a passagem PCI no virt-manager para conceder acesso à VM guest do Debian Wheezy à placa wireless Intel Centrino N do meu laptop.

O kernel padrão da Debian tem o Intel IOMMU habilitado, e eu passei intel_iommu=on para o kernel na inicialização (editando /etc/default/grub e definindo GRUB_CMDLINE_LINUX="intel_iommu=on" , e então executando grub-update ) ...

Olhando para o dmesg para verificar se o IOMMU está de fato ativado, vejo: [ 0.000000] Intel-IOMMU: enabled ...

Eu tentei seguir as instruções aqui , e usou o virsh para desanexar o dispositivo PCI antes de adicioná-lo à VM (ou seja, virsh nodedev-detach pci_0000_01_00_0 ) apenas para ter certeza.

No entanto, não consigo inicializar a VM convidada com a passagem PCI ativada para esta placa sem fio, e estou recebendo o seguinte erro (de /var/log/libvirt/libvirtd.log ):

2014-09-22 04:45:19.325+0000: 2990: error : qemuMonitorOpenUnix:305 : failed to connect to monitor socket: No such process
2014-09-22 04:45:19.325+0000: 2990: error : qemuProcessWaitForMonitor:1593 : internal error process exited while connecting to monitor: char device redirected to /dev/pts/1
**No IOMMU found.  Unable to assign device "hostdev0"
kvm: -device pci-assign,host=01:00.0,id=hostdev0,configfd=22,bus=pci.0,addr=0x7: Device 'pci-assign' could not be initialized**

Aqui está a saída completa de /var/log/libvirt/qemu/ :

2014-09-22 04:10:47.002+0000: starting up
LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin HOME=/ QEMU_AUDIO_DRV=none /usr/bin/kvm -S -M pc-1.1 -cpu Nehalem,+rdtscp,+avx,+osxsave,+xsave,+tsc-deadline,+x2apic,+pdcm,+xtpr,+tm2,+est,+vmx,+ds_cpl,+monitor,+dtes64,+pclmuldq,+pbe,+tm,+ht,+ss,+acpi,+ds,+vme -enable-kvm -m 2500 -smp 4,sockets=4,cores=1,threads=1 -name DebianStableSandbox -uuid c18e2808-c98a-2b4d-54f1-00977d3ec1d2 -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/DebianStableSandbox.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=/var/lib/libvirt/images/DebianNET.img,if=none,id=drive-virtio-disk0,format=raw -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -drive if=none,id=drive-ide0-1-0,readonly=on,format=raw -device ide-cd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev tap,fd=21,id=hostnet0 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:c5:4a:a9,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -device usb-tablet,id=input0 -vnc 127.0.0.1:0 -vga cirrus -device intel-hda,id=sound0,bus=pci.0,addr=0x4 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device pci-assign,host=01:00.0,id=hostdev0,configfd=22,bus=pci.0,addr=0x7 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6
char device redirected to /dev/pts/1
No IOMMU found.  Unable to assign device "hostdev0"
kvm: -device pci-assign,host=01:00.0,id=hostdev0,configfd=22,bus=pci.0,addr=0x7: Device 'pci-assign' could not be initialized
2014-09-22 04:10:47.610+0000: shutting down

Acho que a mensagem "falha ao conectar-se ao monitor" está de alguma forma relacionada. Se eu usar o virt-manager para adicionar a placa wireless como um dispositivo PCI, sem antes desanexar com virsh nodedev-detach (como mencionado acima), recebo uma mensagem de erro do virt-manager dizendo:

Error starting domain: Unable to read from monitor: Connection reset by peer

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 45, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 66, in tmpcb
    callback(*args, **kwargs)
  File "/usr/share/virt-manager/virtManager/domain.py", line 1114, in startup
    self._backend.create()
  File "/usr/lib/python2.7/dist-packages/libvirt.py", line 620, in create
    if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirtError: Unable to read from monitor: Connection reset by peer

... e tudo o que aparece em /var/log/libvirt/libvirtd.log neste caso é: 2014-09-22 04:48:26.387+0000: 2985: error : qemuMonitorIORead:523 : Unable to read from monitor: Connection reset by peer

Caso seja útil, aqui estão alguns resultados relevantes de lspci -v :

00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
    Subsystem: Dell Device 04d8
    Flags: bus master, fast devsel, latency 0
    Capabilities: [e0] Vendor Specific Information: Len=0c <?>
    Kernel driver in use: agpgart-intel

00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b5) (prog-if 00 [Normal decode])
    Flags: bus master, fast devsel, latency 0
    Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
    Memory behind bridge: d1600000-d16fffff
    Capabilities: [40] Express Root Port (Slot+), MSI 00
    Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
    Capabilities: [90] Subsystem: Dell Device 04d8
    Capabilities: [a0] Power Management version 2
    Kernel driver in use: pcieport

01:00.0 Network controller: Intel Corporation Centrino Wireless-N 1030 [Rainbow Peak] (rev 34)
    Subsystem: Intel Corporation Centrino Wireless-N 1030 BGN
    Flags: fast devsel, IRQ 16
    Memory at d1600000 (64-bit, non-prefetchable) [size=8K]
    Capabilities: [c8] Power Management version 3
    Capabilities: [d0] MSI: Enable- Count=1/1 Maskable- 64bit+
    Capabilities: [e0] Express Endpoint, MSI 00
    Capabilities: [100] Advanced Error Reporting
    Capabilities: [140] Device Serial Number bc-77-37-ff-ff-0d-3f-90
    Kernel driver in use: pci-stub

Além disso, só para ficar claro, consegui inicializar essa VM bem antes de adicionar a placa wireless como um dispositivo de passagem PCI e, depois de removê-la pelo virt-manager, tudo volta a funcionar normalmente.

Alguém tem alguma idéia de como corrigir isso? Obrigado!

    
por J. Taylor 22.09.2014 / 07:08

1 resposta

1

Na verdade, acabei de descobrir que este processador suporta VT-x mas não VT-d, então não posso fazer o IOMMU.

    
por 25.09.2014 / 03:59