summary refs log tree commit diff stats
path: root/hw/i386/pc.c
diff options
context:
space:
mode:
authorJoao Martins <joao.m.martins@oracle.com>2022-07-19 18:00:06 +0100
committerMichael S. Tsirkin <mst@redhat.com>2022-07-26 10:40:58 -0400
commitc48eb7a4e869f338e5b3e233fed7c9dbb0520247 (patch)
treec0a57dc90a67338c8d0cf61bfa6e2409d65f2f7e /hw/i386/pc.c
parent4876778749021a59a03dd3da3518dc861bc95ff8 (diff)
downloadfocaccia-qemu-c48eb7a4e869f338e5b3e233fed7c9dbb0520247.tar.gz
focaccia-qemu-c48eb7a4e869f338e5b3e233fed7c9dbb0520247.zip
i386/pc: pass pci_hole64_size to pc_memory_init()
Use the pre-initialized pci-host qdev and fetch the
pci-hole64-size into pc_memory_init() newly added argument.
Use PCI_HOST_PROP_PCI_HOLE64_SIZE pci-host property for
fetching pci-hole64-size.

This is in preparation to determine that host-phys-bits are
enough and 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-4-joao.m.martins@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/i386/pc.c')
-rw-r--r--hw/i386/pc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 13b68307be..f4d5b25fdd 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -817,7 +817,8 @@ void xen_load_linux(PCMachineState *pcms)
 void pc_memory_init(PCMachineState *pcms,
                     MemoryRegion *system_memory,
                     MemoryRegion *rom_memory,
-                    MemoryRegion **ram_memory)
+                    MemoryRegion **ram_memory,
+                    uint64_t pci_hole64_size)
 {
     int linux_boot, i;
     MemoryRegion *option_rom_mr;