Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp374368rwd; Tue, 16 May 2023 02:12:29 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ73BrFmX7PxvQjxmWxKd2E2+cBSnilx3o9VmpR5F3k5AntYYd1F679aAAVuv/8OT4SamLDg X-Received: by 2002:a17:902:7b97:b0:1ae:2e0f:1cf6 with SMTP id w23-20020a1709027b9700b001ae2e0f1cf6mr3258899pll.36.1684228349598; Tue, 16 May 2023 02:12:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684228349; cv=none; d=google.com; s=arc-20160816; b=Ng2fSDfjuak0h2Hw/l2Pf6RhpzNwL0UBya6R1prH6Td0RTxv3TPPvOxtuWm6sMnAPG tyDW8Y37Z5KXZPILNUx+MAwSPnZD8594sj5PDmWfWriXd9B+DKplGJo6jG+7L9sj1GKa GeN3kQuo6zjLfXmTUOkzwBpY20vT3XzFll2Gzf9i5tc8h/bY4LQsuvnyp+U41h0/jeDT E8rIcr3pM8hpBjtRweD7K8wOFtEUG1yna0cuLCZHt5apg/FbipdrkmjObN6lQeS8A6yV d/N9UD2fYVGaS6Mmoi9k1cHNIOhvx0mmCFw2eKFSWB1jYoEEPzdFXzVOQ5HyP9LTXeM7 MN5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=5Dz97XQ5meyngqjRIFPYPmInwSGxHK9PFZi+D8liCts=; b=XIyQ8N8nMiibUSl0C+V26DPRM/gRloezZGaIhsga5u58NpRy+0H+lWhdrRGiWU50Xc z/PvENiDFcu+s5JiG/32q1niLl+2VD1RDW+Tc2p7y4CBW08jA4U6qUY0zcuI3/gGWbJG 9dvKUnkgM/X7CKWQLDBQY/qfHraNxVk3qS86eTJgd07ZZ+8sLZUIVWyMG3aFWRveQyu1 l4mjqTWVzGnu5v1XsXumuqCncsszo0VB0EA7ci/DH9IjmU+VJp7PZO9kLtzK5QxTVh+v aLt+vELZQf65U/0Uk+4S7pZTDOgz8OhlMMH4/R5NhlB8wCU3db6Ko9ulQcLCZnDnRZ+Z n/jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=nOO10I37; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o4-20020a170902d4c400b001a0039e3597si19198833plg.316.2023.05.16.02.12.15; Tue, 16 May 2023 02:12:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=nOO10I37; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231642AbjEPJLG (ORCPT + 99 others); Tue, 16 May 2023 05:11:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231794AbjEPJKG (ORCPT ); Tue, 16 May 2023 05:10:06 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57FE02D53; Tue, 16 May 2023 02:10:04 -0700 (PDT) Date: Tue, 16 May 2023 09:09:58 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1684228199; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5Dz97XQ5meyngqjRIFPYPmInwSGxHK9PFZi+D8liCts=; b=nOO10I37aXxk1FFG76fYu7Q43IDEhTKJ/gM/e66DNuJBhOC45ZmeMx4P+K7IE0BVjineZo ARpBzNoRMbXrw71wMLwoh/8oJsDAVIWSN8vGxZBiIK2nFu7bAqLBBo9imndvq1aX8Q5BgK 7KxEQxFJCM//iJhQvBAFChheAvdsRkFo8yZmAActgwQyEFFBpoyeUBJQHUMZgRiHAfFSTZ 3vNpBPX6wSUQB9tTV3k+vxWAH7lJSjRqSbZjTM1mmxTEh4DVlHpobFWNk723knS8aMBqlz fpscwW6DW1+83tcVfwxvBcglckx9QrtdkE4IWxR/ulXhwldxIS3Jn1YgS/HyPw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1684228199; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5Dz97XQ5meyngqjRIFPYPmInwSGxHK9PFZi+D8liCts=; b=o4ty2sWqQiQ/1JbpLIY8Du3+gJJcROiyCxFY1zrUJPGjgPuQqX/hx6vYruBMmktGNBs7oV wHS6bVA+SEv75kAg== From: "tip-bot2 for Thomas Gleixner" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: smp/core] x86/xen/hvm: Get rid of DEAD_FROZEN handling Cc: Thomas Gleixner , "Peter Zijlstra (Intel)" , Michael Kelley , Oleksandr Natalenko , Helge Deller , "Guilherme G. Piccoli" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230512205256.423407127@linutronix.de> References: <20230512205256.423407127@linutronix.de> MIME-Version: 1.0 Message-ID: <168422819895.404.9292905514858665876.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the smp/core branch of tip: Commit-ID: ab24eb9abb9c60c45119370731735b79ed79f36c Gitweb: https://git.kernel.org/tip/ab24eb9abb9c60c45119370731735b79ed79f36c Author: Thomas Gleixner AuthorDate: Fri, 12 May 2023 23:07:25 +02:00 Committer: Peter Zijlstra CommitterDate: Mon, 15 May 2023 13:44:55 +02:00 x86/xen/hvm: Get rid of DEAD_FROZEN handling No point in this conditional voodoo. Un-initializing the lock mechanism is safe to be called unconditionally even if it was already invoked when the CPU died. Remove the invocation of xen_smp_intr_free() as that has been already cleaned up in xen_cpu_dead_hvm(). Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Tested-by: Michael Kelley Tested-by: Oleksandr Natalenko Tested-by: Helge Deller # parisc Tested-by: Guilherme G. Piccoli # Steam Deck Link: https://lore.kernel.org/r/20230512205256.423407127@linutronix.de --- arch/x86/xen/enlighten_hvm.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/arch/x86/xen/enlighten_hvm.c b/arch/x86/xen/enlighten_hvm.c index c1cd28e..a6820ca 100644 --- a/arch/x86/xen/enlighten_hvm.c +++ b/arch/x86/xen/enlighten_hvm.c @@ -161,13 +161,12 @@ static int xen_cpu_up_prepare_hvm(unsigned int cpu) int rc = 0; /* - * This can happen if CPU was offlined earlier and - * offlining timed out in common_cpu_die(). + * If a CPU was offlined earlier and offlining timed out then the + * lock mechanism is still initialized. Uninit it unconditionally + * as it's safe to call even if already uninited. Interrupts and + * timer have already been handled in xen_cpu_dead_hvm(). */ - if (cpu_report_state(cpu) == CPU_DEAD_FROZEN) { - xen_smp_intr_free(cpu); - xen_uninit_lock_cpu(cpu); - } + xen_uninit_lock_cpu(cpu); if (cpu_acpi_id(cpu) != U32_MAX) per_cpu(xen_vcpu_id, cpu) = cpu_acpi_id(cpu);