Skip to contentSkip to conversation

x86 fixes

GIT PULL Ingo Molnar 1 participant 1 message Apr 28, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Linus,

Please pull the latest x86-urgent-for-linus git tree from:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-for-linus

# HEAD: 1bdb8970392a68489b469c3a330a1adb5ef61beb x86/apic: Handle zero vector gracefully in clear_vector_irq()

Two boot crash fixes and an IRQ handling crash fix.

Thanks,

Ingo

------------------>
Andy Lutomirski (1):
Revert "x86/mm/32: Set NX in __supported_pte_mask before enabling paging"

Keith Busch (1):
x86/apic: Handle zero vector gracefully in clear_vector_irq()

Ross Lagerwall (1):
xen/qspinlock: Don't kick CPU if IRQ is not initialized

 arch/x86/kernel/apic/vector.c | 3 ++-
 arch/x86/kernel/head_32.S     | 6 ------
 arch/x86/mm/setup_nx.c        | 5 +++--
 arch/x86/xen/spinlock.c       | 6 ++++++
 4 files changed, 11 insertions(+), 9 deletions(-)
arch/x86/kernel/apic/vector.c +2 -1
index ad59d70bcb1a..ef495511f019 100644
@@ -256,7 +256,8 @@ static void clear_irq_vector(int irq, struct apic_chip_data *data)
 	struct irq_desc *desc;
 	int cpu, vector;
 
-	BUG_ON(!data->cfg.vector);
+	if (!data->cfg.vector)
+		return;
 
 	vector = data->cfg.vector;
 	for_each_cpu_and(cpu, data->domain, cpu_online_mask)
arch/x86/kernel/head_32.S +0 -6
index 54cdbd2003fe..af1112980dd4 100644
@@ -389,12 +389,6 @@ ENTRY(startup_32_smp)
 	/* Make changes effective */
 	wrmsr
 
-	/*
-	 * And make sure that all the mappings we set up have NX set from
-	 * the beginning.
-	 */
-	orl $(1 << (_PAGE_BIT_NX - 32)), pa(__supported_pte_mask + 4)
-
 enable_paging:
 
 /*
arch/x86/mm/setup_nx.c +3 -2
index 8bea84724a7d..f65a33f505b6 100644
@@ -32,8 +32,9 @@ early_param("noexec", noexec_setup);
 
 void x86_configure_nx(void)
 {
-	/* If disable_nx is set, clear NX on all new mappings going forward. */
-	if (disable_nx)
+	if (boot_cpu_has(X86_FEATURE_NX) && !disable_nx)
+		__supported_pte_mask |= _PAGE_NX;
+	else
 		__supported_pte_mask &= ~_PAGE_NX;
 }
 
arch/x86/xen/spinlock.c +6 -0
index 9e2ba5c6e1dd..f42e78de1e10 100644
@@ -27,6 +27,12 @@ static bool xen_pvspin = true;
 
 static void xen_qlock_kick(int cpu)
 {
+	int irq = per_cpu(lock_kicker_irq, cpu);
+
+	/* Don't kick if the target's kicker interrupt is not initialized. */
+	if (irq == -1)
+		return;
+
 	xen_send_IPI_one(cpu, XEN_SPIN_UNLOCK_VECTOR);
 }