* [BUG] virtio-net linux driver fails to probe on MIPS Malta since 'hw/virtio-pci: fix virtio behaviour'
@ 2017-03-17 21:57 James Hogan
2017-03-20 15:21 ` Marcel Apfelbaum
0 siblings, 1 reply; 6+ messages in thread
From: James Hogan @ 2017-03-17 21:57 UTC (permalink / raw)
To: qemu-devel, Michael S. Tsirkin, Marcel Apfelbaum, Jason Wang,
virtualization
[-- Attachment #1.1: Type: text/plain, Size: 559 bytes --]
Hi,
I've bisected the following failure of the virtio_net linux v4.10 driver
to probe in QEMU v2.9.0-rc1 emulating a MIPS Malta machine:
virtio_net virtio0: virtio: device uses modern interface but does not have VIRTIO_F_VERSION_1
virtio_net: probe of virtio0 failed with error -22
To QEMU commit 9a4c0e220d8a ("hw/virtio-pci: fix virtio behaviour").
It appears that adding ",disable-modern=on,disable-legacy=off" to the
virtio-net -device makes it work again.
I presume this should really just work out of the box. Any ideas why it
isn't?
Cheers
James
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
[-- Attachment #2: Type: text/plain, Size: 183 bytes --]
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [BUG] virtio-net linux driver fails to probe on MIPS Malta since 'hw/virtio-pci: fix virtio behaviour' 2017-03-17 21:57 [BUG] virtio-net linux driver fails to probe on MIPS Malta since 'hw/virtio-pci: fix virtio behaviour' James Hogan @ 2017-03-20 15:21 ` Marcel Apfelbaum 2017-03-20 15:43 ` Michael S. Tsirkin 0 siblings, 1 reply; 6+ messages in thread From: Marcel Apfelbaum @ 2017-03-20 15:21 UTC (permalink / raw) To: James Hogan, qemu-devel, Michael S. Tsirkin, Jason Wang, virtualization On 03/17/2017 11:57 PM, James Hogan wrote: > Hi, > > I've bisected the following failure of the virtio_net linux v4.10 driver > to probe in QEMU v2.9.0-rc1 emulating a MIPS Malta machine: > > virtio_net virtio0: virtio: device uses modern interface but does not have VIRTIO_F_VERSION_1 > virtio_net: probe of virtio0 failed with error -22 > > To QEMU commit 9a4c0e220d8a ("hw/virtio-pci: fix virtio behaviour"). > > It appears that adding ",disable-modern=on,disable-legacy=off" to the > virtio-net -device makes it work again. > > I presume this should really just work out of the box. Any ideas why it > isn't? > Hi, This is strange. This commit changes virtio devices from legacy to virtio "transitional". (your command line changes it to legacy) Linux 4.10 supports virtio modern/transitional (as far as I know) and on QEMU side there is nothing new. Michael, do you have any idea? Thanks, Marcel > Cheers > James > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [BUG] virtio-net linux driver fails to probe on MIPS Malta since 'hw/virtio-pci: fix virtio behaviour' 2017-03-20 15:21 ` Marcel Apfelbaum @ 2017-03-20 15:43 ` Michael S. Tsirkin 2017-03-20 16:02 ` Marcel Apfelbaum 2017-03-21 14:16 ` Marcel Apfelbaum 0 siblings, 2 replies; 6+ messages in thread From: Michael S. Tsirkin @ 2017-03-20 15:43 UTC (permalink / raw) To: Marcel Apfelbaum; +Cc: James Hogan, qemu-devel, virtualization On Mon, Mar 20, 2017 at 05:21:22PM +0200, Marcel Apfelbaum wrote: > On 03/17/2017 11:57 PM, James Hogan wrote: > > Hi, > > > > I've bisected the following failure of the virtio_net linux v4.10 driver > > to probe in QEMU v2.9.0-rc1 emulating a MIPS Malta machine: > > > > virtio_net virtio0: virtio: device uses modern interface but does not have VIRTIO_F_VERSION_1 > > virtio_net: probe of virtio0 failed with error -22 > > > > To QEMU commit 9a4c0e220d8a ("hw/virtio-pci: fix virtio behaviour"). > > > > It appears that adding ",disable-modern=on,disable-legacy=off" to the > > virtio-net -device makes it work again. > > > > I presume this should really just work out of the box. Any ideas why it > > isn't? > > > > Hi, > > > This is strange. This commit changes virtio devices from legacy to virtio "transitional". > (your command line changes it to legacy) > Linux 4.10 supports virtio modern/transitional (as far as I know) and on QEMU side > there is nothing new. > > Michael, do you have any idea? > > Thanks, > Marcel My guess would be firmware mishandling 64 bit BARs - we saw such a case on sparc previously. As a result you are probably reading all zeroes from features register or something like that. Marcel, could you send a patch making the bar 32 bit? If that helps we know what the issue is. > > Cheers > > James > > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [BUG] virtio-net linux driver fails to probe on MIPS Malta since 'hw/virtio-pci: fix virtio behaviour' 2017-03-20 15:43 ` Michael S. Tsirkin @ 2017-03-20 16:02 ` Marcel Apfelbaum 2017-03-21 14:16 ` Marcel Apfelbaum 1 sibling, 0 replies; 6+ messages in thread From: Marcel Apfelbaum @ 2017-03-20 16:02 UTC (permalink / raw) To: Michael S. Tsirkin; +Cc: James Hogan, qemu-devel, virtualization On 03/20/2017 05:43 PM, Michael S. Tsirkin wrote: > On Mon, Mar 20, 2017 at 05:21:22PM +0200, Marcel Apfelbaum wrote: >> On 03/17/2017 11:57 PM, James Hogan wrote: >>> Hi, >>> >>> I've bisected the following failure of the virtio_net linux v4.10 driver >>> to probe in QEMU v2.9.0-rc1 emulating a MIPS Malta machine: >>> >>> virtio_net virtio0: virtio: device uses modern interface but does not have VIRTIO_F_VERSION_1 >>> virtio_net: probe of virtio0 failed with error -22 >>> >>> To QEMU commit 9a4c0e220d8a ("hw/virtio-pci: fix virtio behaviour"). >>> >>> It appears that adding ",disable-modern=on,disable-legacy=off" to the >>> virtio-net -device makes it work again. >>> >>> I presume this should really just work out of the box. Any ideas why it >>> isn't? >>> >> >> Hi, >> >> >> This is strange. This commit changes virtio devices from legacy to virtio "transitional". >> (your command line changes it to legacy) >> Linux 4.10 supports virtio modern/transitional (as far as I know) and on QEMU side >> there is nothing new. >> >> Michael, do you have any idea? >> >> Thanks, >> Marcel > > My guess would be firmware mishandling 64 bit BARs - we saw such > a case on sparc previously. As a result you are probably reading > all zeroes from features register or something like that. > Marcel, could you send a patch making the bar 32 bit? > If that helps we know what the issue is. > Sure, Thanks, Marcel >>> Cheers >>> James >>> ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [BUG] virtio-net linux driver fails to probe on MIPS Malta since 'hw/virtio-pci: fix virtio behaviour' 2017-03-20 15:43 ` Michael S. Tsirkin 2017-03-20 16:02 ` Marcel Apfelbaum @ 2017-03-21 14:16 ` Marcel Apfelbaum 2017-03-27 18:45 ` James Hogan 1 sibling, 1 reply; 6+ messages in thread From: Marcel Apfelbaum @ 2017-03-21 14:16 UTC (permalink / raw) To: Michael S. Tsirkin; +Cc: James Hogan, qemu-devel, virtualization On 03/20/2017 05:43 PM, Michael S. Tsirkin wrote: > On Mon, Mar 20, 2017 at 05:21:22PM +0200, Marcel Apfelbaum wrote: >> On 03/17/2017 11:57 PM, James Hogan wrote: >>> Hi, >>> >>> I've bisected the following failure of the virtio_net linux v4.10 driver >>> to probe in QEMU v2.9.0-rc1 emulating a MIPS Malta machine: >>> >>> virtio_net virtio0: virtio: device uses modern interface but does not have VIRTIO_F_VERSION_1 >>> virtio_net: probe of virtio0 failed with error -22 >>> >>> To QEMU commit 9a4c0e220d8a ("hw/virtio-pci: fix virtio behaviour"). >>> >>> It appears that adding ",disable-modern=on,disable-legacy=off" to the >>> virtio-net -device makes it work again. >>> >>> I presume this should really just work out of the box. Any ideas why it >>> isn't? >>> >> >> Hi, >> >> >> This is strange. This commit changes virtio devices from legacy to virtio "transitional". >> (your command line changes it to legacy) >> Linux 4.10 supports virtio modern/transitional (as far as I know) and on QEMU side >> there is nothing new. >> >> Michael, do you have any idea? >> >> Thanks, >> Marcel > > My guess would be firmware mishandling 64 bit BARs - we saw such > a case on sparc previously. As a result you are probably reading > all zeroes from features register or something like that. > Marcel, could you send a patch making the bar 32 bit? > If that helps we know what the issue is. > Hi James, Can you please check if the below patch fixes the problem? Please note it is not a solution. diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index f9b7244..5b4d429 100644 --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio-pci.c @@ -1671,9 +1671,7 @@ static void virtio_pci_device_plugged(DeviceState *d, Error **errp) } pci_register_bar(&proxy->pci_dev, proxy->modern_mem_bar_idx, - PCI_BASE_ADDRESS_SPACE_MEMORY | - PCI_BASE_ADDRESS_MEM_PREFETCH | - PCI_BASE_ADDRESS_MEM_TYPE_64, + PCI_BASE_ADDRESS_SPACE_MEMORY, &proxy->modern_bar); proxy->config_cap = virtio_pci_add_mem_cap(proxy, &cfg.cap); Thanks, Marcel ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [BUG] virtio-net linux driver fails to probe on MIPS Malta since 'hw/virtio-pci: fix virtio behaviour' 2017-03-21 14:16 ` Marcel Apfelbaum @ 2017-03-27 18:45 ` James Hogan 0 siblings, 0 replies; 6+ messages in thread From: James Hogan @ 2017-03-27 18:45 UTC (permalink / raw) To: Marcel Apfelbaum; +Cc: virtualization, qemu-devel, Michael S. Tsirkin [-- Attachment #1.1: Type: text/plain, Size: 1023 bytes --] Hi Marcel, On Tue, Mar 21, 2017 at 04:16:58PM +0200, Marcel Apfelbaum wrote: > Can you please check if the below patch fixes the problem? > Please note it is not a solution. > > diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c > index f9b7244..5b4d429 100644 > --- a/hw/virtio/virtio-pci.c > +++ b/hw/virtio/virtio-pci.c > @@ -1671,9 +1671,7 @@ static void virtio_pci_device_plugged(DeviceState *d, Error **errp) > } > > pci_register_bar(&proxy->pci_dev, proxy->modern_mem_bar_idx, > - PCI_BASE_ADDRESS_SPACE_MEMORY | > - PCI_BASE_ADDRESS_MEM_PREFETCH | > - PCI_BASE_ADDRESS_MEM_TYPE_64, > + PCI_BASE_ADDRESS_SPACE_MEMORY, > &proxy->modern_bar); > > proxy->config_cap = virtio_pci_add_mem_cap(proxy, &cfg.cap); Sorry for the delay trying this, I was away last week. No, it doesn't seem to make any difference. Thanks James [-- Attachment #1.2: Digital signature --] [-- Type: application/pgp-signature, Size: 801 bytes --] [-- Attachment #2: Type: text/plain, Size: 183 bytes --] _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-03-27 18:45 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-03-17 21:57 [BUG] virtio-net linux driver fails to probe on MIPS Malta since 'hw/virtio-pci: fix virtio behaviour' James Hogan 2017-03-20 15:21 ` Marcel Apfelbaum 2017-03-20 15:43 ` Michael S. Tsirkin 2017-03-20 16:02 ` Marcel Apfelbaum 2017-03-21 14:16 ` Marcel Apfelbaum 2017-03-27 18:45 ` James Hogan
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).