From nobody Mon Feb 9 07:05:15 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=suse.com ARC-Seal: i=1; a=rsa-sha256; t=1603360183; cv=none; d=zohomail.com; s=zohoarc; b=nNdUkygSDJcltIx14T1ZaO+0CMFexJ0j6P2d+M/FeifUuX5061Mf4f6+PfRPEyMIqn8abUeD25eSaNB3iZ6nc0el74GeUjrNqp7u5LHizht9zMKqrI1ViIO0Mcynhn/BYilym+j/YeDaAABpvkQr55qcR1na9N5r5j8qXl8ZmWs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603360183; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=I8ggVRtWIXEDLgeQFmioHekHeyrBQ6I5PgwEHN8hSsU=; b=lE7vd07AIvX2IiLQkZ+E83GaEKrdrE1x7v/BqObFfob71T99ue5GvH5/OZxg/AwmCuxAZEcjHCZUn3oM3fX6qrYo8AZXyaJRce1Hx8gG/uaVA3yc6pjEGp8c0ObEjh2W7CHwrpQayE4NaKPOnnDdjaUZwjhTlhCGyE2mtpBUY8c= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 160336018315095.46503445237886; Thu, 22 Oct 2020 02:49:43 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.10307.27382 (Exim 4.92) (envelope-from ) id 1kVXDf-0004VO-5N; Thu, 22 Oct 2020 09:49:15 +0000 Received: by outflank-mailman (output) from mailman id 10307.27382; Thu, 22 Oct 2020 09:49:15 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kVXDf-0004VH-1a; Thu, 22 Oct 2020 09:49:15 +0000 Received: by outflank-mailman (input) for mailman id 10307; Thu, 22 Oct 2020 09:49:13 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kVXDd-0004Uo-9w for xen-devel@lists.xenproject.org; Thu, 22 Oct 2020 09:49:13 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 0925a2cd-08e7-45d3-b8b0-c3fcc99589ae; Thu, 22 Oct 2020 09:49:11 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id CC373AE42; Thu, 22 Oct 2020 09:49:10 +0000 (UTC) Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kVXDd-0004Uo-9w for xen-devel@lists.xenproject.org; Thu, 22 Oct 2020 09:49:13 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 0925a2cd-08e7-45d3-b8b0-c3fcc99589ae; Thu, 22 Oct 2020 09:49:11 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id CC373AE42; Thu, 22 Oct 2020 09:49:10 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 0925a2cd-08e7-45d3-b8b0-c3fcc99589ae X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1603360150; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=I8ggVRtWIXEDLgeQFmioHekHeyrBQ6I5PgwEHN8hSsU=; b=Ju+czaxvRC6i22B87p6i1lSEv88o6z4+BLHbqlqBexcmz64qzWCTf4VZdzQgbq07WzQ3Am iuBhHY6Tskp2xObJCN0baZ6MoRfZ6UGmGpKaIAMDuGBlX7MjjxzQQM47vZpzCmxQGG/D8Y PuQVBSvvao19fFAPagIdg5YcBQ4XNK0= From: Juergen Gross To: xen-devel@lists.xenproject.org, x86@kernel.org, linux-kernel@vger.kernel.org Cc: Juergen Gross , Boris Ostrovsky , Stefano Stabellini , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Jan Beulich Subject: [PATCH v2 3/5] xen/events: only register debug interrupt for 2-level events Date: Thu, 22 Oct 2020 11:49:05 +0200 Message-Id: <20201022094907.28560-4-jgross@suse.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201022094907.28560-1-jgross@suse.com> References: <20201022094907.28560-1-jgross@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @suse.com) Content-Type: text/plain; charset="utf-8" xen_debug_interrupt() is specific to 2-level event handling. So don't register it with fifo event handling being active. Signed-off-by: Juergen Gross Reviewed-by: Jan Beulich --- V2: - rename fifo_events variable to xen_fifo_events (Jan Beulich) --- arch/x86/xen/smp.c | 19 +++++++++++-------- arch/x86/xen/xen-ops.h | 2 ++ drivers/xen/events/events_base.c | 10 ++++++---- 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c index 2097fa0ebdb5..c1b2f764b29a 100644 --- a/arch/x86/xen/smp.c +++ b/arch/x86/xen/smp.c @@ -88,14 +88,17 @@ int xen_smp_intr_init(unsigned int cpu) per_cpu(xen_callfunc_irq, cpu).irq =3D rc; per_cpu(xen_callfunc_irq, cpu).name =3D callfunc_name; =20 - debug_name =3D kasprintf(GFP_KERNEL, "debug%d", cpu); - rc =3D bind_virq_to_irqhandler(VIRQ_DEBUG, cpu, xen_debug_interrupt, - IRQF_PERCPU | IRQF_NOBALANCING, - debug_name, NULL); - if (rc < 0) - goto fail; - per_cpu(xen_debug_irq, cpu).irq =3D rc; - per_cpu(xen_debug_irq, cpu).name =3D debug_name; + if (!xen_fifo_events) { + debug_name =3D kasprintf(GFP_KERNEL, "debug%d", cpu); + rc =3D bind_virq_to_irqhandler(VIRQ_DEBUG, cpu, + xen_debug_interrupt, + IRQF_PERCPU | IRQF_NOBALANCING, + debug_name, NULL); + if (rc < 0) + goto fail; + per_cpu(xen_debug_irq, cpu).irq =3D rc; + per_cpu(xen_debug_irq, cpu).name =3D debug_name; + } =20 callfunc_name =3D kasprintf(GFP_KERNEL, "callfuncsingle%d", cpu); rc =3D bind_ipi_to_irqhandler(XEN_CALL_FUNCTION_SINGLE_VECTOR, diff --git a/arch/x86/xen/xen-ops.h b/arch/x86/xen/xen-ops.h index 45d556f71858..9546c3384c75 100644 --- a/arch/x86/xen/xen-ops.h +++ b/arch/x86/xen/xen-ops.h @@ -29,6 +29,8 @@ extern struct start_info *xen_start_info; extern struct shared_info xen_dummy_shared_info; extern struct shared_info *HYPERVISOR_shared_info; =20 +extern bool xen_fifo_events; + void xen_setup_mfn_list_list(void); void xen_build_mfn_list_list(void); void xen_setup_machphys_mapping(void); diff --git a/drivers/xen/events/events_base.c b/drivers/xen/events/events_b= ase.c index 1c25580c7691..6038c4c35db5 100644 --- a/drivers/xen/events/events_base.c +++ b/drivers/xen/events/events_base.c @@ -2050,8 +2050,8 @@ void xen_setup_callback_vector(void) {} static inline void xen_alloc_callback_vector(void) {} #endif =20 -static bool fifo_events =3D true; -module_param(fifo_events, bool, 0); +bool xen_fifo_events =3D true; +module_param_named(fifo_events, xen_fifo_events, bool, 0); =20 static int xen_evtchn_cpu_prepare(unsigned int cpu) { @@ -2080,10 +2080,12 @@ void __init xen_init_IRQ(void) int ret =3D -EINVAL; evtchn_port_t evtchn; =20 - if (fifo_events) + if (xen_fifo_events) ret =3D xen_evtchn_fifo_init(); - if (ret < 0) + if (ret < 0) { xen_evtchn_2l_init(); + xen_fifo_events =3D false; + } =20 xen_cpu_init_eoi(smp_processor_id()); =20 --=20 2.26.2