diff mbox

[RFC,v3,3/8] pc: reserve hotpluggable memory range with memory_region_init_hva_range()

Message ID 1436348808-223033-4-git-send-email-imammedo@redhat.com
State New
Headers show

Commit Message

Igor Mammedov July 8, 2015, 9:46 a.m. UTC
It makes sure that all hotplugged memory will be put in
continuos HVA range allowing to use 1:1 GVA<->HVA mapping.

1:1 mapping will be used by vhost to reduce number of memory
ranges for hotplugged memory to a single range that covers
all hotpluggable memory address space.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
---
 hw/i386/pc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 7959b44..bd79d25 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1311,8 +1311,8 @@  FWCfgState *pc_memory_init(MachineState *machine,
             exit(EXIT_FAILURE);
         }
 
-        memory_region_init(&pcms->hotplug_memory.mr, OBJECT(pcms),
-                           "hotplug-memory", hotplug_mem_size);
+        memory_region_init_hva_range(&pcms->hotplug_memory.mr, OBJECT(pcms),
+                                     "hotplug-memory", hotplug_mem_size);
         memory_region_add_subregion(system_memory, pcms->hotplug_memory.base,
                                     &pcms->hotplug_memory.mr);
     }