From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43214) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1ypp-0006XY-GT for qemu-devel@nongnu.org; Mon, 08 Jun 2015 11:19:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z1ypj-0005LE-LV for qemu-devel@nongnu.org; Mon, 08 Jun 2015 11:19:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40240) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1ypj-0005J5-52 for qemu-devel@nongnu.org; Mon, 08 Jun 2015 11:19:27 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id D6D7719F270 for ; Mon, 8 Jun 2015 15:19:26 +0000 (UTC) From: Igor Mammedov Date: Mon, 8 Jun 2015 17:19:16 +0200 Message-Id: <1433776757-61958-6-git-send-email-imammedo@redhat.com> In-Reply-To: <1433776757-61958-1-git-send-email-imammedo@redhat.com> References: <1433776757-61958-1-git-send-email-imammedo@redhat.com> Subject: [Qemu-devel] [RFC v2 5/6] pc: reserve hotpluggable memory range with memory_region_init_hva_range() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, mst@redhat.com 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 --- hw/i386/pc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 2baff4a..82278a9 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1333,8 +1333,8 @@ FWCfgState *pc_memory_init(MachineState *machine, exit(EXIT_FAILURE); } - memory_region_init(&pcms->hotplug_memory, OBJECT(pcms), - "hotplug-memory", hotplug_mem_size); + memory_region_init_hva_range(&pcms->hotplug_memory, OBJECT(pcms), + "hotplug-memory", hotplug_mem_size); memory_region_add_subregion(system_memory, pcms->hotplug_memory_base, &pcms->hotplug_memory); } -- 1.8.3.1