From: "Michael S. Tsirkin" <mst@redhat.com>
To: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Cc: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Incorrect memory region address with large 64-bit PCI BARs
Date: Mon, 13 Mar 2017 14:02:40 +0200 [thread overview]
Message-ID: <20170313140010-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <5f5a4f09-3da7-e200-cda2-85e1053bb9ee@ilande.co.uk>
On Sun, Mar 12, 2017 at 11:16:44AM +0000, Mark Cave-Ayland wrote:
> On 12/03/17 03:56, Michael S. Tsirkin wrote:
>
> > After looking at it some more, I think the issue is merely with how info
> > mtree presents information, which confuses instead of helping when
> > overlap triggers. Specifically
> > 000001ff00000000-000001ffffffffff (prio 0, i/o): pci-mmio
> > ...
> > 000001fe04040000-000001fe04043fff (prio 1, i/o): virtio-pci
> >
> > really means that virtio-pci is not visible at all, this
> > happens because it starts at offset ffffffff04040000 which is
> > outside the parent.
> >
> > I think that the cleanest fix is probably to show 128 bit addresses,
> > then user will see the real addresses:
> >
> > 000001ff00000000-000001ffffffffff (prio 0, i/o): pci-mmio
> > ...
> > 1000001fe04040000-1000001fe04043fff (prio 1, i/o): virtio-pci
> >
> > and now it's clear what is going on: virtio-pci is outside pci-mmio.
> >
> > This would have pointed Mark in the right direction earlier.
> >
> > Thoughts? Patch?
>
> Presumably if someone tried to do this on real hardware, the BAR address
> would lie outside of the pci-mmio region and effectively isn't mapped?
>
> If this is the case I'd be happy with a simple qemu_log() showing the
> full 64-bit address and region name explaining that it couldn't be
> mapped underneath its parent because it was outside its parent region,
> and skip the mapping.
>
>
> ATB,
>
> Mark.
I think that's what happens anyway. The bug is merely the desplay in info mtree
which uses 64 bit math.
--
MST
prev parent reply other threads:[~2017-03-13 12:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-11 10:37 [Qemu-devel] Incorrect memory region address with large 64-bit PCI BARs Mark Cave-Ayland
2017-03-12 1:46 ` Michael S. Tsirkin
2017-03-12 3:56 ` Michael S. Tsirkin
2017-03-12 11:16 ` Mark Cave-Ayland
2017-03-13 12:02 ` Michael S. Tsirkin [this message]
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=20170313140010-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=pbonzini@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).