Hi ,
I look into the qemu log file ,find that :
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-0.12 -enable-kvm -m 512
-smp 1,sockets=1,cores=1,threads=1 -name vt_d_5 -uuid
05f608a3-f64f-2418-a90a-d611982c8336 -nodefaults -chardev
socket,id=monitor,path=/var/lib/libvirt/qemu/vt_d_5.monitor,server,nowait
-mon chardev=monitor,mode=readline -rtc base=utc -boot c -drive
file=/home/qinguan/exp/kvm_vtd/ubuntu_1.img,if=none,id=drive-virtio-disk0,boot=on,format=raw
-device
virtio-blk-pci,bus=pci.0,addr=0x3,drive=drive-virtio-disk0,id=virtio-disk0
-usb -device usb-mouse,id=input0 -vnc 127.0.0.1:0 -vga cirrus -device
pci-assign,host=00:19.0,id=hostdev0,bus=pci.0,addr=0x4 -device
virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5
Failed to assign irq for "hostdev0": Operation not permitted
Perhaps you are assigning a device that shares an IRQ with another device?
Failed to assign irq for "hostdev0": Operation not permitted
Perhaps you are assigning a device that shares an IRQ with another device?
Failed to assign irq for "hostdev0": Operation not permitted
Perhaps you are assigning a device that shares an IRQ with another device?
Failed to assign irq for "hostdev0": Operation not permitted
Perhaps you are assigning a device that shares an IRQ with another device?
Failed to assign irq for "hostdev0": Operation not permitted
maybe the VM can't access to the network because of Failed to assign irg
for "hostdev0"?
in kern.log :
May 1 12:40:07 Optiplex-780 kernel: [ 3172.784803] e1000e 0000:00:19.0: PCI
INT A disabled
May 1 12:40:07 Optiplex-780 kernel: [ 3172.784863] pci-stub 0000:00:19.0:
claimed by stub
May 1 12:40:07 Optiplex-780 kernel: [ 3173.103965] pci-stub 0000:00:19.0:
PCI INT A -> GSI 21 (level, low) -> IRQ 21
May 1 12:40:07 Optiplex-780 kernel: [ 3173.204030] pci-stub 0000:00:19.0:
restoring config space at offset 0x6 (was 0x1, writing 0xece1)
May 1 12:40:07 Optiplex-780 kernel: [ 3173.204035] pci-stub 0000:00:19.0:
restoring config space at offset 0x5 (was 0x0, writing 0xf7ad9000)
May 1 12:40:07 Optiplex-780 kernel: [ 3173.204039] pci-stub 0000:00:19.0:
restoring config space at offset 0x4 (was 0x0, writing 0xf7ae0000)
May 1 12:40:07 Optiplex-780 kernel: [ 3173.204045] pci-stub 0000:00:19.0:
restoring config space at offset 0x1 (was 0x100000, writing 0x100103)
May 1 12:40:07 Optiplex-780 kernel: [ 3173.435751] assign device 0:0:19.0
May 1 12:44:24 Optiplex-780 kernel: [ 3430.568526] pci-stub 0000:00:19.0:
restoring config space at offset 0x6 (was 0x1, writing 0xece1)
May 1 12:44:24 Optiplex-780 kernel: [ 3430.568532] pci-stub 0000:00:19.0:
restoring config space at offset 0x5 (was 0x0, writing 0xf7ad9000)
May 1 12:44:24 Optiplex-780 kernel: [ 3430.568537] pci-stub 0000:00:19.0:
restoring config space at offset 0x4 (was 0x0, writing 0xf7ae0000)
May 1 12:44:24 Optiplex-780 kernel: [ 3430.568543] pci-stub 0000:00:19.0:
restoring config space at offset 0x1 (was 0x100000, writing 0x100103)
May 1 12:44:24 Optiplex-780 kernel: [ 3430.568561] pci-stub 0000:00:19.0:
PCI INT A disabled
root@Optiplex-780:/var/log/libvirt/qemu# cat /proc/interrupts
CPU0 CPU1 CPU2 CPU3
0: 97 1 2 1 IO-APIC-edge timer
1: 2 0 0 0 IO-APIC-edge i8042
7: 0 0 0 0 IO-APIC-edge
parport0
8: 1 0 0 0 IO-APIC-edge rtc0
9: 0 0 0 0 IO-APIC-fasteoi acpi
12: 1 2 1 0 IO-APIC-edge i8042
16: 0 0 0 0 IO-APIC-fasteoi
uhci_hcd:usb2
17: 5822 1952 3614 2233 IO-APIC-fasteoi
uhci_hcd:usb4, uhci_hcd:usb7
18: 0 0 0 0 IO-APIC-fasteoi
uhci_hcd:usb8
22: 1 1 1 0 IO-APIC-fasteoi
ehci_hcd:usb1, uhci_hcd:usb5
23: 1461 1299 1153 912 IO-APIC-fasteoi
ehci_hcd:usb3, uhci_hcd:usb6
24: 268579 0 0 0 HPET_MSI-edge hpet2
25: 0 286310 0 0 HPET_MSI-edge hpet3
26: 0 0 210675 0 HPET_MSI-edge hpet4
27: 0 0 0 256688 HPET_MSI-edge hpet5
29: 1 0 0 0 DMAR_MSI-edge dmar1
30: 0 0 0 0 DMAR_MSI-edge dmar0
31: 0 0 0 0 DMAR_MSI-edge dmar2
35: 0 0 0 1 PCI-MSI-edge eth1
36: 1456 916 1323 1657 PCI-MSI-edge
eth1-rx-0
37: 1031 772 1459 895 PCI-MSI-edge
eth1-rx-1
38: 958 965 785 470 PCI-MSI-edge
eth1-rx-2
39: 1319 557 1007 714 PCI-MSI-edge
eth1-rx-3
40: 892 864 417 1134 PCI-MSI-edge
eth1-tx-0
41: 414 749 998 606 PCI-MSI-edge
eth1-tx-1
42: 307 921 375 332 PCI-MSI-edge
eth1-tx-2
43: 966 693 396 502 PCI-MSI-edge
eth1-tx-3
54: 7109 5755 5683 5609 PCI-MSI-edge ahci
55: 74 105 73 84 PCI-MSI-edge
hda_intel
56: 1446 927 1108 870 PCI-MSI-edge i915
NMI: 0 0 0 0 Non-maskable interrupts
LOC: 740 725 703 677 Local timer interrupts
SPU: 0 0 0 0 Spurious interrupts
PMI: 0 0 0 0 Performance monitoring
interrupts
PND: 0 0 0 0 Performance pending work
RES: 665 679 714 547 Rescheduling interrupts
CAL: 5332 408 5619 539 Function call interrupts
TLB: 1880 2843 1788 3202 TLB shootdowns
TRM: 0 0 0 0 Thermal event interrupts
THR: 0 0 0 0 Threshold APIC interrupts
MCE: 0 0 0 0 Machine check exceptions
MCP: 5 5 5 5 Machine check polls
ERR: 3
MIS: 0
root@Optiplex-780:/var/log/libvirt/qemu#
I search the similarly problems that sharing the irg but never find a
answer , and now I have no idea.
How to solve the problem ,can you help me ? thanks.
best regards,
qinguan
在 2011年5月4日 下午2:55,guan qin <qinguan0619(a)gmail.xn--com>:-0s6m5392c
sorry for missing some information.
I checkd the device that :
# readlink /sys/bus/pci/devices/0000\:00\:19.0/driver
../../../bus/pci/drivers/pci-stub
the device has been already claimed by pci-stub and under the control of
pci_stub.
so the reason that can't up the eth in VM maybe has nothing to do with the
libvirt version.
After doing the first three
steps:How_to_assign_devices_with_VT-d_in_KVM<http://www.linux-kvm.org/...
(
*1. Modifying kernel config
**2. build kernel
**3. reboot and verify that your system has IOMMU support*
),
I use "virsh create vt_d.xml" instead of the ubind/bind and assign device.
(the kvm and kvm_intel has already been loaded)
should I do something others to use the VT_d?
best regards,
qinguan
在 2011年5月4日 下午2:31,guan qin <qinguan0619(a)gmail.xn--com>:-0s6m5392c
Hi,the libvirt version is 0.8.3, I just used "apt-get install libvirt-bin"
> to install it under debian6.0.1a.
> Is it necessary to install 0.8.4 or higher version ?
>
> Best regards,
> qinguan
>
>
> 在 2011年5月3日 下午4:28,Osier Yang <jyang(a)redhat.xn--com>:-0s6m5392c
>
>> 于 2011年05月03日 15:38, guan qin 写道:
>>
>> > Thanks a lot for your reply sincerely!
>> > Actually ,if I do as what
>> >
http://www.linux-kvm.org/page/How_to_assign_devices_with_VT-d_in_KVMsaid,:
>> > "
>> > # echo "8086 10b9" > /sys/bus/pci/drivers/pci-stub/new_id
>> > # echo 0000:01:00.0 > /sys/bus/pci/devices/0000:01:00.0/driver/unbind
>> > # echo 0000:01:00.0 > /sys/bus/pci/drivers/pci-stub/bind
>> > "
>> > Then I can assign a NIC to the VM ,and the VM also can use the NIC to
>> > access the network.
>> > But , according the libvirt guide that
>> >
http://libvirt.org/formatdomain.html#elementsUSB shows:
>> > "
>> > When |managed| is "yes" for a PCI device, it is detached from the
host
>> > before being passed on to the guest.
>> > "
>> > So should I still "unbind " the device from the host OS driver
first ?
>> > If that ,What's the "detached" meaning ? thanks.
>> > best regards,
>> > qinguan
>>
>> libvirt trys to detach the PCI device from host as preparation when
>> starting up the domain, and it also binds the device to pci_stub
>> driver, so it's strange that you need to do it manually? what's
>> your libvirt version?
>>
>> > 在 2011年5月3日 上午8:47,David White <dwhite(a)speakeasy.net
>> > <mailto:dwhite@speakeasy.net>>写道:
>> >
>> >
>> > did you 'unbind' the device from the host OS driver?
>> >
>> >
>> > On 05/01/2011 01:38 AM, guan qin wrote:
>> >> Hi,
>> >>
>> >> I encounter a problem that the eth can't be up in the VM by
using
>> >> VT-d.
>> >> I boot the VM using "virsh create vt_d.xml".
>> >> The VM could recongize the NIC which was assigned .then I do in VM
>> >> as follows:
>> >> #cat /sys/class/net/eth0/operstate
>> >> down
>> >> #ifconfig eth0 up
>> >> #cat /sys/class/net/eth0/operstate
>> >> down
>> >> #ficonfig eth 10.100.0.5
>> >> #cat /sys/class/net/eth0/operstate
>> >> down
>> >> more system information is attached.(uname 、ifconfig 、lspci、
>> >> cmdline...)
>> >>
>> >> I can't figure out the reason why the eth is still down? can
>> >> anyone help me ?
>> >>
>> >> best regards,
>> >> qinguan
>> >>
>> >>
>> >>
>> >> vt_d.xml:
>> >> <domain type='kvm'>
>> >> <name>test</name>
>> >> <description>just test using sriov!</description>
>> >> <os>
>> >> <type>hvm</type>
>> >> <boot dev='hd'/>
>> >> </os>
>> >> <memory>524288</memory>
>> >> <currentMemory>524288</currentMemory>
>> >> <on_poweroff>destroy</on_poweroff>
>> >> <on_reboot>restart</on_reboot>
>> >> <on_crash>restart</on_crash>
>> >>
>> >>
<features><pae/><acpi/><apic/></features>
>> >> <clock offset='utc'/>
>> >> <devices>
>> >> <input type='mouse' bus='usb'/>
>> >> <disk type='file' device='disk'>
>> >> <source file='/home/qinguan/exp/ubuntu_1.img'/>
>> >> <target dev='hda' bus='virtio'/>
>> >> </disk>
>> >> <emulator>/usr/bin/kvm</emulator>
>> >> <graphics type='vnc' port='-1'/>
>> >> <hostdev mode='subsystem' type='pci'
managed='yes'>
>> >> <source>
>> >> <address bus='0x0' slot='0x19'
function='0x0'/>
>> >> </source>
>> >> </hostdev>
>> >> </devices>
>> >> </domain>
>> >>
>> >>
>> >> _______________________________________________
>> >> libvirt-users mailing list
>> >> libvirt-users(a)redhat.com <mailto:libvirt-users@redhat.com>
>> >>
https://www.redhat.com/mailman/listinfo/libvirt-users
>> >
>> >
>> >
>> >
>> > _______________________________________________
>> > libvirt-users mailing list
>> > libvirt-users(a)redhat.com
>> >
https://www.redhat.com/mailman/listinfo/libvirt-users
>>
>>
>