From: Eric Blake <eblake@redhat.com>
To: Markus Armbruster <armbru@redhat.com>, qemu-devel@nongnu.org
Cc: marcel@redhat.com, imammedo@redhat.com, ehabkost@redhat.com,
mst@redhat.com
Subject: Re: [Qemu-devel] [PATCH 1/2] piix: Set I440FXState member pci_info.w32 in one place
Date: Wed, 15 Jun 2016 13:16:15 -0600 [thread overview]
Message-ID: <5761A97F.9090000@redhat.com> (raw)
In-Reply-To: <1466013391-16028-2-git-send-email-armbru@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1350 bytes --]
On 06/15/2016 11:56 AM, Markus Armbruster wrote:
> Range pci_info.w32 records the location of the PCI hole.
>
> It's initialized to empty when QOM zeroes I440FXState. That's a fine
> value for a still unknown PCI hole.
>
> i440fx_init() sets pci_info.w32.begin = below_4g_mem_size. Changes
> the PCI hole from empty to [below_4g_mem_size, UINT64_MAX]. That's a
> bogus value.
>
> i440fx_pcihost_initfn() sets pci_info.end = IO_APIC_DEFAULT_ADDRESS.
> Since i440fx_init() ran already, this changes the PCI hole to
> [below_4g_mem_size, IO_APIC_DEFAULT_ADDRESS-1]. That's the correct
> value.
>
> Setting the bounds of the PCI hole in two separate places is
> confusing, and begs the question whether the bogus intermediate value
> could be used by something, or what would happen if we somehow managed
> to realize an i440FX device without having run the board init function
> i440fx_init() first.
>
> Avoid the confusion by setting the (constant) upper bound along with
> the lower bound in i440fx_init().
>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
> hw/pci-host/piix.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2016-06-15 19:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-15 17:56 [Qemu-devel] [PATCH 0/2] Clean up around the PCI holes Markus Armbruster
2016-06-15 17:56 ` [Qemu-devel] [PATCH 1/2] piix: Set I440FXState member pci_info.w32 in one place Markus Armbruster
2016-06-15 19:16 ` Eric Blake [this message]
2016-06-16 7:26 ` Marcel Apfelbaum
2016-06-15 17:56 ` [Qemu-devel] [PATCH 2/2] pc: Eliminate PcPciInfo Markus Armbruster
2016-06-15 19:22 ` Eric Blake
2016-06-16 7:30 ` Marcel Apfelbaum
2016-06-30 5:18 ` [Qemu-devel] [PATCH 0/2] Clean up around the PCI holes Markus Armbruster
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=5761A97F.9090000@redhat.com \
--to=eblake@redhat.com \
--cc=armbru@redhat.com \
--cc=ehabkost@redhat.com \
--cc=imammedo@redhat.com \
--cc=marcel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.