pc: s/INT64_MAX/UINT64_MAX/

It doesn't make sense for a region to be INT64_MAX in size:
memory core uses UINT64_MAX as a special value meaning
"all 64 bit" this is what was meant here.

While this should never affect the PC system which at the moment always
has < 63 bit size, this makes us hit all kind of corner case bugs with
sub-pages, so users are probably better off if we just use UINT64_MAX
instead.

Reported-by: Luiz Capitulino <lcapitulino@redhat.com>
Tested-by: Luiz Capitulino <lcapitulino@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
Paolo Bonzini 2013-11-06 20:18:08 +02:00 committed by Michael S. Tsirkin
parent cf252e5173
commit 286690e34c
2 changed files with 2 additions and 2 deletions

View File

@ -114,7 +114,7 @@ static void pc_init1(QEMUMachineInitArgs *args,
if (pci_enabled) { if (pci_enabled) {
pci_memory = g_new(MemoryRegion, 1); pci_memory = g_new(MemoryRegion, 1);
memory_region_init(pci_memory, NULL, "pci", INT64_MAX); memory_region_init(pci_memory, NULL, "pci", UINT64_MAX);
rom_memory = pci_memory; rom_memory = pci_memory;
} else { } else {
pci_memory = NULL; pci_memory = NULL;

View File

@ -101,7 +101,7 @@ static void pc_q35_init(QEMUMachineInitArgs *args)
/* pci enabled */ /* pci enabled */
if (pci_enabled) { if (pci_enabled) {
pci_memory = g_new(MemoryRegion, 1); pci_memory = g_new(MemoryRegion, 1);
memory_region_init(pci_memory, NULL, "pci", INT64_MAX); memory_region_init(pci_memory, NULL, "pci", UINT64_MAX);
rom_memory = pci_memory; rom_memory = pci_memory;
} else { } else {
pci_memory = NULL; pci_memory = NULL;