public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* Re: Test with VT-d patches
@ 2008-09-04  8:58 gg
  2008-09-04  9:12 ` Han, Weidong
  0 siblings, 1 reply; 14+ messages in thread
From: gg @ 2008-09-04  8:58 UTC (permalink / raw)
  To: amit.shah; +Cc: sheng.yang, weidong.han, kvm

Hello,

I try to explain the current state on my pc.

1) The patch KVM 1/2 was applied with the following change.
   The files "drivers/pci/iova.h" and "drivers/pci/intel-iommu.h" already exists.
   And I get both files rejected.
   So I take the headers from the KVM 1/2 Patchfile and use these a "iova.h" and "intel-iommu.h".
   Kernel compiles without errors.

2) What known bug is in the latest userspace patchfile? (Told by Yang, Sheng)


>Hello,
>
>* On Wednesday 03 September 2008 14:07:36 gg@seh.de wrote:
>> Hi,
>>
>> i make some more tests with
>> 1) an old APCI1500/PCI card no linux driver support -> so i don't need to
>> unload the module. 2) my second network-card Realtek 10/100 MBit.
>>
>> Both don't work at all. Only my first gigabit-onboard-network-card starts.
>>
>> Here the output from userspace/dmesg:
>>
>>
>> 1) // Applied Micro Circuits Corp. APCI1500 Signal processing controller
>>
>> Warning: No DNS servers found
>> Registered host PCI device 03:00.0 ("03:00.0") as guest device 00:03.0
>> assigned_dev_update_irq: Input/output error
>> assigned_dev_update_irq: Input/output error
>
>This means the devices shares the irq with some other device in the system. 
>See the "lspci -v" output for details.
>
>> 2) // 03:02.0 Ethernet controller: Realtek Semiconductor Co., Ltd.
>> RTL-8139/8139C/8139C+ (rev 10) Registered host PCI device 03:02.0
>> ("03:02.0") as guest device 00:03.0 assigned_dev_update_irq: Input/output
>> error
>>
>> [  369.195971] pci 0000:03:02.0: PCI INT A -> GSI 18 (level, low) -> IRQ 18
>> [  369.326026] kvm_vm_ioctl_assign_irq: couldn't allocate irq for pv device
>
>Same error.
>
>> Sould i update the BIOS if possible/available?
>
>That's not necessary. We don't support assigning devices that share the irq on 
>
>the host with some other device. You can try inserting one device at a time 
>and try different PCI slots.
>
>> Could it be a problem with the already assigned patches? (See the first
>> E-Mail :The VTD [PATCH1/2] seems already be applied. )
>
>No patches have already been applied to any tree. You'll definitely have to 
>apply the 1/2 patch as well.

Ok. On both PCI-Cards (1) APCI1500 Signal processing controller and (2) Realtek NIC
the IRQ is shared with my USB-UHCI-Controller.
On this PC there is no PS2-Connector (USB-Mouse/USB-Keyboard). 
When I unload the usb module on the host, I can not handle the system anymore.

I can start qemu/kvm remote over a serial-console. But then I cannot use the guest system without keyboard/mouse. (login and so)

"Han, Weidong" told to use IRQF_SHARED in reqeust_irq(). In which code?

Both tests are only made to get an idea how it works with other devices.

My primary efforts are to use my onboard Gigabit with VT-d direct on the Windows guest-system. This device don't share the IRQ with an other device.
But I have the problems with:
1) slow down the complete system and generate this Unbalanced IRQ 21 messages.
2) Packet statistic under windows shows on this device no package traffic in live-network. (no ping etc. possible)

Thanks for your hints.

Gregor

^ permalink raw reply	[flat|nested] 14+ messages in thread
* Re: Test with VT-d patches
@ 2008-09-04 13:48 gg
  0 siblings, 0 replies; 14+ messages in thread
From: gg @ 2008-09-04 13:48 UTC (permalink / raw)
  To: sheng.yang; +Cc: weidong.han, amit.shah, kvm

Hello,

with the hint/patches from "Han, Weidong" I cound correct my system-build and now the NIC works fine under Windows.
Only the "Unbalanced enables for IRQ 21" (my pci-passed throug Gigabit NIC)commes nearly endless. (not importend for me)

I am happy now.
Thanks all,

Gregor


>On Thursday 04 September 2008 17:12:28 Han, Weidong wrote:
>> gg@seh.de wrote:
>> > Hello,
>> >
>> > I try to explain the current state on my pc.
>> >
>> > 1) The patch KVM 1/2 was applied with the following change.
>> >    The files "drivers/pci/iova.h" and "drivers/pci/intel-iommu.h"
>> >    already exists. And I get both files rejected.
>> >    So I take the headers from the KVM 1/2 Patchfile and use these a
>> >    "iova.h" and "intel-iommu.h". Kernel compiles without errors.
>> >
>> > 2) What known bug is in the latest userspace patchfile? (Told by
>> > Yang, Sheng)
>>
>
>I think it's mentioned by Ben that userspace patch refer a kvm fd before it 
>was initialized correctly. (patch at 2008-08-26, Hope I don't miss any update 
>
>on this... ) 
>
>> in add_assigned_device(), you can simply comment out some lines between
>> following #ifdef and #endif as follows.
>>
>> +#ifdef KVM_CAP_IOMMU
>> //+	r = kvm_check_extension(kvm_context, KVM_CAP_IOMMU);
>> //+	if (r)
>> +		assigned_devices[nr_assigned_devices].dma |=
>> +			KVM_DEV_ASSIGN_ENABLE_IOMMU;
>> +
>> //+	r = get_param_value(dma, sizeof dma, "dma", arg);
>> //+	if (r && !strncmp(dma, "none", 4)) {
>> //+		assigned_devices[nr_assigned_devices].dma &=
>> //+			~KVM_DEV_ASSIGN_ENABLE_IOMMU;
>> +	}
>> +#endif
>>
>
>Yeah, as this workaround.
>
>> Randy (Weidong)
>>
>> >> Hello,
>> >>
>> >> * On Wednesday 03 September 2008 14:07:36 gg@seh.de wrote:
>> >>> Hi,
>> >>>
>> >>> i make some more tests with
>> >>> 1) an old APCI1500/PCI card no linux driver support -> so i don't
>> >>> need to unload the module. 2) my second network-card Realtek 10/100
>> >>> MBit.
>> >>>
>> >>> Both don't work at all. Only my first gigabit-onboard-network-card
>> >>> starts.
>> >>>
>> >>> Here the output from userspace/dmesg:
>> >>>
>> >>>
>> >>> 1) // Applied Micro Circuits Corp. APCI1500 Signal processing
>> >>> controller
>> >>>
>> >>> Warning: No DNS servers found
>> >>> Registered host PCI device 03:00.0 ("03:00.0") as guest device
>> >>> 00:03.0 assigned_dev_update_irq: Input/output error
>> >>> assigned_dev_update_irq: Input/output error
>> >>
>> >> This means the devices shares the irq with some other device in the
>> >> system. See the "lspci -v" output for details.
>> >>
>> >>> 2) // 03:02.0 Ethernet controller: Realtek Semiconductor Co., Ltd.
>> >>> RTL-8139/8139C/8139C+ (rev 10) Registered host PCI device 03:02.0
>> >>> ("03:02.0") as guest device 00:03.0 assigned_dev_update_irq:
>> >>> Input/output error
>> >>>
>> >>> [  369.195971] pci 0000:03:02.0: PCI INT A -> GSI 18 (level, low)
>> >>> -> IRQ 18 [  369.326026] kvm_vm_ioctl_assign_irq: couldn't allocate
>> >>> irq for pv device
>> >>
>> >> Same error.
>> >>
>> >>> Sould i update the BIOS if possible/available?
>> >>
>> >> That's not necessary. We don't support assigning devices that share
>> >> the irq on
>> >>
>> >> the host with some other device. You can try inserting one device at
>> >> a time and try different PCI slots.
>> >>
>> >>> Could it be a problem with the already assigned patches? (See the
>> >>> first E-Mail :The VTD [PATCH1/2] seems already be applied. )
>> >>
>> >> No patches have already been applied to any tree. You'll definitely
>> >> have to apply the 1/2 patch as well.
>> >
>> > Ok. On both PCI-Cards (1) APCI1500 Signal processing controller and
>> > (2) Realtek NIC
>> > the IRQ is shared with my USB-UHCI-Controller.
>> > On this PC there is no PS2-Connector (USB-Mouse/USB-Keyboard).
>> > When I unload the usb module on the host, I can not handle the system
>> > anymore.
>
>Well, another choice is use VNC from anyother machine. 
>
>> >
>> > I can start qemu/kvm remote over a serial-console. But then I cannot
>> > use the guest system without keyboard/mouse. (login and so)
>> >
>> > "Han, Weidong" told to use IRQF_SHARED in reqeust_irq(). In which
>> > code?
>
>kvm_vm_ioctl_assign_irq() in x86.c. But for you are using keyboard and mouse, 
>
>I think it would cause chaos? Maybe you can tell USB 2.0 controller apart 
>from USB 1.1, and just unload 2.0 ones. The USB 1.1 is UHCI while 2.0 is 
>EHCI, the drivers can be made as modules.
>
>> >
>> > Both tests are only made to get an idea how it works with other
>> > devices.
>> >
>> > My primary efforts are to use my onboard Gigabit with VT-d direct on
>> > the Windows guest-system. This device don't share the IRQ with an
>> > other device. But I have the problems with: 1) slow down the complete
>> > system and generate this Unbalanced IRQ 21 messages. 2) Packet
>> > statistic under windows shows on this device no package traffic in
>> > live-network. (no ping etc. possible)
>
>No clue, if you ensure that you've got latest version of patch... I think it 
>was posted by Amit at 2008-08-26.
>
>BTW: Can you try a new Linux guest if possible? 
>
>-- 
>regards
>Yang, Sheng
>
>> >
>> > Thanks for your hints.
>> >
>> > Gregor

^ permalink raw reply	[flat|nested] 14+ messages in thread
[parent not found: <22586672.111841220431056001.JavaMail.servlet@kundenserver>]
* Re: Test with VT-d patches
@ 2008-09-02 18:40 gg
  2008-09-03  0:57 ` Yang, Sheng
  0 siblings, 1 reply; 14+ messages in thread
From: gg @ 2008-09-02 18:40 UTC (permalink / raw)
  To: kronos.it; +Cc: sheng.yang, weidong.han, kvm

Hi, 


>On Tue, Sep 2, 2008 at 4:17 PM,  <gg@seh.de> wrote:
>> Hi,
>>
>> here comes a small part of the dmesg output. Qemu/KVM produces now a CPU 
>usage
>> of about 90%.
>>
>>
>> Sep  2 11:27:35 ubuntu klogd: [  335.057707] ------------[ cut here 
>]------------
>> Sep  2 11:27:35 ubuntu klogd: [  335.057711] WARNING: at 
>kernel/irq/manage.c:180 __enable_irq+0x34/0x80()
>> Sep  2 11:27:35 ubuntu klogd: [  335.057713] Unbalanced enable for IRQ 21
>[...]
>> This messages comes endless.
>> Something with IRQs?
>
>Hum, seems that interrupt has already been enabled... did you load the
>driver for the NIC in the host? With pass-through the device is
>"owned" by the guest.

No.
The driver was not loaded. 
It is not possible to start qemu with a pci-device used by the host.
(I try this with the second network device.)

Can this interrupt be shared with an other IRQ?

Gregor

^ permalink raw reply	[flat|nested] 14+ messages in thread
[parent not found: <20301128.193551220365059586.JavaMail.servlet@kundenserver>]
* Test with VT-d patches
@ 2008-09-02  8:44 gg
  2008-09-02 11:34 ` Yang, Sheng
  0 siblings, 1 reply; 14+ messages in thread
From: gg @ 2008-09-02  8:44 UTC (permalink / raw)
  To: kvm

Hi,

i am interested in the use of the new VT-d hardware feature.
My Dell-PC "OPTIPLEX" is capable for this.
The Linux-System was an Ubuntu-8.10 (AMD64) with the current
Linux-Kernel from the KVM-Kernel GIT repository. (2.6.27-rc4)
To use VT-d i download kvm-74 and take the patches from "Amit Shah".
1) The KVM/userspace [PATCH1/1] was applied without errors.
2) The VTD [PATCH1/2] seems already be applied.
3) The VTD [PATCH2/2] was applied without errors.

Now I use the command line option -pcidevice dev=00:03.19 to pass the
Intel Pro Gigabit Network Device to my WindowsXP Guest-System.

Qemu told me something like: "passing 00:03.19 as device 00:03.00 to the guest system". Windows starts normally fast. But then its slow rapidly down. My mouse stops for about 10sec and then goes again for 1sec.

Windows remember the new hardware correctly. And after i install the new driver, the system seems to go a little bit faster.

But the problem was, that no ping or other network packages was send/received. 

What can i do to find the problem? (Debugging?)

Regards,

Gregor Glomm

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2008-09-04 13:48 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-04  8:58 Test with VT-d patches gg
2008-09-04  9:12 ` Han, Weidong
2008-09-04  9:33   ` Yang, Sheng
  -- strict thread matches above, loose matches on Subject: below --
2008-09-04 13:48 gg
     [not found] <22586672.111841220431056001.JavaMail.servlet@kundenserver>
2008-09-03  8:56 ` Yang, Sheng
2008-09-03  9:02 ` Han, Weidong
2008-09-03  9:02 ` Amit Shah
2008-09-02 18:40 gg
2008-09-03  0:57 ` Yang, Sheng
     [not found] <20301128.193551220365059586.JavaMail.servlet@kundenserver>
2008-09-02 14:36 ` Luca Tettamanti
2008-09-03  3:28 ` Han, Weidong
2008-09-02  8:44 gg
2008-09-02 11:34 ` Yang, Sheng
2008-09-02 13:37   ` Han, Weidong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox