Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp78856imm; Mon, 2 Jul 2018 08:00:32 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfjLDGvuKtJEM2+xmHBYzXmBI1FOc40OJcCxjlFTHmDbpt4OgPCaiIiV/o22M++/wLgVrT/ X-Received: by 2002:a62:1157:: with SMTP id z84-v6mr1792127pfi.66.1530543632055; Mon, 02 Jul 2018 08:00:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530543632; cv=none; d=google.com; s=arc-20160816; b=aKQp4tFwemj59Jr+AAALaFRbkRPyd/zGnlH+XOev0POrDQdI5FkbknahPEX4S8x4GG Ukij78g3BjVxzDVXaa5P58d+XASkyA86Qh9UpbSzaKuNZE6mbnvxFgbULOi3jiUHn3ts Ns/2/7LMegmaxLcE9kdNH2Ktsb5xpwOs8hdsVEedR44Pu5VRRqZyv085lRtN0jyFZvpg X2CrhQu48XmvIt6575K3gNrFe63vHYCPLsYfXWUZOnDOhnH3f+7WdjtJpXYsDFEBEmeQ 2/rJMJVFaQYmvDb7fQOLE14A9N0mJDPy6cVZlBjtAwFPJXfvKchpp1P53HA/a82xTglu xidg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=DHJk72UszXC8ghutd4HqS1ReDR4BEFmmWMz8huy57ko=; b=WavjwBRnqbhalIBYrDsKVMtJaarM0Dn+SamH3VNnIWPudV66+u4mh3WfgVI4q0R/DC cmOhTPtgMylXo56T0HTAlDUbm2GpTkR/e/aia75dr7IK8eLxv5pMgsZ6RrKAT+/otlxN D/4Y2omcBPDrUmqXjUkpxsd0ijRZScG+YcZexWbUu/pFlOJ02ypq4JtbyTpT0vhUC15K tuJ6bHLCKdjOTqyabU1Qat3LtQkZ8Fralc7Zi262KdnGOPiL0JRQzjJcoAeg3sDnrflG aUeHoe0+I2eKrIultxLpYu5wYcYLme6E+/QoXjwN4cOXnfkOh/BGrD+8aiyqUYBT3gpX zB0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=KcKGQ2jA; dkim=pass header.i=@codeaurora.org header.s=default header.b=hDdlIomR; 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 l17-v6si17090107pfi.179.2018.07.02.08.00.15; Mon, 02 Jul 2018 08:00:32 -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; dkim=pass header.i=@codeaurora.org header.s=default header.b=KcKGQ2jA; dkim=pass header.i=@codeaurora.org header.s=default header.b=hDdlIomR; 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 S1752573AbeGBO6Z (ORCPT + 99 others); Mon, 2 Jul 2018 10:58:25 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:41254 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752403AbeGBO6U (ORCPT ); Mon, 2 Jul 2018 10:58:20 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 2DD28607EB; Mon, 2 Jul 2018 14:58:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1530543500; bh=ImFkgu7fNyRTmVi15Jb7pwSpNDE2r1ODZuutoKBMdLc=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=KcKGQ2jA7wuRWvOUqaaJideEYIBSvvS14cjuOPy3VjUnYwB7q/E4XK315n6O29dpd 9VK4PaafT7FYcZbEnpDKMKCo2pyuFS35FnTneO5fwX9Lypo9DLuV0zosCyE/bEbkKe HU7+7jw1A0GZi6fCHk46YpoPKEaekEnOpeDEFMnc= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [10.226.60.81] (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: jhugo@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id BEBE76037C; Mon, 2 Jul 2018 14:58:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1530543499; bh=ImFkgu7fNyRTmVi15Jb7pwSpNDE2r1ODZuutoKBMdLc=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=hDdlIomRtPfg39A7M9nMYGQ7gWlpv4QtOUA3KmVJEZ18tpE/z7Z5Wv51RrNjdBtZr gq7yGI3F57yMF+TBHxcidWSWG7PRJ/3dK+tYP2Bgtjhgwv/wpAJaszHDqW1MIY56vm YREaOj+zlSqYsRQ73s5nhk+swuX2JgidbCEsRRO4= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org BEBE76037C Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=jhugo@codeaurora.org Subject: Re: [PATCH] arm64: acpi: reenumerate topology ids To: Andrew Jones , Sudeep Holla Cc: shunyong.yang@hxt-semitech.com, ard.biesheuvel@linaro.org, catalin.marinas@arm.com, will.deacon@arm.com, linux-kernel@vger.kernel.org, jeremy.linton@arm.com, yu.zheng@hxt-semitech.com, linux-arm-kernel@lists.infradead.org References: <20180628145128.10057-1-drjones@redhat.com> <20180628173243.obydzakh2stfs26w@kamzik.brq.redhat.com> <20180629102927.GA18043@e107155-lin> <20180629112354.hefdl2pe72frl6x3@kamzik.brq.redhat.com> <20180629132934.GA16282@e107155-lin> <20180629154608.nqudibf54ti6dpjc@kamzik.brq.redhat.com> From: Jeffrey Hugo Message-ID: <3a393398-b340-84f0-3478-ebd7dba9a0ae@codeaurora.org> Date: Mon, 2 Jul 2018 08:58:17 -0600 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180629154608.nqudibf54ti6dpjc@kamzik.brq.redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/29/2018 9:46 AM, Andrew Jones wrote: > On Fri, Jun 29, 2018 at 02:29:34PM +0100, Sudeep Holla wrote: >> If it matters a lot, vendors must use UID for consistency. Since OS doesn't >> use those IDs for any particular reason, OS must not care. > > That depends. If you look at how topology_logical_package_id() is used in > x86 code you'll see it gets used as an index to an array in a couple > places. If we don't remap arbitrary IDs to counters than we may miss out > on some opportunities to avoid lists. > > Also, we're talking about what's visible to users. I think it's much more > likely to break a user app by exposing topology IDs that have values > greater than the linear CPU numbers (even though properly written apps > shouldn't expect them to be strictly <=), than the opposite. Libvirt has the assumption already that the sysfs numbers correspond to linear CPU numbers, and has an arbitrary limit of 4k. When spinning up a VM, if libvirt sees a CPU ID > 4k, it fails to init the VM since it assumes the host has more than 4k CPUs, which is unsupported. We found this when we were making our UIDs to be the same as MPIDR in MADT. We changed our UIDs to be sequential 0-N numbering to workaround the issue. -- Jeffrey Hugo Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.