hw/i386: add 4g boundary start to X86MachineState

Rather than hardcoding the 4G boundary everywhere, introduce a
X86MachineState field @above_4g_mem_start and use it
accordingly.

This is in preparation for relocating ram-above-4g to be
dynamically start 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-2-joao.m.martins@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
Joao Martins 2022-07-19 18:00:04 +01:00 committed by Michael S. Tsirkin
parent cb70b7e871
commit 4ab4c33014
5 changed files with 12 additions and 7 deletions

View file

@ -56,6 +56,9 @@ struct X86MachineState {
/* RAM information (sizes, addresses, configuration): */
ram_addr_t below_4g_mem_size, above_4g_mem_size;
/* Start address of the initial RAM above 4G */
uint64_t above_4g_mem_start;
/* CPU and apic information: */
bool apic_xrupt_override;
unsigned pci_irq_mask;