All of lore.kernel.org
 help / color / mirror / Atom feed
* MSI message data register configuration in Xen guests
@ 2012-06-26  2:38 Deep Debroy
  2012-06-26  2:51 ` Rolu
  0 siblings, 1 reply; 11+ messages in thread
From: Deep Debroy @ 2012-06-26  2:38 UTC (permalink / raw)
  To: xen-devel

Hi, I was playing around with a MSI capable virtual device (so far
submitted as patches only) in the upstream qemu tree but having
trouble getting it to work on a Xen hvm guest. The device happens to
be a QEMU implementation of VMWare's pvscsi controller. The device
works fine in a Xen guest when I switch the device's code to force
usage of legacy interrupts with upstream QEMU. With MSI based
interrupts, the device works fine on a KVM guest but as stated before,
not on a Xen guest. After digging a bit, it appears, the reason for
the failure in Xen guests is that the MSI data register in the Xen
guest ends up with a value of 4300 where the Deliver Mode value of 3
happens to be reserved (per spec) and therefore illegal. The
vmsi_deliver routine in Xen rejects MSI interrupts with such data as
illegal (per expectation) causing all commands issued by the guest OS
on the device to timeout.

Given this above scenario, I was wondering if anyone can shed some
light on how to debug this further for Xen. Something I would
specifically like to know is where the MSI data register configuration
actually happens. Is it done by some code specific to Xen and within
the Xen codebase or it all done within QEMU?

Thanks,
Deep

P.S. some details on the device's PCI configuration:

lspci output for a working instance in KVM:

00:07.0 SCSI storage controller: VMware PVSCSI SCSI Controller
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 255
Interrupt: pin A routed to IRQ 45
Region 0: Memory at febf0000 (32-bit, non-prefetchable) [size=32K]
Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+
Address: 00000000fee0300c  Data: 4161
Kernel driver in use: vmw_pvscsi
Kernel modules: vmw_pvscsi

Here is the lspci output for the scenario where it's failing to work in Xen:

00:04.0 SCSI storage controller: VMware PVSCSI SCSI Controller
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 255
Interrupt: pin A routed to IRQ 80
Region 0: Memory at f3020000 (32-bit, non-prefetchable) [size=32K]
Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+
Address: 00000000fee36000  Data: 4300
Kernel driver in use: vmw_pvscsi
Kernel modules: vmw_pvscsi

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

end of thread, other threads:[~2012-07-03 10:28 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-26  2:38 MSI message data register configuration in Xen guests Deep Debroy
2012-06-26  2:51 ` Rolu
2012-06-27 23:18   ` Deep Debroy
2012-06-28 20:52     ` Deep Debroy
2012-06-29 11:10       ` Stefano Stabellini
2012-07-03  5:54         ` Deep Debroy
2012-07-03 10:20           ` Stefano Stabellini
2012-07-03 10:28       ` [PATCH] xen: event channel remapping for emulated MSIs Stefano Stabellini
2012-06-28 20:52   ` MSI message data register configuration in Xen guests Konrad Rzeszutek Wilk
2012-06-28 21:26     ` Deep Debroy
2012-06-28 21:27     ` Rolu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.