From patchwork Tue Feb 12 21:48:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1040878 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43zc2h6rzbz9s4Z for ; Wed, 13 Feb 2019 08:57:32 +1100 (AEDT) Received: from localhost ([127.0.0.1]:46706 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gtg3W-0001eK-VA for incoming@patchwork.ozlabs.org; Tue, 12 Feb 2019 16:57:31 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43195) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gtg2v-0001cu-S1 for qemu-devel@nongnu.org; Tue, 12 Feb 2019 16:56:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gtg2v-0006AJ-14 for qemu-devel@nongnu.org; Tue, 12 Feb 2019 16:56:53 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33880) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gtg2u-0005uo-R8; Tue, 12 Feb 2019 16:56:52 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9BA89285B3; Tue, 12 Feb 2019 21:48:31 +0000 (UTC) Received: from thinkpad.redhat.com (ovpn-204-62.brq.redhat.com [10.40.204.62]) by smtp.corp.redhat.com (Postfix) with ESMTP id B84F31001F54; Tue, 12 Feb 2019 21:48:28 +0000 (UTC) From: Laurent Vivier To: qemu-devel@nongnu.org Date: Tue, 12 Feb 2019 22:48:23 +0100 Message-Id: <20190212214827.30543-1-lvivier@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Tue, 12 Feb 2019 21:48:32 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [RFC 0/4] numa, spapr: add thread-id in the possible_cpus list X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Thomas Huth , Eduardo Habkost , qemu-ppc@nongnu.org, Igor Mammedov , Paolo Bonzini , David Gibson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" There are inconsistencies between the command line using "-numa node,cpus=XX" and what is checked internally: the XX is supposed to be a CPU number, but for SPAPR it's taken as a core number, ignoring the threads. (See the description message of PATCH 1 for more details) This series fixes this problem by introducing the threads in the possible_cpus list instead of only the cores. To avoid inconsistent topology, it doesn't allow anymore to have an incomplete CPU NUMA config on the command line (there was already a message announcing it will be absoleted for 2 years). Laurent Vivier (4): numa,spapr: add thread-id in the possible_cpus list numa: exit on incomplete CPU mapping numa: move cpu_slot_to_string() upper in the function numa: check threads of the same core are on the same node hw/core/machine.c | 115 ++++++++++++++++++++++++++-------------------- hw/ppc/spapr.c | 33 ++++++------- tests/numa-test.c | 24 +--------- 3 files changed, 81 insertions(+), 91 deletions(-)