From patchwork Fri Feb 18 10:22:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li Zhang X-Patchwork-Id: 1594627 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=MZ7opK3y; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=+8mzkIdR; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4K0STX6FPFz9sFk for ; Fri, 18 Feb 2022 21:23:43 +1100 (AEDT) Received: from localhost ([::1]:45428 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nL0QN-0006wk-2p for incoming@patchwork.ozlabs.org; Fri, 18 Feb 2022 05:23:39 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39942) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nL0PR-0006wF-AW for qemu-devel@nongnu.org; Fri, 18 Feb 2022 05:22:41 -0500 Received: from smtp-out1.suse.de ([195.135.220.28]:58794) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nL0PP-0003GT-F7 for qemu-devel@nongnu.org; Fri, 18 Feb 2022 05:22:41 -0500 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id A4EF6219A4; Fri, 18 Feb 2022 10:22:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1645179756; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=dugz9vRHh12lMPR9qnwhun1ziXLugz+P12IgwRkgZGo=; b=MZ7opK3yU1rLmosUljND1s/VvHUSC9tTJhXY3Xo3mqJwcxN6hV1V/vE18j6p9tXBSPbnoe i/MBmO82eXNkwVwtxlgbXnlGKXun/GXa4PVpxt5IKCndRkntylkp2WM3qUjkbyT50vaXTS 8440gg1bJUt+je4boQQZWWJFyWZs7hw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1645179756; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=dugz9vRHh12lMPR9qnwhun1ziXLugz+P12IgwRkgZGo=; b=+8mzkIdRqvBqCB3co5l4fCh8md7Io7CSVfMWOd7sOeKr2gjUdmfXU6LIvYyFQQ0+nS/5HB 6+OnXE4aZ8d9+JBA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 638CE13C5B; Fri, 18 Feb 2022 10:22:36 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id bPy0FmxzD2LfBwAAMHmgww (envelope-from ); Fri, 18 Feb 2022 10:22:36 +0000 From: Li Zhang To: imammedo@redhat.com, eduardo@habkost.net, marcel.apfelbaum@gmail.com, f4bug@amsat.org, wangyanan55@huawei.com, qemu-devel@nongnu.org Subject: [PATCH v2 1/1] numa: check NUMA nodes with memdev specified Date: Fri, 18 Feb 2022 11:22:09 +0100 Message-Id: <20220218102209.8263-1-lizhang@suse.de> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Received-SPF: pass client-ip=195.135.220.28; envelope-from=lizhang@suse.de; helo=smtp-out1.suse.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Li Zhang Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" If there is no memdev in numa configuration, it always reports the error as the following: total memory for NUMA nodes (0x0) should equal RAM size (0x100000000) This error is confusing, and the total memory is the memory of NUMA nodes with memdev specified actually. The memory size of a node without memdev specified is always 0. So it's better to remind users to check the memory of the NUMA nodes with memdev specified. Signed-off-by: Li Zhang --- hw/core/numa.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/core/numa.c b/hw/core/numa.c index 1aa05dcf42..7e1dbab0d5 100644 --- a/hw/core/numa.c +++ b/hw/core/numa.c @@ -688,7 +688,8 @@ void numa_complete_configuration(MachineState *ms) numa_total += numa_info[i].node_mem; } if (numa_total != ms->ram_size) { - error_report("total memory for NUMA nodes (0x%" PRIx64 ")" + error_report("total memory for NUMA nodes specified" + " with memdev backend memory (0x%" PRIx64 ")" " should equal RAM size (0x" RAM_ADDR_FMT ")", numa_total, ms->ram_size); exit(1);