From patchwork Fri Sep 27 14:43:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 11164665 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6D3571747 for ; Fri, 27 Sep 2019 14:44:52 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 52E7E217D7 for ; Fri, 27 Sep 2019 14:44:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 52E7E217D7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iDrT0-0007WO-5J; Fri, 27 Sep 2019 14:43:30 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iDrSy-0007WJ-NP for xen-devel@lists.xenproject.org; Fri, 27 Sep 2019 14:43:28 +0000 X-Inumbo-ID: 2a82615e-e135-11e9-967a-12813bfff9fa Received: from mx1.suse.de (unknown [195.135.220.15]) by localhost (Halon) with ESMTPS id 2a82615e-e135-11e9-967a-12813bfff9fa; Fri, 27 Sep 2019 14:43:27 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 1FA7DB137; Fri, 27 Sep 2019 14:43:27 +0000 (UTC) To: "xen-devel@lists.xenproject.org" From: Jan Beulich Message-ID: <06e542f4-1ac5-0a70-eb34-3dcd1b543134@suse.com> Date: Fri, 27 Sep 2019 16:43:29 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 Content-Language: en-US Subject: [Xen-devel] [PATCH] x86: correct bogus error indicator of cpu_add() X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Juergen Gross , Andrew Cooper , Wei Liu , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Commit 54ce2db8b8 ("x86/numa: adjust datatypes for node and pxm") changed this from the -1 (i.e. -EPERM, which was already bogus) that comes back from setup_node() to NUMA_NO_NODE (0xff). Use a proper error indicator instead. Signed-off-by: Jan Beulich Acked-by: Andrew Cooper --- a/xen/arch/x86/smpboot.c +++ b/xen/arch/x86/smpboot.c @@ -1281,7 +1281,7 @@ int cpu_add(uint32_t apic_id, uint32_t a "Setup node failed for pxm %x\n", pxm); x86_acpiid_to_apicid[acpi_id] = BAD_APICID; mp_unregister_lapic(apic_id, cpu); - cpu = node; + cpu = -ENOSPC; goto out; } if ( apic_id < MAX_LOCAL_APIC )