From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751818AbdF1QcM (ORCPT ); Wed, 28 Jun 2017 12:32:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33602 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752424AbdF1QcD (ORCPT ); Wed, 28 Jun 2017 12:32:03 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A47977F6A7 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=vkuznets@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com A47977F6A7 From: Vitaly Kuznetsov To: Konrad Rzeszutek Wilk Cc: xen-devel@lists.xenproject.org, Juergen Gross , Boris Ostrovsky , x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [Xen-devel] [PATCH] xen/x86: Don't BUG on CPU0 offlining References: <20170626163930.29697-1-vkuznets@redhat.com> <20170628154424.GH30116@char.us.oracle.com> Date: Wed, 28 Jun 2017 18:31:59 +0200 In-Reply-To: <20170628154424.GH30116@char.us.oracle.com> (Konrad Rzeszutek Wilk's message of "Wed, 28 Jun 2017 11:44:24 -0400") Message-ID: <877ezwvzsw.fsf@vitty.brq.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 28 Jun 2017 16:32:03 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Konrad Rzeszutek Wilk writes: > On Mon, Jun 26, 2017 at 06:39:30PM +0200, Vitaly Kuznetsov wrote: >> CONFIG_BOOTPARAM_HOTPLUG_CPU0 allows to offline CPU0 but Xen HVM guests >> BUG() in xen_teardown_timer(). Remove the BUG_ON(), this is probably a >> leftover from ancient times when CPU0 hotplug was impossible, it works >> just fine for HVM. >> >> Signed-off-by: Vitaly Kuznetsov > > Perhaps: > > BUG_ON(cpu == 0 && xen_pv_domain()); > Linus says no BUG_ONs :-) xen_pv_cpu_disable() has the following: if (cpu == 0) return -EBUSY; as a protection so we won't get to xen_teardown_timer() but if you think additional BUG_ON() protection is justified I'm definitely not against adding it. -- Vitaly