]> git.proxmox.com Git - mirror_qemu.git/commitdiff
pc: s/INT64_MAX/UINT64_MAX/
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 6 Nov 2013 18:18:08 +0000 (20:18 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 10 Dec 2013 10:29:56 +0000 (12:29 +0200)
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>
hw/i386/pc_piix.c
hw/i386/pc_q35.c

index 636f59ffd3bef5726fe1a99c22623ab5ff8cb702..646b65f829e401a2ccccfd5ff2a948d754928344 100644 (file)
@@ -114,7 +114,7 @@ static void pc_init1(QEMUMachineInitArgs *args,
 
     if (pci_enabled) {
         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;
     } else {
         pci_memory = NULL;
index 97aa84264c1b023e2450a1d8e3776a3fb2c69f98..4c47026f35818cfef9acbdfb1fb39b520ade582b 100644 (file)
@@ -101,7 +101,7 @@ static void pc_q35_init(QEMUMachineInitArgs *args)
     /* pci enabled */
     if (pci_enabled) {
         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;
     } else {
         pci_memory = NULL;