aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/apic/vector.c3
-rw-r--r--arch/x86/kernel/head_32.S6
-rw-r--r--arch/x86/mm/setup_nx.c5
-rw-r--r--arch/x86/xen/spinlock.c6
4 files changed, 11 insertions, 9 deletions
diff --git a/arch/x86/kernel/apic/vector.c b/arch/x86/kernel/apic/vector.c
index 26d3ccc63e40..a5e400afc563 100644
--- a/arch/x86/kernel/apic/vector.c
+++ b/arch/x86/kernel/apic/vector.c
@@ -256,7 +256,8 @@ static void clear_irq_vector(int irq, struct apic_chip_data *data)
256 struct irq_desc *desc; 256 struct irq_desc *desc;
257 int cpu, vector; 257 int cpu, vector;
258 258
259 BUG_ON(!data->cfg.vector); 259 if (!data->cfg.vector)
260 return;
260 261
261 vector = data->cfg.vector; 262 vector = data->cfg.vector;
262 for_each_cpu_and(cpu, data->domain, cpu_online_mask) 263 for_each_cpu_and(cpu, data->domain, cpu_online_mask)
diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S
index 6770865fde6b..6f8902b0d151 100644
--- a/arch/x86/kernel/head_32.S
+++ b/arch/x86/kernel/head_32.S
@@ -389,12 +389,6 @@ default_entry:
389 /* Make changes effective */ 389 /* Make changes effective */
390 wrmsr 390 wrmsr
391 391
392 /*
393 * And make sure that all the mappings we set up have NX set from
394 * the beginning.
395 */
396 orl $(1 << (_PAGE_BIT_NX - 32)), pa(__supported_pte_mask + 4)
397
398enable_paging: 392enable_paging:
399 393
400/* 394/*
diff --git a/arch/x86/mm/setup_nx.c b/arch/x86/mm/setup_nx.c
index 8bea84724a7d..f65a33f505b6 100644
--- a/arch/x86/mm/setup_nx.c
+++ b/arch/x86/mm/setup_nx.c
@@ -32,8 +32,9 @@ early_param("noexec", noexec_setup);
32 32
33void x86_configure_nx(void) 33void x86_configure_nx(void)
34{ 34{
35 /* If disable_nx is set, clear NX on all new mappings going forward. */ 35 if (boot_cpu_has(X86_FEATURE_NX) && !disable_nx)
36 if (disable_nx) 36 __supported_pte_mask |= _PAGE_NX;
37 else
37 __supported_pte_mask &= ~_PAGE_NX; 38 __supported_pte_mask &= ~_PAGE_NX;
38} 39}
39 40
diff --git a/arch/x86/xen/spinlock.c b/arch/x86/xen/spinlock.c
index 9e2ba5c6e1dd..f42e78de1e10 100644
--- a/arch/x86/xen/spinlock.c
+++ b/arch/x86/xen/spinlock.c
@@ -27,6 +27,12 @@ static bool xen_pvspin = true;
27 27
28static void xen_qlock_kick(int cpu) 28static void xen_qlock_kick(int cpu)
29{ 29{
30 int irq = per_cpu(lock_kicker_irq, cpu);
31
32 /* Don't kick if the target's kicker interrupt is not initialized. */
33 if (irq == -1)
34 return;
35
30 xen_send_IPI_one(cpu, XEN_SPIN_UNLOCK_VECTOR); 36 xen_send_IPI_one(cpu, XEN_SPIN_UNLOCK_VECTOR);
31} 37}
32 38