public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* FreeBSD guest with VTD NIC not passing traffic
@ 2011-12-19 14:19 Shashidhar Patil
  2012-01-04  3:21 ` Alex Williamson
  0 siblings, 1 reply; 11+ messages in thread
From: Shashidhar Patil @ 2011-12-19 14:19 UTC (permalink / raw)
  To: kvm

Hi,
       I am running Ubuntu 10.10 (amd64) on a 2 socket  nehalem based
server with IOH 5520. 5520 supports VTD.
I enabled DMAR with intel_iommu=on. The box has intel 82599 adapter
which I assigned through VT-D to FreeBSD 8.2 running
as guest os. The ixgbe driver detects the device and the driver
successfully configures the device. But the link
never comes up. It looks like link up/down interrupts are not
delivered. Then I checked kvm interrupt assignment and as expected
kvm could not make MSI-X entries for the VT-d guest. So no output from
"grep kvm /proc/interrupt". By enabling some debugs in the
qemu-kvm I figured out that the MSI-x updates are not received
properly. It does look like Linux updates MSI-X table in a batch
fashion
which qemu-kvm gets in  one shot and every thing works fine in case of
linux. In case of FreeBSD PCIE updates come /MSI-X entry
which qemu-kvm can't make use.

To overcome this I compiled latest intel ixgbe driver with MSI-X
diabled. This time MSI interrupt got allocated both in the guest
and in the qemu-kvm (host kernel). Still I could not get link UP. I
modified the FreeBSD driver to poll for Link in some local_timer
task. Link comes up but no traffic flows. The MAC statistics show
packets received but packets do not reach the guest.
DMAing of packet may be failing. I could not find out the reason.
The same happens with legacy interrupt allocated in the guest. I even
tried qemu-kvm prefer_msi=off.

I think there are two problems1
1. Interrupt delivery either because of interrupt remapping failure or
all out interrupt allocation failure in qemu-kvm
2. Packets not getting DMAed to the guest possibly because of some DMAR issue.

Before doing VT-d I made sure connections are fine and the adapter
works fine in bare metal Linux.
I also tried VT-d of 82599 with Linux as guest (both 32 bits(PAE and
non-PAE) and amd64) and it just works magically.

Is this a known issue I am hitting with non-Linux guest oses and VT-d
? Appreciate any help in debugging this problem.

-Shashidhar

Linux kernel - 2.6.35
kvm - 0.14.1
CPU - Nehalem
IO chipset - 5520

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

end of thread, other threads:[~2012-01-14 20:25 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-19 14:19 FreeBSD guest with VTD NIC not passing traffic Shashidhar Patil
2012-01-04  3:21 ` Alex Williamson
     [not found]   ` <CADve3d6aTAEK8FqjxVuRnLGu+Efy1rmsb0n5H5rq1G0Eu1s6PA@mail.gmail.com>
2012-01-13 20:26     ` Alex Williamson
2012-01-13 21:00   ` Jan Kiszka
2012-01-13 21:05     ` Alex Williamson
2012-01-13 21:33       ` Jan Kiszka
2012-01-13 21:56         ` Alex Williamson
2012-01-13 22:15           ` Jan Kiszka
2012-01-14  6:46             ` Shashidhar Patil
2012-01-14  9:23               ` Shashidhar Patil
2012-01-14 20:25                 ` Shashidhar Patil

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