Skip to contentSkip to conversation

virtio-pci msix error

Qemu-devel In review Richard Henderson 5 participants 25 messages May 19, 2015 – Oct 26, 2015

lore
Share & tools
lore
#0 lore raw

Re patch c7ff5482. What's the point of this error? It's going to always appear for older targets that predate such new fangled things as msix.

Obviously the patch has been there a while, and it's not actually causing any problems, but today it got on my nerves...

r~

#1 lore raw
Quoted 10 lines · Richard Henderson

Re patch c7ff5482. What's the point of this error? It's going to always appear for older targets that predate such new fangled things as msix.

Obviously the patch has been there a while, and it's not actually causing any problems, but today it got on my nerves...

r~

So don't specify nvectors > 0 for these platforms then?

Signature · 1 line
MST
#2 lore raw
Quoted 10 lines · Michael S. Tsirkin
Quoted 7 lines · Richard Henderson

Re patch c7ff5482. What's the point of this error? It's going to always appear for older targets that predate such new fangled things as msix.

Obviously the patch has been there a while, and it's not actually causing any problems, but today it got on my nerves...

So don't specify nvectors > 0 for these platforms then?

How do you do that? I did a quick 'git grep' for nvectors and none of the hits are in platform-dependent code...

Why can't the virtio-pci device automatically detect whether the PCI bus it's plugged into supports MSIx and just do the right thing?

-- PMM

#3 lore raw

PATCH 1/1 virtio: Notice when the system doesn't support MSIx at all

And do not issue an error_report in that case.

---
 hw/virtio/virtio-pci.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

--

This seems to be about the only sane way to test the value of msi_supported from here. Thoughts?

r~

hw/virtio/virtio-pci.c +10 -5
index 867c9d1..6763872 100644
@@ -934,11 +934,16 @@ static void virtio_pci_device_plugged(DeviceState *d)
     pci_set_word(config + PCI_SUBSYSTEM_ID, virtio_bus_get_vdev_id(bus));
     config[PCI_INTERRUPT_PIN] = 1;
 
-    if (proxy->nvectors &&
-        msix_init_exclusive_bar(&proxy->pci_dev, proxy->nvectors, 1)) {
-        error_report("unable to init msix vectors to %" PRIu32,
-                     proxy->nvectors);
-        proxy->nvectors = 0;
+    if (proxy->nvectors) {
+        int err = msix_init_exclusive_bar(&proxy->pci_dev, proxy->nvectors, 1);
+        if (err) {
+            /* Notice when a system that supports MSIx can't initialize it.  */
+            if (err != -ENOTSUP) {
+                error_report("unable to init msix vectors to %" PRIu32,
+                             proxy->nvectors);
+            }
+            proxy->nvectors = 0;
+        }
     }
 
     proxy->pci_dev.config_write = virtio_write_config;
Signature · 1 line
2.1.0
#4 lore raw

Re: [Qemu-devel] [PATCH] virtio: Notice when the system doesn't support MSIx at all

Quoted 6 lines · Richard Henderson

And do not issue an error_report in that case.

---
 hw/virtio/virtio-pci.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)
Quoted 7 lines

--

This seems to be about the only sane way to test the value of msi_supported from here. Thoughts?

r~

Can you please include the qemu command-line that triggers the error in the commit log?

Quoted 30 lines
hw/virtio/virtio-pci.c +10 -5
index 867c9d1..6763872 100644
@@ -934,11 +934,16 @@ static void virtio_pci_device_plugged(DeviceState *d)
     pci_set_word(config + PCI_SUBSYSTEM_ID, virtio_bus_get_vdev_id(bus));
     config[PCI_INTERRUPT_PIN] = 1;
 
-    if (proxy->nvectors &&
-        msix_init_exclusive_bar(&proxy->pci_dev, proxy->nvectors, 1)) {
-        error_report("unable to init msix vectors to %" PRIu32,
-                     proxy->nvectors);
-        proxy->nvectors = 0;
+    if (proxy->nvectors) {
+        int err = msix_init_exclusive_bar(&proxy->pci_dev, proxy->nvectors, 1);
+        if (err) {
+            /* Notice when a system that supports MSIx can't initialize it.  */
+            if (err != -ENOTSUP) {
+                error_report("unable to init msix vectors to %" PRIu32,
+                             proxy->nvectors);
+            }
+            proxy->nvectors = 0;
+        }
     }
 
     proxy->pci_dev.config_write = virtio_write_config;
Signature · 1 line
2.1.0
#5 lore raw

Re: [Qemu-devel] [PATCH] virtio: Notice when the system doesn't support MSIx at all

Quoted 9 lines · Michael S. Tsirkin
Quoted 8 lines · Richard Henderson

And do not issue an error_report in that case.

---
 hw/virtio/virtio-pci.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

--

Quoted 8 lines
Quoted 5 lines

This seems to be about the only sane way to test the value of msi_supported from here. Thoughts?

r~

Can you please include the qemu command-line that triggers the error in the commit log?

$ ../run/bin/qemu-system-alpha -drive file=foo.img,if=virtio,format=raw
qemu-system-alpha: -drive file=foo.img,if=virtio,format=raw: unable to init
msix vectors to 2

r~

#6 lore raw

Re: [Qemu-devel] [PATCH] virtio: Notice when the system doesn't support MSIx at all

Quoted 14 lines · Richard Henderson
Quoted 13 lines · Michael S. Tsirkin
Quoted 12 lines · Richard Henderson

And do not issue an error_report in that case.

---
 hw/virtio/virtio-pci.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

--

This seems to be about the only sane way to test the value of msi_supported from here. Thoughts?

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

r~

Can you please include the qemu command-line that triggers the error in the commit log?

$ ../run/bin/qemu-system-alpha -drive file=foo.img,if=virtio,format=raw
qemu-system-alpha: -drive file=foo.img,if=virtio,format=raw: unable to init
msix vectors to 2

I also get the same message on qemu-system-sparc64 as below (FWIW I did raise this on-list months ago but no-one replied to my post at the time):

./qemu-system-sparc64 -drive file=debian-7.7.0-sparc-netinst.iso,if=virtio,readonly=on,index=1 -nographic

ATB,

Mark.

#7 lore raw

Re: [Qemu-devel] [PATCH] virtio: Notice when the system doesn't support MSIx at all

In reply to Richard Henderson
Quoted 33 lines · Richard Henderson

And do not issue an error_report in that case.

---
 hw/virtio/virtio-pci.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

--

This seems to be about the only sane way to test the value of msi_supported from here. Thoughts?

r~

hw/virtio/virtio-pci.c +3 -5
index 867c9d1..6763872 100644
@@ -934,11 +934,16 @@ static void virtio_pci_device_plugged(DeviceState *d)
     pci_set_word(config + PCI_SUBSYSTEM_ID, virtio_bus_get_vdev_id(bus));
     config[PCI_INTERRUPT_PIN] = 1;
 
-    if (proxy->nvectors &&
-        msix_init_exclusive_bar(&proxy->pci_dev, proxy->nvectors, 1)) {
-        error_report("unable to init msix vectors to %" PRIu32,
-                     proxy->nvectors);
-        proxy->nvectors = 0;
+    if (proxy->nvectors) {
+        int err = msix_init_exclusive_bar(&proxy->pci_dev, proxy->nvectors, 1);
+        if (err) {

hw/virtio/virtio-pci.c static void virtio_pci_device_plugged(DeviceState *d) · line 949

Quoted 10 lines
hw/virtio/virtio-pci.c +7 -0
+            /* Notice when a system that supports MSIx can't initialize it.  */
+            if (err != -ENOTSUP) {
+                error_report("unable to init msix vectors to %" PRIu32,
+                             proxy->nvectors);
+            }
+            proxy->nvectors = 0;
+        }
     }
 
     proxy->pci_dev.config_write = virtio_write_config;

Ping? Any chance of getting this applied for 2.4 since it's something that I do get emails about for SPARC64?

ATB,

Mark.

#8 lore raw

Re: [Qemu-devel] [PATCH] virtio: Notice when the system doesn't support MSIx at all

Quoted 10 lines · Mark Cave-Ayland
Quoted 8 lines · Richard Henderson

And do not issue an error_report in that case.

---
 hw/virtio/virtio-pci.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

--

Quoted 5 lines
Quoted 2 lines

This seems to be about the only sane way to test the value of msi_supported from here. Thoughts?

Ping? Any chance of getting this applied for 2.4 since it's something that I do get emails about for SPARC64?

Michael would like a respin with the commit message correction he suggested. RTH -- could you send out a fixed up version, please?

thanks
-- PMM

#9 lore raw

Re: [Qemu-devel] [PATCH] virtio: Notice when the system doesn't support MSIx at all

Ping^2 -- this is still confusing users, cf bug LP:1500175.

thanks
-- PMM

Quoted 22 lines · Peter Maydell
Quoted 10 lines · Mark Cave-Ayland
Quoted 8 lines · Richard Henderson

And do not issue an error_report in that case.

---
 hw/virtio/virtio-pci.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

--

Quoted 5 lines
Quoted 2 lines

This seems to be about the only sane way to test the value of msi_supported from here. Thoughts?

Ping? Any chance of getting this applied for 2.4 since it's something that I do get emails about for SPARC64?

Michael would like a respin with the commit message correction he suggested. RTH -- could you send out a fixed up version, please?

thanks
-- PMM

#10 lore raw

Re: [Qemu-devel] [PATCH] virtio: Notice when the system doesn't support MSIx at all

Quoted 28 lines · Peter Maydell

Ping^2 -- this is still confusing users, cf bug LP:1500175.

thanks
-- PMM

Quoted 22 lines · Peter Maydell
Quoted 10 lines · Mark Cave-Ayland
Quoted 8 lines · Richard Henderson

And do not issue an error_report in that case.

---
 hw/virtio/virtio-pci.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

--

Quoted 5 lines
Quoted 2 lines

This seems to be about the only sane way to test the value of msi_supported from here. Thoughts?

Ping? Any chance of getting this applied for 2.4 since it's something that I do get emails about for SPARC64?

Michael would like a respin with the commit message correction he suggested. RTH -- could you send out a fixed up version, please?

thanks
-- PMM

Another ping on this patch - please can we have it for 2.5? It has been around since before 2.4 and I'd hate for it to miss another release :(

ATB,

Mark.

#11 lore raw

Re: [Qemu-devel] [PATCH] virtio: Notice when the system doesn't support MSIx at all

Quoted 19 lines · Mark Cave-Ayland
Quoted 17 lines · Peter Maydell

Ping^2 -- this is still confusing users, cf bug LP:1500175.

thanks
-- PMM

Quoted 11 lines · Peter Maydell
Quoted 10 lines · Mark Cave-Ayland
Quoted 8 lines · Richard Henderson

And do not issue an error_report in that case.

---
 hw/virtio/virtio-pci.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

--

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

This seems to be about the only sane way to test the value of msi_supported from here. Thoughts?

Ping? Any chance of getting this applied for 2.4 since it's something that I do get emails about for SPARC64?

Michael would like a respin with the commit message correction he suggested. RTH -- could you send out a fixed up version, please?

I don't think there was a reply to this, and by now the patch doesn't apply.

Quoted 11 lines
Quoted 3 lines
Quoted 3 lines

thanks
-- PMM

Another ping on this patch - please can we have it for 2.5? It has been around since before 2.4 and I'd hate for it to miss another release :(

ATB,

Mark.

Pls address the issues if you want this applied.

Signature · 1 line
MST
#12 lore raw

Re: [Qemu-devel] [PATCH] virtio: Notice when the system doesn't support MSIx at all

Quoted 23 lines · Michael S. Tsirkin
Quoted 22 lines · Mark Cave-Ayland
Quoted 20 lines · Peter Maydell

Ping^2 -- this is still confusing users, cf bug LP:1500175.

thanks
-- PMM

Quoted 14 lines · Peter Maydell
Quoted 12 lines · Mark Cave-Ayland
Quoted 10 lines · Richard Henderson

And do not issue an error_report in that case.

---
 hw/virtio/virtio-pci.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

--

This seems to be about the only sane way to test the value of msi_supported from here. Thoughts?

Quoted 7 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 2 lines

Ping? Any chance of getting this applied for 2.4 since it's something that I do get emails about for SPARC64?

Michael would like a respin with the commit message correction he suggested. RTH -- could you send out a fixed up version, please?

I don't think there was a reply to this, and by now the patch doesn't apply.

Hmmm that's a shame. I'm not overly familiar with the PCI parts of QEMU, so is it much work to rebase?

Quoted 8 lines
Quoted 8 lines
Quoted 3 lines
Quoted 3 lines

thanks
-- PMM

Another ping on this patch - please can we have it for 2.5? It has been around since before 2.4 and I'd hate for it to miss another release :(

Quoted 5 lines
Quoted 3 lines

ATB,

Mark.

Pls address the issues if you want this applied.

The patch came from Richard rather than myself - my only involvement has been to champion the patch since both myself and Peter have had reports of this message confusing users.

ATB,

Mark.

#13 lore raw

Re: [Qemu-devel] [PATCH] virtio: Notice when the system doesn't support MSIx at all

Quoted 6 lines · Mark Cave-Ayland
Quoted 1 line · Michael S. Tsirkin

Pls address the issues if you want this applied.

The patch came from Richard rather than myself - my only involvement has been to champion the patch since both myself and Peter have had reports of this message confusing users.

Isn't this patch already in master as commit 0d583647a7fc73f6 ?

thanks
-- PMM

#14 lore raw

Re: [Qemu-devel] [PATCH] virtio: Notice when the system doesn't support MSIx at all

Quoted 5 lines · Peter Maydell
Quoted 3 lines · Mark Cave-Ayland
Quoted 1 line · Michael S. Tsirkin

Pls address the issues if you want this applied.

Quoted 8 lines
Quoted 3 lines

The patch came from Richard rather than myself - my only involvement has been to champion the patch since both myself and Peter have had reports of this message confusing users.

Isn't this patch already in master as commit 0d583647a7fc73f6 ?

thanks
-- PMM

So it is.
That explains why it doesn't apply.

#15 lore raw

Re: [Qemu-devel] [PATCH] virtio: Notice when the system doesn't support MSIx at all

In reply to Peter Maydell
Quoted 10 lines · Peter Maydell
Quoted 6 lines · Mark Cave-Ayland
Quoted 1 line · Michael S. Tsirkin

Pls address the issues if you want this applied.

The patch came from Richard rather than myself - my only involvement has been to champion the patch since both myself and Peter have had reports of this message confusing users.

Isn't this patch already in master as commit 0d583647a7fc73f6 ?

Oh I think you're right! I had that thread tagged and hadn't seen a reply come through, but I guess Richard must have attached it to one of his recent pull requests.

In that case apologies to all for the noise.

ATB,

Mark.

#16 lore raw

Re: [Qemu-devel] [PATCH] virtio: Notice when the system doesn't support MSIx at all

Quoted 11 lines · Mark Cave-Ayland
Quoted 9 lines · Peter Maydell
Quoted 6 lines · Mark Cave-Ayland
Quoted 1 line · Michael S. Tsirkin

Pls address the issues if you want this applied.

The patch came from Richard rather than myself - my only involvement has been to champion the patch since both myself and Peter have had reports of this message confusing users.

Quoted 5 lines
Quoted 1 line

Isn't this patch already in master as commit 0d583647a7fc73f6 ?

Oh I think you're right! I had that thread tagged and hadn't seen a reply come through, but I guess Richard must have attached it to one of his recent pull requests.

I did. I don't do replies, I merge patches then change my mind and drop them too many times to make "applied thanks" work. As I send pulls about once a week, and Cc contributors, you only need to watch these to know whether stuff is merged.

Quoted 6 lines

In that case apologies to all for the noise.

ATB,

Mark.

#17 lore raw
In reply to Peter Maydell
Quoted 12 lines · Peter Maydell
Quoted 10 lines · Michael S. Tsirkin
Quoted 7 lines · Richard Henderson

Re patch c7ff5482. What's the point of this error? It's going to always appear for older targets that predate such new fangled things as msix.

Obviously the patch has been there a while, and it's not actually causing any problems, but today it got on my nerves...

So don't specify nvectors > 0 for these platforms then?

Quoted 8 lines

How do you do that? I did a quick 'git grep' for nvectors and none of the hits are in platform-dependent code...

Why can't the virtio-pci device automatically detect whether the PCI bus it's plugged into supports MSIx and just do the right thing?

-- PMM

I mean why does *user* specify nvectors > 0?

Signature · 1 line
MST
#18 lore raw
Quoted 13 lines · Michael S. Tsirkin
Quoted 12 lines · Peter Maydell
Quoted 10 lines · Michael S. Tsirkin
Quoted 7 lines · Richard Henderson

Re patch c7ff5482. What's the point of this error? It's going to always appear for older targets that predate such new fangled things as msix.

Obviously the patch has been there a while, and it's not actually causing any problems, but today it got on my nerves...

So don't specify nvectors > 0 for these platforms then?

Quoted 8 lines
Quoted 6 lines

How do you do that? I did a quick 'git grep' for nvectors and none of the hits are in platform-dependent code...

Why can't the virtio-pci device automatically detect whether the PCI bus it's plugged into supports MSIx and just do the right thing?

I mean why does *user* specify nvectors > 0?

The user isn't specifying nvectors at all. That's why the message is annoying...

-- PMM

#19 lore raw
Quoted 17 lines · Peter Maydell
Quoted 16 lines · Michael S. Tsirkin
Quoted 15 lines · Peter Maydell
Quoted 10 lines · Michael S. Tsirkin
Quoted 7 lines · Richard Henderson

Re patch c7ff5482. What's the point of this error? It's going to always appear for older targets that predate such new fangled things as msix.

Obviously the patch has been there a while, and it's not actually causing any problems, but today it got on my nerves...

So don't specify nvectors > 0 for these platforms then?

How do you do that? I did a quick 'git grep' for nvectors and none of the hits are in platform-dependent code...

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Why can't the virtio-pci device automatically detect whether the PCI bus it's plugged into supports MSIx and just do the right thing?

I mean why does *user* specify nvectors > 0?

The user isn't specifying nvectors at all. That's why the message is annoying...

So I think it's better to fix the default for old targets?

Fam

#20 lore raw
Quoted 22 lines · Fam Zheng
Quoted 21 lines · Peter Maydell
Quoted 19 lines · Michael S. Tsirkin
Quoted 18 lines · Peter Maydell
Quoted 10 lines · Michael S. Tsirkin
Quoted 7 lines · Richard Henderson

Re patch c7ff5482. What's the point of this error? It's going to always appear for older targets that predate such new fangled things as msix.

Obviously the patch has been there a while, and it's not actually causing any problems, but today it got on my nerves...

So don't specify nvectors > 0 for these platforms then?

How do you do that? I did a quick 'git grep' for nvectors and none of the hits are in platform-dependent code...

Why can't the virtio-pci device automatically detect whether the PCI bus it's plugged into supports MSIx and just do the right thing?

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

I mean why does *user* specify nvectors > 0?

The user isn't specifying nvectors at all. That's why the message is annoying...

So I think it's better to fix the default for old targets?

What default? No platform or PCI controller code specifies any default value for nvectors, and the user doesn't specify a value for nvectors.

The only thing that tries to specify a value for nvectors is the virtio-*-pci device itself, which it then pointlessly complains that it can't set.

-- PMM

#21 lore raw
Quoted 30 lines · Peter Maydell
Quoted 22 lines · Fam Zheng
Quoted 21 lines · Peter Maydell
Quoted 19 lines · Michael S. Tsirkin
Quoted 18 lines · Peter Maydell
Quoted 10 lines · Michael S. Tsirkin
Quoted 7 lines · Richard Henderson

Re patch c7ff5482. What's the point of this error? It's going to always appear for older targets that predate such new fangled things as msix.

Obviously the patch has been there a while, and it's not actually causing any problems, but today it got on my nerves...

So don't specify nvectors > 0 for these platforms then?

How do you do that? I did a quick 'git grep' for nvectors and none of the hits are in platform-dependent code...

Why can't the virtio-pci device automatically detect whether the PCI bus it's plugged into supports MSIx and just do the right thing?

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

I mean why does *user* specify nvectors > 0?

The user isn't specifying nvectors at all. That's why the message is annoying...

So I think it's better to fix the default for old targets?

Quoted 7 lines

What default? No platform or PCI controller code specifies any default value for nvectors, and the user doesn't specify a value for nvectors.

The only thing that tries to specify a value for nvectors is the virtio-*-pci device itself, which it then pointlessly complains that it can't set.

Ping? I've just done an OpenBIOS test run on qemu-system-sparc64 and I'm still seeing this message appear on the console. Any chance we can get this fixed for 2.4?

ATB,

Mark.

#22 lore raw
Quoted 36 lines · Mark Cave-Ayland
Quoted 34 lines · Peter Maydell
Quoted 22 lines · Fam Zheng
Quoted 21 lines · Peter Maydell
Quoted 19 lines · Michael S. Tsirkin
Quoted 18 lines · Peter Maydell
Quoted 10 lines · Michael S. Tsirkin
Quoted 7 lines · Richard Henderson

Re patch c7ff5482. What's the point of this error? It's going to always appear for older targets that predate such new fangled things as msix.

Obviously the patch has been there a while, and it's not actually causing any problems, but today it got on my nerves...

So don't specify nvectors > 0 for these platforms then?

How do you do that? I did a quick 'git grep' for nvectors and none of the hits are in platform-dependent code...

Why can't the virtio-pci device automatically detect whether the PCI bus it's plugged into supports MSIx and just do the right thing?

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

I mean why does *user* specify nvectors > 0?

The user isn't specifying nvectors at all. That's why the message is annoying...

So I think it's better to fix the default for old targets?

What default? No platform or PCI controller code specifies any default value for nvectors, and the user doesn't specify a value for nvectors.

Quoted 7 lines
Quoted 3 lines

The only thing that tries to specify a value for nvectors is the virtio-*-pci device itself, which it then pointlessly complains that it can't set.

Ping? I've just done an OpenBIOS test run on qemu-system-sparc64 and I'm still seeing this message appear on the console. Any chance we can get this fixed for 2.4?

Ping again?

ATB,

Mark.

#23 lore raw
Quoted 6 lines · Mark Cave-Ayland
Quoted 3 lines · Mark Cave-Ayland

Ping? I've just done an OpenBIOS test run on qemu-system-sparc64 and I'm still seeing this message appear on the console. Any chance we can get this fixed for 2.4?

Ping again?

rth submitted a patch for this -- you want to be pinging that, I suspect. It looks like the only issue with it was with the commit message...

-- PMM

#24 lore raw
Quoted 11 lines · Peter Maydell
Quoted 6 lines · Mark Cave-Ayland
Quoted 3 lines · Mark Cave-Ayland

Ping? I've just done an OpenBIOS test run on qemu-system-sparc64 and I'm still seeing this message appear on the console. Any chance we can get this fixed for 2.4?

Ping again?

rth submitted a patch for this -- you want to be pinging that, I suspect. It looks like the only issue with it was with the commit message...

Got it thanks. Will do so.

ATB,

Mark.