Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3645359imm; Mon, 2 Jul 2018 03:01:34 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJYxQRm+6ljUz2YolAmQRXuZRfaCpHGuxxcu809Ykhk7ajFSizJNJMLtOvwpj4XpZxP3C/m X-Received: by 2002:a17:902:48c8:: with SMTP id u8-v6mr25248310plh.152.1530525694024; Mon, 02 Jul 2018 03:01:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530525693; cv=none; d=google.com; s=arc-20160816; b=fClRkBTgnZUb6MAmNeya5k2WmOOiUot6kptWtDlgcoFBFLGzvAGqsBUyJfkH3anYI6 tcmDbKJ++VBk3n01NdW6iUqGJhEQpN/CmDyxwkKVaoqBaJKkipO611Tmjm5JgwF1Ecb/ bRMTNEyUQaO/poodZl1v7BOjvOO+3MorKY52zRekeI8OxFnYJkT1niOYk1KNl5jSKEPi c1evBQbJp3G1x9yJdtiEPLqKJYPo5Mt9yH/VKowIok/u7z51rM2+KqQxkBFBsPQ6jZQ6 A7j46e1wH9lcjakkBC01DTQpul3dJvseY+vK5/h1d121DIteUuJZ5rKUdvjhANxdum87 ko2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=7tH6bS3aMtqtAf40WqIL0dQjHVAJT+sVwEO3huYScz8=; b=lv54DaavBrGwO6tdu/t16TwTubkXcXwmc8hDjuqrOeW6hBK6IbJpPDrUhVbb8Pd3tz NkCU+adjrm/CxNtQlkKRR2wRgZdbJnz7LCOFOEdor5qJgWY5BLkbOx0I+u2fa8RmexL3 cL3+H23qYWHtbClfIPfIeJghVUubBD9cRyvvXIXsJI9N4D32XSxR4ZNUH3P007CBDa2w slj2lnhkxmMoyWTZr+nvCO7S8fFkf6aTYF4D2gj6TEhtdvzmetuCuu2JjrCFbXarMWYI tX93wlUYNiaCtlaKiTbbYeey4CGcNdAM8RT06gghKSrQII6M2Rnxkqd5GjvEFTzZsTJw aA1w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 32-v6si15395435ple.447.2018.07.02.03.01.18; Mon, 02 Jul 2018 03:01:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933703AbeGBKAI (ORCPT + 99 others); Mon, 2 Jul 2018 06:00:08 -0400 Received: from mx2.suse.de ([195.135.220.15]:34290 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932198AbeGBKAG (ORCPT ); Mon, 2 Jul 2018 06:00:06 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 4C4DEAEC7; Mon, 2 Jul 2018 10:00:05 +0000 (UTC) From: Juergen Gross To: linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, x86@kernel.org Cc: boris.ostrovsky@oracle.com, hpa@zytor.com, tglx@linutronix.de, mingo@redhat.com, Juergen Gross , stable@vger.kernel.org Subject: [PATCH] xen: setup pv irq ops vector earlier Date: Mon, 2 Jul 2018 12:00:01 +0200 Message-Id: <20180702100001.19953-1-jgross@suse.com> X-Mailer: git-send-email 2.13.7 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Setting pv_irq_ops for Xen PV domains should be done as early as possible in order to support e.g. very early printk() usage. Remove the no longer necessary conditional in xen_init_irq_ops() from PVH V1 times to make clear this is a PV only function. Cc: # 4.14 Signed-off-by: Juergen Gross --- arch/x86/xen/enlighten_pv.c | 3 +-- arch/x86/xen/irq.c | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/arch/x86/xen/enlighten_pv.c b/arch/x86/xen/enlighten_pv.c index 8d4e2e1ae60b..0f4cd9e5bed4 100644 --- a/arch/x86/xen/enlighten_pv.c +++ b/arch/x86/xen/enlighten_pv.c @@ -1213,6 +1213,7 @@ asmlinkage __visible void __init xen_start_kernel(void) pv_info = xen_info; pv_init_ops.patch = paravirt_patch_default; pv_cpu_ops = xen_cpu_ops; + xen_init_irq_ops(); x86_platform.get_nmi_reason = xen_get_nmi_reason; @@ -1249,8 +1250,6 @@ asmlinkage __visible void __init xen_start_kernel(void) get_cpu_cap(&boot_cpu_data); x86_configure_nx(); - xen_init_irq_ops(); - /* Let's presume PV guests always boot on vCPU with id 0. */ per_cpu(xen_vcpu_id, 0) = 0; diff --git a/arch/x86/xen/irq.c b/arch/x86/xen/irq.c index 74179852e46c..7515a19fd324 100644 --- a/arch/x86/xen/irq.c +++ b/arch/x86/xen/irq.c @@ -128,8 +128,6 @@ static const struct pv_irq_ops xen_irq_ops __initconst = { void __init xen_init_irq_ops(void) { - /* For PVH we use default pv_irq_ops settings. */ - if (!xen_feature(XENFEAT_hvm_callback_vector)) - pv_irq_ops = xen_irq_ops; + pv_irq_ops = xen_irq_ops; x86_init.irqs.intr_init = xen_init_IRQ; } -- 2.13.7