aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/xen
diff options
context:
space:
mode:
authorDavid Vrabel <david.vrabel@citrix.com>2015-12-11 09:07:53 -0500
committerThomas Gleixner <tglx@linutronix.de>2015-12-19 15:35:13 -0500
commitd8c98a1d1488747625ad6044d423406e17e99b7a (patch)
treeeb3da23aa3de0360995dd16779a74df328284227 /arch/x86/xen
parent91e2eea98f94a2ebb143d4c4cdeaa4573d62dc17 (diff)
x86/paravirt: Prevent rtc_cmos platform device init on PV guests
Adding the rtc platform device in non-privileged Xen PV guests causes an IRQ conflict because these guests do not have legacy PIC and may allocate irqs in the legacy range. In a single VCPU Xen PV guest we should have: /proc/interrupts: CPU0 0: 4934 xen-percpu-virq timer0 1: 0 xen-percpu-ipi spinlock0 2: 0 xen-percpu-ipi resched0 3: 0 xen-percpu-ipi callfunc0 4: 0 xen-percpu-virq debug0 5: 0 xen-percpu-ipi callfuncsingle0 6: 0 xen-percpu-ipi irqwork0 7: 321 xen-dyn-event xenbus 8: 90 xen-dyn-event hvc_console ... But hvc_console cannot get its interrupt because it is already in use by rtc0 and the console does not work. genirq: Flags mismatch irq 8. 00000000 (hvc_console) vs. 00000000 (rtc0) We can avoid this problem by realizing that unprivileged PV guests (both Xen and lguests) are not supposed to have rtc_cmos device and so adding it is not necessary. Privileged guests (i.e. Xen's dom0) do use it but they should not have irq conflicts since they allocate irqs above legacy range (above gsi_top, in fact). Instead of explicitly testing whether the guest is privileged we can extend pv_info structure to include information about guest's RTC support. Reported-and-tested-by: Sander Eikelenboom <linux@eikelenboom.it> Signed-off-by: David Vrabel <david.vrabel@citrix.com> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Cc: vkuznets@redhat.com Cc: xen-devel@lists.xenproject.org Cc: konrad.wilk@oracle.com Cc: stable@vger.kernel.org # 4.2+ Link: http://lkml.kernel.org/r/1449842873-2613-1-git-send-email-boris.ostrovsky@oracle.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/xen')
-rw-r--r--arch/x86/xen/enlighten.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index d315151411e5..b7de78bdc09c 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -1192,7 +1192,7 @@ static const struct pv_info xen_info __initconst = {
1192#ifdef CONFIG_X86_64 1192#ifdef CONFIG_X86_64
1193 .extra_user_64bit_cs = FLAT_USER_CS64, 1193 .extra_user_64bit_cs = FLAT_USER_CS64,
1194#endif 1194#endif
1195 1195 .features = 0,
1196 .name = "Xen", 1196 .name = "Xen",
1197}; 1197};
1198 1198
@@ -1535,6 +1535,8 @@ asmlinkage __visible void __init xen_start_kernel(void)
1535 1535
1536 /* Install Xen paravirt ops */ 1536 /* Install Xen paravirt ops */
1537 pv_info = xen_info; 1537 pv_info = xen_info;
1538 if (xen_initial_domain())
1539 pv_info.features |= PV_SUPPORTED_RTC;
1538 pv_init_ops = xen_init_ops; 1540 pv_init_ops = xen_init_ops;
1539 pv_apic_ops = xen_apic_ops; 1541 pv_apic_ops = xen_apic_ops;
1540 if (!xen_pvh_domain()) { 1542 if (!xen_pvh_domain()) {