提交 92c19ea9 编写于 作者: L Linus Torvalds

Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Ingo Molnar:
 "Two boot crash fixes and an IRQ handling crash fix"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/apic: Handle zero vector gracefully in clear_vector_irq()
  Revert "x86/mm/32: Set NX in __supported_pte_mask before enabling paging"
  xen/qspinlock: Don't kick CPU if IRQ is not initialized
...@@ -256,7 +256,8 @@ static void clear_irq_vector(int irq, struct apic_chip_data *data) ...@@ -256,7 +256,8 @@ static void clear_irq_vector(int irq, struct apic_chip_data *data)
struct irq_desc *desc; struct irq_desc *desc;
int cpu, vector; int cpu, vector;
BUG_ON(!data->cfg.vector); if (!data->cfg.vector)
return;
vector = data->cfg.vector; vector = data->cfg.vector;
for_each_cpu_and(cpu, data->domain, cpu_online_mask) for_each_cpu_and(cpu, data->domain, cpu_online_mask)
......
...@@ -389,12 +389,6 @@ default_entry: ...@@ -389,12 +389,6 @@ default_entry:
/* Make changes effective */ /* Make changes effective */
wrmsr 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: enable_paging:
/* /*
......
...@@ -32,8 +32,9 @@ early_param("noexec", noexec_setup); ...@@ -32,8 +32,9 @@ early_param("noexec", noexec_setup);
void x86_configure_nx(void) void x86_configure_nx(void)
{ {
/* If disable_nx is set, clear NX on all new mappings going forward. */ if (boot_cpu_has(X86_FEATURE_NX) && !disable_nx)
if (disable_nx) __supported_pte_mask |= _PAGE_NX;
else
__supported_pte_mask &= ~_PAGE_NX; __supported_pte_mask &= ~_PAGE_NX;
} }
......
...@@ -27,6 +27,12 @@ static bool xen_pvspin = true; ...@@ -27,6 +27,12 @@ static bool xen_pvspin = true;
static void xen_qlock_kick(int cpu) 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); xen_send_IPI_one(cpu, XEN_SPIN_UNLOCK_VECTOR);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册