From patchwork Wed Oct 28 16:57:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 537472 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 6790E1401F6 for ; Thu, 29 Oct 2015 03:57:36 +1100 (AEDT) Received: from localhost ([::1]:39413 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrU2Y-0004c2-AB for incoming@patchwork.ozlabs.org; Wed, 28 Oct 2015 12:57:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42683) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrU27-00044L-V0 for qemu-devel@nongnu.org; Wed, 28 Oct 2015 12:57:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZrU23-0002LZ-P4 for qemu-devel@nongnu.org; Wed, 28 Oct 2015 12:57:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33055) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrU23-0002LL-Ja for qemu-devel@nongnu.org; Wed, 28 Oct 2015 12:57:03 -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 2F3A0A2C18; Wed, 28 Oct 2015 16:57:03 +0000 (UTC) Received: from redhat.com (ovpn-116-32.ams2.redhat.com [10.36.116.32]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id t9SGv09v023006; Wed, 28 Oct 2015 12:57:01 -0400 Date: Wed, 28 Oct 2015 18:57:00 +0200 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Message-ID: <1446051411-7363-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Disposition: inline X-Mutt-Fcc: =sent X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Igor Mammedov , Richard Henderson , Eduardo Habkost , Paolo Bonzini Subject: [Qemu-devel] [PATCH 1/2] Revert "pc: memhp: force gaps between DIMM's GPA" X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This reverts commit aa8580cddf011e8cedcf87f7a0fdea7549fc4704. As described in http://article.gmane.org/gmane.comp.emulators.qemu/371432 that commit causes linux guests to crash on memory hot-unplug. The original problem it's trying to solve has now been addressed within virtio. Signed-off-by: Michael S. Tsirkin Reviewed-by: Igor Mammedov --- include/hw/i386/pc.h | 1 - hw/i386/pc.c | 6 ++---- hw/i386/pc_piix.c | 1 - hw/i386/pc_q35.c | 1 - 4 files changed, 2 insertions(+), 7 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index c5961d7..93c6dab 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -60,7 +60,6 @@ struct PCMachineClass { /*< public >*/ bool broken_reserved_end; - bool inter_dimm_gap; HotplugHandler *(*get_hotplug_handler)(MachineState *machine, DeviceState *dev); }; diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 208f553..b1800fc 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1614,7 +1614,6 @@ static void pc_dimm_plug(HotplugHandler *hotplug_dev, HotplugHandlerClass *hhc; Error *local_err = NULL; PCMachineState *pcms = PC_MACHINE(hotplug_dev); - PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms); PCDIMMDevice *dimm = PC_DIMM(dev); PCDIMMDeviceClass *ddc = PC_DIMM_GET_CLASS(dimm); MemoryRegion *mr = ddc->get_memory_region(dimm); @@ -1630,8 +1629,8 @@ static void pc_dimm_plug(HotplugHandler *hotplug_dev, goto out; } - pc_dimm_memory_plug(dev, &pcms->hotplug_memory, mr, align, - pcmc->inter_dimm_gap, &local_err); + pc_dimm_memory_plug(dev, &pcms->hotplug_memory, mr, align, false, + &local_err); if (local_err) { goto out; } @@ -1951,7 +1950,6 @@ static void pc_machine_class_init(ObjectClass *oc, void *data) PCMachineClass *pcmc = PC_MACHINE_CLASS(oc); HotplugHandlerClass *hc = HOTPLUG_HANDLER_CLASS(oc); - pcmc->inter_dimm_gap = true; pcmc->get_hotplug_handler = mc->get_hotplug_handler; mc->get_hotplug_handler = pc_get_hotpug_handler; mc->cpu_index_to_socket_id = pc_cpu_index_to_socket_id; diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 0eacde1..153a445 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -482,7 +482,6 @@ static void pc_i440fx_2_4_machine_options(MachineClass *m) m->alias = NULL; m->is_default = 0; pcmc->broken_reserved_end = true; - pcmc->inter_dimm_gap = false; SET_MACHINE_COMPAT(m, PC_COMPAT_2_4); } diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 3744abd..2f8f396 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -385,7 +385,6 @@ static void pc_q35_2_4_machine_options(MachineClass *m) pc_q35_2_5_machine_options(m); m->alias = NULL; pcmc->broken_reserved_end = true; - pcmc->inter_dimm_gap = false; SET_MACHINE_COMPAT(m, PC_COMPAT_2_4); }