qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/2] piix: Set I440FXState member pci_info.w32 i


From: Eric Blake
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
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

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 <address@hidden>
> ---
>  hw/pci-host/piix.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 

Reviewed-by: Eric Blake <address@hidden>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]