From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 31A8BC001DE for ; Fri, 4 Aug 2023 20:03:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229452AbjHDUDH (ORCPT ); Fri, 4 Aug 2023 16:03:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229640AbjHDUDC (ORCPT ); Fri, 4 Aug 2023 16:03:02 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3AC0E6E for ; Fri, 4 Aug 2023 13:03:01 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1691179380; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=2RY+KCV1GUXfeSnkP8tqvx9zZQuvcAFi0lgOCs2qp6A=; b=VPuvWxgS9WL0RP96ZN9kUdijJh3CwzcQey6tV9zq51WWMR+uqIvVv2qV1JJfsLrKQJOGYZ 8G2imsLnzehztKlKlL/znmIinXQvadpPvnnWBPLuRbjBimLRsF3FbZRexso+yi48Hs3zLY hZ7x5lLwGU/QYpENg2QfNAZjHkKgSnaiMVd2m+Sh9eZqSMCDMwvClwa2nTdNnwN/PJ98QT xxkLAXihGNfLh6nqo+3cXeZa4bHnYGCGPKn/QIIvvRLo7bK/MJlVxHau+CVTdVt5MrdQCT yTrf5P3MSAtedixtVuCnkRwF0cLgPupogvmVjUmNDPIWsGuatTUBG/xYhMwePQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1691179380; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=2RY+KCV1GUXfeSnkP8tqvx9zZQuvcAFi0lgOCs2qp6A=; b=x+AFNYVBEQEQ2mok/wwqJqI0IAODMT/+/KmVcqEkm4uQO5F9vgNUaEHE03U4udST8Z7qrm O/yTL92kiOU5CTDQ== To: Borislav Petkov Cc: LKML , x86@kernel.org, Tom Lendacky , Andrew Cooper , Arjan van de Ven , Huang Rui , Juergen Gross , Dimitri Sivanich , Michael Kelley , Wei Liu Subject: Re: [patch V3 02/40] x86/apic: Fake primary thread mask for XEN/PV In-Reply-To: <20230804181243.GLZM0/m0xXb/wMpUcD@fat_crate.local> References: <20230802101635.459108805@linutronix.de> <20230802101932.819070039@linutronix.de> <20230804181243.GLZM0/m0xXb/wMpUcD@fat_crate.local> Date: Fri, 04 Aug 2023 22:02:59 +0200 Message-ID: <87r0oimv7w.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 04 2023 at 20:12, Borislav Petkov wrote: >> @@ -2344,6 +2346,15 @@ static int __init smp_init_primary_threa >> { >> unsigned int cpu; >> >> + /* >> + * XEN/PV provides either none or useless topology information. >> + * Pretend that all vCPUs are primary threads. >> + */ >> + if (xen_pv_domain()) { >> + cpumask_copy(&__cpu_primary_thread_mask, cpu_possible_mask); >> + return 0; >> + } > > Can this be somewhere in the Xen init code instead? Not for now. That's all going away with the 3rd installment. But right now it's the right place to be.