Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1575004

[PATCH v3 5/9] xen/pvh: Make sure we don't use ACPI_IRQ_MODEL_PIC for SCI

From Boris Ostrovsky <boris.ostrovsky@oracle.com>
Newsgroups linux.kernel
Subject [PATCH v3 5/9] xen/pvh: Make sure we don't use ACPI_IRQ_MODEL_PIC for SCI
Date 2017-02-06 18:10 +0100
Message-ID <t7UXE-7LS-33@gated-at.bofh.it> (permalink)
References <t7UXD-7LS-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Since we are not using PIC and (at least currently) don't have IOAPIC
we want to make sure that acpi_irq_model doesn't stay set to
ACPI_IRQ_MODEL_PIC (which is the default value). If we allowed it to
stay then acpi_os_install_interrupt_handler() would try (and fail) to
request_irq() for PIC.

Instead we set the model to ACPI_IRQ_MODEL_PLATFORM which will prevent
this from happening.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
---
Changes in v3:
* Moved update of acpi_irq_model to x86_init.oem.arch_setup() (i.e.
  after ACPI has been initialized so we know whether or not we have
  IOAPICs). Clarified comit message.
* Moved xen_hvm_init_shared_info() into patch 4.

 arch/x86/xen/enlighten.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index d2144f7..6d406f3 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -1672,6 +1672,16 @@ asmlinkage __visible void __init xen_start_kernel(void)
 }
 
 #ifdef CONFIG_XEN_PVH
+
+static void xen_pvh_arch_setup(void)
+{
+#ifdef CONFIG_ACPI
+	/* Make sure we don't fall back to (default) ACPI_IRQ_MODEL_PIC. */
+	if (nr_ioapics == 0)
+		acpi_irq_model = ACPI_IRQ_MODEL_PLATFORM;
+#endif
+}
+
 static void __init init_pvh_bootparams(void)
 {
 	struct xen_memory_map memmap;
@@ -1752,6 +1762,8 @@ void __init xen_prepare_pvh(void)
 	wrmsr_safe(msr, (u32)pfn, (u32)(pfn >> 32));
 
 	init_pvh_bootparams();
+
+	x86_init.oem.arch_setup = xen_pvh_arch_setup;
 }
 #endif
 
-- 
2.7.4

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3 0/9] PVH v2 support (domU) Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2017-02-06 18:10 +0100
  [PATCH v3 6/9] xen/pvh: Initialize grant table for PVH guests Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2017-02-06 18:10 +0100
  [PATCH v3 7/9] xen/pvh: PVH guests always have PV devices Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2017-02-06 18:10 +0100
  [PATCH v3 8/9] xen/pvh: Enable CPU hotplug Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2017-02-06 18:10 +0100
  [PATCH v3 5/9] xen/pvh: Make sure we don't use ACPI_IRQ_MODEL_PIC for SCI Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2017-02-06 18:10 +0100
    Re: [PATCH v3 5/9] xen/pvh: Make sure we don't use ACPI_IRQ_MODEL_PIC  for SCI Juergen Gross <jgross@suse.com> - 2017-02-07 11:20 +0100
  [PATCH v3 2/9] xen/x86: Remove PVH support Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2017-02-06 18:10 +0100
  [PATCH v3 9/9] xen/pvh: Use Xen's emergency_restart op for PVH guests Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2017-02-06 18:10 +0100
  [PATCH v3 1/9] x86/boot/32: Convert the 32-bit pgtable setup code from assembly to C Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2017-02-06 18:10 +0100
  [PATCH v3 4/9] xen/pvh: Bootstrap PVH guest Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2017-02-06 18:10 +0100
    Re: [Xen-devel] [PATCH v3 4/9] xen/pvh: Bootstrap PVH guest kbuild test robot <lkp@intel.com> - 2017-02-06 20:40 +0100
      Re: [Xen-devel] [PATCH v3 4/9] xen/pvh: Bootstrap PVH guest Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2017-02-06 21:40 +0100
        Re: [Xen-devel] [PATCH v3 4/9] xen/pvh: Bootstrap PVH guest Juergen Gross <jgross@suse.com> - 2017-02-07 11:10 +0100
  Re: [PATCH v3 0/9] PVH v2 support (domU) Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2017-02-07 18:50 +0100

csiph-web