qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthoine Bourgeois <anthoine.bourgeois@gmail.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-devel@nongnu.org, "Michael S . Tsirkin" <mst@redhat.com>
Subject: Re: [PATCH] virtio-vga: fix virtio-vga bar ordering
Date: Thu, 23 Apr 2020 00:02:58 +0200	[thread overview]
Message-ID: <20200422220257.GA17009@gmail.com> (raw)
In-Reply-To: <20200422104657.4fnzkp66l2c2m2cw@sirius.home.kraxel.org>

On Wed, Apr 22, 2020 at 12:46:57PM +0200, Gerd Hoffmann wrote:
>> This fix exchange the modern io bar with the modern memory bar,
>> replacing the msix bar that is never impacted anyway.
>
>Well, msix was placed in bar 4 intentionally.  That keeps bar 1 (default
>msix location) free, so we have the option to turn bar 0 (vga compat
>vram) into a 64bit bar without shuffling around things.

That's a really good reason I didn't think of.
Just a question, why didn't we choose the virtio-vga order to avoid
shuffling from the beginning? Vga came after and we keep the
compatibility ?

>
>> -    vpci_dev->msix_bar_idx = 4;
>
>Please don't.
>
>> +    vpci_dev->modern_io_bar_idx = 4;
>
>We can use bar 5 instead.
>
>Alternatively just throw an error saying that modern-pio-notify is not
>supported.

As you like. I sent a v2 with modern_io_bar_idx to 5 but I can do a v3
with an error thrown.

>
>> diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
>> index 4cb784389c..9c5efaa06e 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
>>       *   region 4+5 --  virtio modern memory (64bit) bar
>
>Separate patch please.  Also worth noting that the modern io bar is off
>by default.

Done.

Thank you,
Anthoine



  reply	other threads:[~2020-04-22 22:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-21 21:48 [PATCH] virtio-vga: fix virtio-vga bar ordering Anthoine Bourgeois
2020-04-22  6:04 ` Michael S. Tsirkin
2020-04-22 10:49   ` Gerd Hoffmann
2020-04-22 14:25     ` Michael S. Tsirkin
2020-04-22 10:46 ` Gerd Hoffmann
2020-04-22 22:02   ` Anthoine Bourgeois [this message]
2020-04-23 11:30     ` Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200422220257.GA17009@gmail.com \
    --to=anthoine.bourgeois@gmail.com \
    --cc=kraxel@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).