]> git.proxmox.com Git - mirror_qemu.git/blobdiff - exec.c
i386: Update new x86_apicid parsing rules with die_offset support
[mirror_qemu.git] / exec.c
diff --git a/exec.c b/exec.c
index e7622d195619f5a64423eeb3ad79bee34b53b594..50ea9c5aaa8f2ad732793b91625194f781e8e24f 100644 (file)
--- a/exec.c
+++ b/exec.c
@@ -1874,6 +1874,7 @@ static void *file_ram_alloc(RAMBlock *block,
                             bool truncate,
                             Error **errp)
 {
+    MachineState *ms = MACHINE(qdev_get_machine());
     void *area;
 
     block->page_size = qemu_fd_getpagesize(fd);
@@ -1930,7 +1931,7 @@ static void *file_ram_alloc(RAMBlock *block,
     }
 
     if (mem_prealloc) {
-        os_mem_prealloc(fd, area, memory, smp_cpus, errp);
+        os_mem_prealloc(fd, area, memory, ms->smp.cpus, errp);
         if (errp && *errp) {
             qemu_ram_munmap(fd, area, memory);
             return NULL;