* [PATCH v2 1/2] virtio-vga: fix virtio-vga bar ordering
@ 2020-04-22 21:54 Anthoine Bourgeois
2020-04-22 21:54 ` [PATCH v2 2/2] virtio-pci: update virtio pci bar layout documentation Anthoine Bourgeois
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Anthoine Bourgeois @ 2020-04-22 21:54 UTC (permalink / raw)
To: Michael S . Tsirkin, Gerd Hoffmann; +Cc: qemu-devel
With virtio-vga, pci bar are reordered. Bar #2 is used for compatibility
with stdvga. By default, bar #2 is used by virtio modern io bar.
This bar is the last one introduce in the virtio pci bar layout and it's
crushed by the virtio-vga reordering. So virtio-vga and
modern-pio-notify are incompatible because virtio-vga failed to
initialize with this option.
This fix sets the modern io bar to the bar #5 to avoid conflict.
Signed-off-by: Anthoine Bourgeois <anthoine.bourgeois@gmail.com>
---
hw/display/virtio-vga.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/display/virtio-vga.c b/hw/display/virtio-vga.c
index 2b4c2aa126..95757a6619 100644
--- a/hw/display/virtio-vga.c
+++ b/hw/display/virtio-vga.c
@@ -114,6 +114,7 @@ static void virtio_vga_base_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
*/
vpci_dev->modern_mem_bar_idx = 2;
vpci_dev->msix_bar_idx = 4;
+ vpci_dev->modern_io_bar_idx = 5;
if (!(vpci_dev->flags & VIRTIO_PCI_FLAG_PAGE_PER_VQ)) {
/*
--
2.20.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 2/2] virtio-pci: update virtio pci bar layout documentation
2020-04-22 21:54 [PATCH v2 1/2] virtio-vga: fix virtio-vga bar ordering Anthoine Bourgeois
@ 2020-04-22 21:54 ` Anthoine Bourgeois
2020-04-23 11:32 ` Gerd Hoffmann
2020-04-23 11:31 ` [PATCH v2 1/2] virtio-vga: fix virtio-vga bar ordering Gerd Hoffmann
2020-04-23 12:52 ` Michael S. Tsirkin
2 siblings, 1 reply; 6+ messages in thread
From: Anthoine Bourgeois @ 2020-04-22 21:54 UTC (permalink / raw)
To: Michael S . Tsirkin, Gerd Hoffmann; +Cc: qemu-devel
The modern io bar was never documented.
Signed-off-by: Anthoine Bourgeois <anthoine.bourgeois@gmail.com>
---
hw/virtio/virtio-pci.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 4cb784389c..d028c17c24 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -1705,6 +1705,7 @@ static void virtio_pci_realize(PCIDevice *pci_dev, Error **errp)
*
* region 0 -- virtio legacy io bar
* region 1 -- msi-x bar
+ * region 2 -- virtio modern io bar (off by default)
* region 4+5 -- virtio modern memory (64bit) bar
*
*/
--
2.20.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2 1/2] virtio-vga: fix virtio-vga bar ordering
2020-04-22 21:54 [PATCH v2 1/2] virtio-vga: fix virtio-vga bar ordering Anthoine Bourgeois
2020-04-22 21:54 ` [PATCH v2 2/2] virtio-pci: update virtio pci bar layout documentation Anthoine Bourgeois
@ 2020-04-23 11:31 ` Gerd Hoffmann
2020-04-23 12:52 ` Michael S. Tsirkin
2 siblings, 0 replies; 6+ messages in thread
From: Gerd Hoffmann @ 2020-04-23 11:31 UTC (permalink / raw)
To: Anthoine Bourgeois; +Cc: qemu-devel, Michael S . Tsirkin
On Wed, Apr 22, 2020 at 11:54:54PM +0200, Anthoine Bourgeois wrote:
> With virtio-vga, pci bar are reordered. Bar #2 is used for compatibility
> with stdvga. By default, bar #2 is used by virtio modern io bar.
> This bar is the last one introduce in the virtio pci bar layout and it's
> crushed by the virtio-vga reordering. So virtio-vga and
> modern-pio-notify are incompatible because virtio-vga failed to
> initialize with this option.
>
> This fix sets the modern io bar to the bar #5 to avoid conflict.
>
> Signed-off-by: Anthoine Bourgeois <anthoine.bourgeois@gmail.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
> hw/display/virtio-vga.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/hw/display/virtio-vga.c b/hw/display/virtio-vga.c
> index 2b4c2aa126..95757a6619 100644
> --- a/hw/display/virtio-vga.c
> +++ b/hw/display/virtio-vga.c
> @@ -114,6 +114,7 @@ static void virtio_vga_base_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
> */
> vpci_dev->modern_mem_bar_idx = 2;
> vpci_dev->msix_bar_idx = 4;
> + vpci_dev->modern_io_bar_idx = 5;
>
> if (!(vpci_dev->flags & VIRTIO_PCI_FLAG_PAGE_PER_VQ)) {
> /*
> --
> 2.20.1
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 2/2] virtio-pci: update virtio pci bar layout documentation
2020-04-22 21:54 ` [PATCH v2 2/2] virtio-pci: update virtio pci bar layout documentation Anthoine Bourgeois
@ 2020-04-23 11:32 ` Gerd Hoffmann
0 siblings, 0 replies; 6+ messages in thread
From: Gerd Hoffmann @ 2020-04-23 11:32 UTC (permalink / raw)
To: Anthoine Bourgeois; +Cc: qemu-devel, Michael S . Tsirkin
On Wed, Apr 22, 2020 at 11:54:55PM +0200, Anthoine Bourgeois wrote:
> The modern io bar was never documented.
>
> Signed-off-by: Anthoine Bourgeois <anthoine.bourgeois@gmail.com>
> ---
> hw/virtio/virtio-pci.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
> index 4cb784389c..d028c17c24 100644
> --- a/hw/virtio/virtio-pci.c
> +++ b/hw/virtio/virtio-pci.c
> @@ -1705,6 +1705,7 @@ static void virtio_pci_realize(PCIDevice *pci_dev, Error **errp)
> *
> * region 0 -- virtio legacy io bar
> * region 1 -- msi-x bar
> + * region 2 -- virtio modern io bar (off by default)
> * region 4+5 -- virtio modern memory (64bit) bar
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
> *
> */
> --
> 2.20.1
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 1/2] virtio-vga: fix virtio-vga bar ordering
2020-04-22 21:54 [PATCH v2 1/2] virtio-vga: fix virtio-vga bar ordering Anthoine Bourgeois
2020-04-22 21:54 ` [PATCH v2 2/2] virtio-pci: update virtio pci bar layout documentation Anthoine Bourgeois
2020-04-23 11:31 ` [PATCH v2 1/2] virtio-vga: fix virtio-vga bar ordering Gerd Hoffmann
@ 2020-04-23 12:52 ` Michael S. Tsirkin
2020-04-23 14:03 ` Gerd Hoffmann
2 siblings, 1 reply; 6+ messages in thread
From: Michael S. Tsirkin @ 2020-04-23 12:52 UTC (permalink / raw)
To: Anthoine Bourgeois; +Cc: Gerd Hoffmann, qemu-devel
On Wed, Apr 22, 2020 at 11:54:54PM +0200, Anthoine Bourgeois wrote:
> With virtio-vga, pci bar are reordered. Bar #2 is used for compatibility
> with stdvga. By default, bar #2 is used by virtio modern io bar.
> This bar is the last one introduce in the virtio pci bar layout and it's
> crushed by the virtio-vga reordering. So virtio-vga and
> modern-pio-notify are incompatible because virtio-vga failed to
> initialize with this option.
>
> This fix sets the modern io bar to the bar #5 to avoid conflict.
>
> Signed-off-by: Anthoine Bourgeois <anthoine.bourgeois@gmail.com>
Gerd, would you say it's required for 5.0?
> ---
> hw/display/virtio-vga.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/hw/display/virtio-vga.c b/hw/display/virtio-vga.c
> index 2b4c2aa126..95757a6619 100644
> --- a/hw/display/virtio-vga.c
> +++ b/hw/display/virtio-vga.c
> @@ -114,6 +114,7 @@ static void virtio_vga_base_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
> */
> vpci_dev->modern_mem_bar_idx = 2;
> vpci_dev->msix_bar_idx = 4;
> + vpci_dev->modern_io_bar_idx = 5;
>
> if (!(vpci_dev->flags & VIRTIO_PCI_FLAG_PAGE_PER_VQ)) {
> /*
> --
> 2.20.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 1/2] virtio-vga: fix virtio-vga bar ordering
2020-04-23 12:52 ` Michael S. Tsirkin
@ 2020-04-23 14:03 ` Gerd Hoffmann
0 siblings, 0 replies; 6+ messages in thread
From: Gerd Hoffmann @ 2020-04-23 14:03 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: Anthoine Bourgeois, qemu-devel
On Thu, Apr 23, 2020 at 08:52:58AM -0400, Michael S. Tsirkin wrote:
> On Wed, Apr 22, 2020 at 11:54:54PM +0200, Anthoine Bourgeois wrote:
> > With virtio-vga, pci bar are reordered. Bar #2 is used for compatibility
> > with stdvga. By default, bar #2 is used by virtio modern io bar.
> > This bar is the last one introduce in the virtio pci bar layout and it's
> > crushed by the virtio-vga reordering. So virtio-vga and
> > modern-pio-notify are incompatible because virtio-vga failed to
> > initialize with this option.
> >
> > This fix sets the modern io bar to the bar #5 to avoid conflict.
> >
> > Signed-off-by: Anthoine Bourgeois <anthoine.bourgeois@gmail.com>
>
> Gerd, would you say it's required for 5.0?
Given that modern-pio-notify is off by default I wouldn't classify this
as release blocker, i.e. I wouldn't delay the release for that.
We are at -rc4 (last rc) already, so I'd tend to say no. Maybe if we
need -rc5 for other reasons.
cheers,
Gerd
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-04-23 14:05 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-22 21:54 [PATCH v2 1/2] virtio-vga: fix virtio-vga bar ordering Anthoine Bourgeois
2020-04-22 21:54 ` [PATCH v2 2/2] virtio-pci: update virtio pci bar layout documentation Anthoine Bourgeois
2020-04-23 11:32 ` Gerd Hoffmann
2020-04-23 11:31 ` [PATCH v2 1/2] virtio-vga: fix virtio-vga bar ordering Gerd Hoffmann
2020-04-23 12:52 ` Michael S. Tsirkin
2020-04-23 14:03 ` Gerd Hoffmann
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).