From nobody Thu Mar 28 22:55:12 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1585129689; cv=none; d=zohomail.com; s=zohoarc; b=hc3cRMKDpSt3YEexu/sEVY5lTCqlovfstBu2nrRhICT2QOM8Hnm8YIAqEzfFyi5g0VONGtuB/3PtJeTE1yiu2F6s9o5kvVjn3ss1iGQshi1tBPuUSYnQlSAnPQvMEjzTncJ3zEkICq954dqys/IJUFSJebHtsXzBVSzcvyqvm30= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585129689; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=OiFZDJTFclqzjCTSx+nVDwgRLTlGoJoYljIc1b69wDQ=; b=e9DJB0+Agqi96kI6C8WHkCXo18RCNTSZQfozYTaQ32RUz33YMfjuC2QRXVXSR8YyZdefsK0l9o9/I/bC6MsUui3WC+vNXPMuAogUSCtUCDWtspOIO7vWZOfE+mIDzMaSbaGGSga4A+ve+ld3jV9MP2Jwdkj4jnVymhn+hRh1IVU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1585129689317307.9659190882163; Wed, 25 Mar 2020 02:48:09 -0700 (PDT) Received: from localhost ([::1]:32890 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jH2dr-000180-Vd for importer@patchew.org; Wed, 25 Mar 2020 05:48:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55144) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jH2aR-0005Xy-Og for qemu-devel@nongnu.org; Wed, 25 Mar 2020 05:44:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jH2aQ-0005KW-Mc for qemu-devel@nongnu.org; Wed, 25 Mar 2020 05:44:35 -0400 Received: from us-smtp-delivery-74.mimecast.com ([63.128.21.74]:44070) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jH2aQ-0005Js-JK for qemu-devel@nongnu.org; Wed, 25 Mar 2020 05:44:34 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-414-TozugXaMP1qgjiZZCLzYxw-1; Wed, 25 Mar 2020 05:44:32 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5F236DB60 for ; Wed, 25 Mar 2020 09:44:31 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 336568D576; Wed, 25 Mar 2020 09:44:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585129474; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OiFZDJTFclqzjCTSx+nVDwgRLTlGoJoYljIc1b69wDQ=; b=PHGj4rYrbI0WPy63trY70+L7eHrIKQfPKXK2c7PZkXvnBACTJFbt9GfDl5D6rp42deKGOo rpyXkBQF2HdlzVLVIciwlncL62X7Z/vHwiJv0U8kNlkDQoG0ftqDdtg99n+hydVWO/RTNS q7KNi1q02cPdvleRoZhuUt4udl5MOTk= X-MC-Unique: TozugXaMP1qgjiZZCLzYxw-1 From: Igor Mammedov To: qemu-devel@nongnu.org Subject: [PATCH for-5.0 1/2] hostmem: set default prealloc_threads to valid value Date: Wed, 25 Mar 2020 05:44:22 -0400 Message-Id: <20200325094423.24293-2-imammedo@redhat.com> In-Reply-To: <20200325094423.24293-1-imammedo@redhat.com> References: <20200325094423.24293-1-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 63.128.21.74 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, pbonzini@redhat.com, thuth@redhat.com, ehabkost@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Commit 4ebc74dbbf removed default prealloc_threads initialization by mistake, and that makes QEMU crash with division on zero at numpages_per_thread =3D numpages / memset_num_threads; when QEMU is started with following backend -object memory-backend-ram,id=3Dram-node0,prealloc=3Dyes,size=3D128M Return back initialization removed by 4ebc74dbbf to fix issue. Fixes: 4ebc74dbbf7ad50e4101629f3f5da5fdc1544051 Reported-by: Raphael Norwitz Signed-off-by: Igor Mammedov Reviewed-by: Laurent Vivier --- backends/hostmem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/backends/hostmem.c b/backends/hostmem.c index a70867b255..327f9eebc3 100644 --- a/backends/hostmem.c +++ b/backends/hostmem.c @@ -280,6 +280,7 @@ static void host_memory_backend_init(Object *obj) /* TODO: convert access to globals to compat properties */ backend->merge =3D machine_mem_merge(machine); backend->dump =3D machine_dump_guest_core(machine); + backend->prealloc_threads =3D 1; } =20 static void host_memory_backend_post_init(Object *obj) --=20 2.18.1 From nobody Thu Mar 28 22:55:12 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1585129817; cv=none; d=zohomail.com; s=zohoarc; b=Kvc2BBrqXlnUyvqxnyFaHgRzcSj+UsUYOmd2+wN/A2V35sQRJN56pvJq73+eFvRUIKtTzvlM/7CBPBQQFmB5y2S4FgdPq26g99MKmTvGE5bdK5AwLIBrIVpq7kE4AYilBvRZAjcHCEJ1VubF1H/si5oiHA3XEezv+P0B9fa/wh4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585129817; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=ki/dYJkrUgjQUjvX/D1fW1XtB/Q/2tr8F0Jw63mLkjE=; b=QTaObPl1BNGwxSZsswhzZYQbRoErHbboHrpOGYd1RLhBj3mmdPIXffx5S9+ZynqMOEzqVu8hsZTsHw7j+FppiP4yurbLpi75FxJxEIE7ozOVm/gXfqH1E3ObuGnoosMY2QkThxeMq6Hvx3+sqj5L6I7DsW55sQGmuM9Jh5LUCdo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1585129817422430.3328367764067; Wed, 25 Mar 2020 02:50:17 -0700 (PDT) Received: from localhost ([::1]:32910 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jH2fv-0003c4-VP for importer@patchew.org; Wed, 25 Mar 2020 05:50:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55168) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jH2aW-0005dJ-JJ for qemu-devel@nongnu.org; Wed, 25 Mar 2020 05:44:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jH2aV-0005Nv-Il for qemu-devel@nongnu.org; Wed, 25 Mar 2020 05:44:40 -0400 Received: from us-smtp-delivery-74.mimecast.com ([216.205.24.74]:26537) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jH2aV-0005NE-Fk for qemu-devel@nongnu.org; Wed, 25 Mar 2020 05:44:39 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-373-CxzhJLv2O0aHBqC72yLAkQ-1; Wed, 25 Mar 2020 05:44:36 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4D197800D4E for ; Wed, 25 Mar 2020 09:44:35 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id AA51F8D576; Wed, 25 Mar 2020 09:44:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585129478; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ki/dYJkrUgjQUjvX/D1fW1XtB/Q/2tr8F0Jw63mLkjE=; b=dT/DSMubZyYfUQWZeauztLgJZoeCo5vzxQx/mmsQ0nsYwSgJaHDvW1jTRGBhuw0kOtWPn9 28FlVOR0YNMCxAGCNf7zYqGroFHmjyKjWFNfl1mkTACI1eNFjJn75xQcj2dVHDAJboAg3Z Jy4iVAFPj0X4qTA9Yfd12sd2DpCni3U= X-MC-Unique: CxzhJLv2O0aHBqC72yLAkQ-1 From: Igor Mammedov To: qemu-devel@nongnu.org Subject: [PATCH for-5.0 2/2] tests: numa: test one backend with prealloc enabled Date: Wed, 25 Mar 2020 05:44:23 -0400 Message-Id: <20200325094423.24293-3-imammedo@redhat.com> In-Reply-To: <20200325094423.24293-1-imammedo@redhat.com> References: <20200325094423.24293-1-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 216.205.24.74 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, pbonzini@redhat.com, thuth@redhat.com, ehabkost@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" canbalize one backend in hmat test to make sure that prealloc=3Dy is tested Signed-off-by: Igor Mammedov --- tests/qtest/numa-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qtest/numa-test.c b/tests/qtest/numa-test.c index 2f9b7f663a..e1ed6d4322 100644 --- a/tests/qtest/numa-test.c +++ b/tests/qtest/numa-test.c @@ -455,7 +455,7 @@ static void pc_hmat_off_cfg(const void *data) cli =3D make_cli(data, "-nodefaults --preconfig " "-smp 2,sockets=3D2 " "-m 128M,slots=3D2,maxmem=3D1G " - "-object memory-backend-ram,size=3D64M,id=3Dm0 " + "-object memory-backend-ram,size=3D64M,id=3Dm0,pr= ealloc=3Dy " "-object memory-backend-ram,size=3D64M,id=3Dm1 " "-numa node,nodeid=3D0,memdev=3Dm0"); qs =3D qtest_init(cli); --=20 2.18.1