From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37690) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlNKe-0004y3-3O for qemu-devel@nongnu.org; Mon, 03 Nov 2014 14:30:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XlNKV-0007IF-TL for qemu-devel@nongnu.org; Mon, 03 Nov 2014 14:30:28 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47475) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlNKV-0007Hg-Ma for qemu-devel@nongnu.org; Mon, 03 Nov 2014 14:30:19 -0500 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 (8.14.4/8.14.4) with ESMTP id sA3JUIig005663 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Mon, 3 Nov 2014 14:30:19 -0500 From: Igor Mammedov Date: Mon, 3 Nov 2014 19:30:02 +0000 Message-Id: <1415043002-18932-1-git-send-email-imammedo@redhat.com> In-Reply-To: <20141103180116.GA7208@redhat.com> References: <20141103180116.GA7208@redhat.com> Subject: [Qemu-devel] [PATCH 8/11] fixup! pc: align DIMM's address/size by backend's alignment value List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: mst@redhat.com Performance wise it's better to align GVA by the backend's page size. Also do not allow to create DIMM device with suboptimal size (i.e. not aligned to backends page size) to aviod memory loss. Do above only for 2.2 and newer machine types to avoid breaking working configs with 2.1 machine type. Signef-off-by: Igor Mammedov --- hw/i386/pc.c | 2 +- include/hw/i386/pc.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 9d2f800..503a9a3 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1789,7 +1789,7 @@ static void pc_machine_initfn(Object *obj) pc_machine_set_max_ram_below_4g, NULL, NULL, NULL); pcms->enforce_aligned_dimm = true; - object_property_add_bool(obj, PC_MACHINE_ENFORCE_ALINED_DIMM, + object_property_add_bool(obj, PC_MACHINE_ENFORCE_ALIGNED_DIMM, pc_machine_get_aligned_dimm, NULL, NULL); } diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index a4e2a39..4f9b931 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -43,7 +43,7 @@ struct PCMachineState { #define PC_MACHINE_ACPI_DEVICE_PROP "acpi-device" #define PC_MACHINE_MEMHP_REGION_SIZE "hotplug-memory-region-size" #define PC_MACHINE_MAX_RAM_BELOW_4G "max-ram-below-4g" -#define PC_MACHINE_ENFORCE_ALINED_DIMM "enforce-aligned-dimm" +#define PC_MACHINE_ENFORCE_ALIGNED_DIMM "enforce-aligned-dimm" /** * PCMachineClass: -- 1.8.3.1