Received: by 10.192.165.148 with SMTP id m20csp637067imm; Fri, 27 Apr 2018 05:11:18 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqo9cBHVXcU7BNL9Jz0puvB11dM7n1p5SXdM73TwZfhncqO+hSQLIiKJQfkBPbKaXayuDad X-Received: by 2002:a65:66c6:: with SMTP id c6-v6mr1951771pgw.127.1524831078187; Fri, 27 Apr 2018 05:11:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524831078; cv=none; d=google.com; s=arc-20160816; b=h9tfRb6kMdINwOCKELZCCxF1HX5zdrg4M2vIA/hBBPOjk1xfMWeY0XQuwXTPyOIrVo /OA1DN93gZverOKxWzzK18EbLu2JuM6Idk2o9TPlGybK5OooykzrIktoKndFy6gZqqbZ WnMQAD4HFCXbLfBWa7NaJ/GjWx+RSySjAd2vgnbQUUioPUGlDZQBSuzfZskXb63+KIv5 PZhx/R7GPAho3NQJhIpg7wAgkjSqhU9YMVoysHCSF8gXWsgbqwVyIP7kBkZSlCCz0ICK dJwvPlIyEnvo1kWZDtU6pg8P5BStCYll4g+db6VjEPLfgsiJS0eQDxR9K/gZrOTrInSx BV5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:in-reply-to:references :subject:cc:to:from:date:message-id:arc-authentication-results; bh=l6meC0JytXorbpj8tS+mwhu5qaio+enBQzxHeZX+tIo=; b=O2vWJ6oVlHg8Hj6czGYxjqpwzAkjkXsofV6hpc6YnRmwGdbHLIpZlakZE852CIc89A iAlhtxa1U+D7yM9wSa/7jcKRDA6mf+kLbc1CP3yNvbrD7BGYJwcPC+gC6OgEy4PMLl3v 8UxtjHRJigkGRlSVsGc7t6bXAkm3tzcojnoqRrbbEuVQeHJqFwrTAJQWiUyooowM0qrH wvW2Tzia6vfjx+8cGvlCw773Qqa5l9Nx0+/VBS5w40nK1+WiV6aQrGDnRMsPnLpSkqUl KQW0tD7wrrPQmelnF4wIZvq2qQsUaYV28BrNCS5sVLZ+ufSlYHFVVVMI4sjZjUj2rrDD Rlfg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t132-v6si1105102pgb.142.2018.04.27.05.11.03; Fri, 27 Apr 2018 05:11:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758183AbeD0MJz convert rfc822-to-8bit (ORCPT + 99 others); Fri, 27 Apr 2018 08:09:55 -0400 Received: from prv1-mh.provo.novell.com ([137.65.248.33]:47698 "EHLO prv1-mh.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758103AbeD0MJo (ORCPT ); Fri, 27 Apr 2018 08:09:44 -0400 Received: from INET-PRV1-MTA by prv1-mh.provo.novell.com with Novell_GroupWise; Fri, 27 Apr 2018 06:09:44 -0600 Message-Id: <5AE3130702000078001BF180@prv1-mh.provo.novell.com> X-Mailer: Novell GroupWise Internet Agent 18.0.0 Date: Fri, 27 Apr 2018 06:09:43 -0600 From: "Jan Beulich" To: Cc: , Subject: Re: recent patch "x86/acpi: Prevent X2APIC id 0xffffffff from being accounted" References: <5AE2CF8802000078001BF017@prv1-mh.provo.novell.com> <12fd36d0-1678-ed57-fec3-c94b430bd23f@cn.fujitsu.com> In-Reply-To: <12fd36d0-1678-ed57-fec3-c94b430bd23f@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8BIT Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>> On 27.04.18 at 10:32, wrote: > At 04/27/2018 03:21 PM, Jan Beulich wrote: >> I've just stumbled across this commit, and I'm wondering if that's actually >> correct (I too have at least one system where such IDs are reported in >> MADT): For offline/absent CPUs, the firmware may not know the APIC IDs > > The MADT table is not reasonable, the Local APIC entries(xAPIC/x2APIC) > in MADT is not always correct as OS want. So, we should do this sanity > check. Of course, sanity checking is necessary. >> at the point MADT is built, so I think it is quite reasonable to put ~0 in >> there. The ACPID spec specifically calls out that the IDs must not change >> across sleep states, which implies to me that they may change across an >> offline period of a CPU. IOW I think such entries still need to contribute to >> the count of disabled CPUs. > > Aha, there are no CPU devices which will map it's physical ID to the > illegal number 0xffffffff, So it will never be used. The ID will never be used, yes, but the CPU may be (after firmware has assigned it a valid ID). > BTW, Limiting the number of the disabled CPUs is also a goal. I'm afraid I don't understand: Limiting the number of disabled CPUs is certainly desirable when those can never be used, but why would you want to do this when they might later get hotplugged? I'm not aware of a way to tell, by just looking at the MADT, which of the two cases apply. Jan