Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1670538ybk; Mon, 11 May 2020 01:18:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx63OYmO3qg6IOFMDO6SbPo8zkPU/3IRt7CdrJz0/VwXwTgb9T9AsfyFrscyPbJVXwmRYW6 X-Received: by 2002:a50:c091:: with SMTP id k17mr1556768edf.106.1589185102674; Mon, 11 May 2020 01:18:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589185102; cv=none; d=google.com; s=arc-20160816; b=d/fE7GLAkBYjszhS3Uzi1Ta6zvqn886rDZMGyMPQaJ8kUDkKm1U8cHObz+3Ulcel5K 5cpsMPTc+3h8ehQzIsa2MMj9dqGcJ9d6tTAh7J2XwWKWPZSURcGlG1g/FyftodkSXq0V qKQ1K054nzntbPwl/nMA8zITeeYm6bdcKbL0KjSf1fbcMyfKKVP1STvW8fE32tsuiDXD 4yleaBa6loUReLiV41SZVcuUvI6acgYzsz+dRGD4m+w3AGYYrqJFqWfMe5WegaLGwoCe dX4sIS/b9Qrxofm/Dp8GCd8QOwQKrNS8IMUTNswXa+4sTgbtJviMLC8+GPnu+3i4PKL0 yNoA== 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; bh=gRjx6HnAb9Sf0AutscvpVPh68c9zGYkCKwRLy950u+0=; b=E3e9Cq3sfMOOWrz1yYuOSyfQ69R9Yw336Bs2dwzG8cywdUg3vnbZCM16F4AM2ggGU4 PZeb73kXIR5ZjoBAyUL4tzticpQyH5RWloA1LCYdyvSCrykzk/El9H9ZBSsujrdkhAlb c7ohUOtVTugR7pTZULC3ZGkxvDCPW7/HuUbIfu1RejHOwDkVnx391kqaOjj/8st4G/m4 pKeHYMsk6xv0MxxZIF4zd83sltGMNAGKOuSbswRxuMRwCj6eyiUI1EvPHi8MK3xzoW2q keowLHn3S68UWzUccLygSd8BSQBoXFKEyhwzgJ1UigpLG2hknc2EkWZ3CILffk3jQXZT MMVA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m5si1717864eds.245.2020.05.11.01.18.00; Mon, 11 May 2020 01:18:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728937AbgEKIQK (ORCPT + 99 others); Mon, 11 May 2020 04:16:10 -0400 Received: from mx2.suse.de ([195.135.220.15]:42626 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726319AbgEKIQK (ORCPT ); Mon, 11 May 2020 04:16:10 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 3810CB07B; Mon, 11 May 2020 08:16:11 +0000 (UTC) Subject: Re: [PATCH] xen/cpuhotplug: Fix initial CPU offlining for PV(H) guests To: Boris Ostrovsky , xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org Cc: sstabellini@kernel.org References: <1588976923-3667-1-git-send-email-boris.ostrovsky@oracle.com> From: =?UTF-8?B?SsO8cmdlbiBHcm/Dnw==?= Message-ID: <8a94d819-5143-58e2-9bd2-1cc341ba3a80@suse.com> Date: Mon, 11 May 2020 10:16:07 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <1588976923-3667-1-git-send-email-boris.ostrovsky@oracle.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 09.05.20 00:28, Boris Ostrovsky wrote: > Commit a926f81d2f6c ("xen/cpuhotplug: Replace cpu_up/down() with > device_online/offline()") replaced cpu_down() with device_offline() > call which requires that the CPU has been registered before. This > registration, however, happens later from topology_init() which > is called as subsys_initcall(). setup_vcpu_hotplug_event(), on the > other hand, is invoked earlier, during arch_initcall(). > > As result, booting a PV(H) guest with vcpus < maxvcpus causes a crash. > > Move setup_vcpu_hotplug_event() (and therefore setup_cpu_watcher()) to > late_initcall(). In addition, instead of performing all offlining steps > in setup_cpu_watcher() simply call disable_hotplug_cpu(). > > Fixes: a926f81d2f6c (xen/cpuhotplug: Replace cpu_up/down() with device_online/offline()" > Signed-off-by: Boris Ostrovsky Reviewed-by: Juergen Gross Juergen