From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51239) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0T3b-0005i1-BQ for qemu-devel@nongnu.org; Thu, 04 Jun 2015 07:11:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z0T3a-00026m-23 for qemu-devel@nongnu.org; Thu, 04 Jun 2015 07:11:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43344) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0T3Z-000261-T5 for qemu-devel@nongnu.org; Thu, 04 Jun 2015 07:11:29 -0400 Date: Thu, 4 Jun 2015 13:11:26 +0200 From: "Michael S. Tsirkin" Message-ID: <1433416111-19022-25-git-send-email-mst@redhat.com> References: <1433416111-19022-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1433416111-19022-1-git-send-email-mst@redhat.com> Subject: [Qemu-devel] [PULL 24/28] pc-dimm: don't assert if pc-dimm alignment != hotpluggable mem range size List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , zhanghailiang , Michael Tokarev , Bharata B Rao , Igor Mammedov , Eduardo Habkost From: Igor Mammedov Drop superfluous pc-dimm alignment on hot-pluggable mem range size assert, since it causes QEMU crash during hotplug when hotplugging pc-dimm with alignment bigger than an alignment of hot-pluggable mem range size. Instead allow pc_dimm_get_free_addr() find free address and bail out gracefully later in that function during checking if pc-dimm will fit in hot-pluggable mem range. Signed-off-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/mem/pc-dimm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c index 39f0c97..e70633d 100644 --- a/hw/mem/pc-dimm.c +++ b/hw/mem/pc-dimm.c @@ -211,7 +211,6 @@ uint64_t pc_dimm_get_free_addr(uint64_t address_space_start, uint64_t address_space_end = address_space_start + address_space_size; g_assert(QEMU_ALIGN_UP(address_space_start, align) == address_space_start); - g_assert(QEMU_ALIGN_UP(address_space_size, align) == address_space_size); if (!address_space_size) { error_setg(errp, "memory hotplug is not enabled, " -- MST