From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54726) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZClwP-0002zy-Ui for qemu-devel@nongnu.org; Wed, 08 Jul 2015 05:47:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZClwO-00082Z-SR for qemu-devel@nongnu.org; Wed, 08 Jul 2015 05:46:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44338) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZClwO-00082U-O5 for qemu-devel@nongnu.org; Wed, 08 Jul 2015 05:46:56 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 5C4252B7849 for ; Wed, 8 Jul 2015 09:46:56 +0000 (UTC) From: Igor Mammedov Date: Wed, 8 Jul 2015 11:46:43 +0200 Message-Id: <1436348808-223033-4-git-send-email-imammedo@redhat.com> In-Reply-To: <1436348808-223033-1-git-send-email-imammedo@redhat.com> References: <1436348808-223033-1-git-send-email-imammedo@redhat.com> Subject: [Qemu-devel] [RFC v3 3/8] 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 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); } -- 1.8.3.1