]> git.ipfire.org Git - thirdparty/qemu.git/commit
i386/pc: create pci-host qdev prior to pc_memory_init()
authorJoao Martins <joao.m.martins@oracle.com>
Tue, 19 Jul 2022 17:00:05 +0000 (18:00 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 26 Jul 2022 14:40:58 +0000 (10:40 -0400)
commit4876778749021a59a03dd3da3518dc861bc95ff8
tree7d0bc2f67991a84ce483c842672d5112f73361a8
parent4ab4c33014b4876bc6d7888efecd6bfcca0d045a
i386/pc: create pci-host qdev prior to pc_memory_init()

At the start of pc_memory_init() we usually pass a range of
0..UINT64_MAX as pci_memory, when really its 2G (i440fx) or
32G (q35). To get the real user value, we need to get pci-host
passed property for default pci_hole64_size. Thus to get that,
create the qdev prior to memory init to better make estimations
on max used/phys addr.

This is in preparation to determine that host-phys-bits are
enough and also for pci-hole64-size to be considered to relocate
ram-above-4g to be at 1T (on AMD platforms).

Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20220719170014.27028-3-joao.m.martins@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/i386/pc_piix.c
hw/i386/pc_q35.c
hw/pci-host/i440fx.c
include/hw/pci-host/i440fx.h