Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'stable/for-linus-3.4-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen

Pull Xen fixes from Konrad Rzeszutek Wilk:
"Some of these had been in existence since the 2.6.27 days, some since
3.0 - and some due to new features added in v3.4.

The one that is most interesting is David's one - in the low-level
assembler code we had be checking events needlessly. With his patch
now we do it when the appropriate flag is set - with the added benefit
that we can process events faster. Stefano's is fixing a mistake
where the Linux IRQ numbers were ACK-ed instead of the Xen IRQ,
resulting in missing interrupts. The other ones are bootup related
that can show up on various hardware."

- In the low-level assembler code we would jump to check events even if
none were present. This incorrect behavior had been there since
2.6.27 days!
- When using the fast-path for ACK-ing interrupts we were using the
Linux IRQ numbers instead of the Xen ones (and they can differ) and
missing interrupts in process.
- Fix bootup crashes when ACPI hotplug CPUs were present and they would
expand past the set number of CPUs we were allocated.
- Deal with broken BIOSes when uploading C-states to the hypervisor.
- Disable the cpuid check for MWAIT_LEAF if the ACPI PAD driver is
loaded. If the ACPI PAD driver is used it will crash, so lets not
export the functionality so the ACPI PAD driver won't load.

* tag 'stable/for-linus-3.4-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
xen: correctly check for pending events when restoring irq flags
xen/acpi: Workaround broken BIOSes exporting non-existing C-states.
xen/smp: Fix crash when booting with ACPI hotplug CPUs.
xen: use the pirq number to check the pirq_eoi_map
xen/enlighten: Disable MWAIT_LEAF so that acpi-pad won't be loaded.

+23 -5
+2 -2
arch/x86/xen/enlighten.c
··· 261 261 262 262 static bool __init xen_check_mwait(void) 263 263 { 264 - #ifdef CONFIG_ACPI 264 + #if defined(CONFIG_ACPI) && !defined(CONFIG_ACPI_PROCESSOR_AGGREGATOR) && \ 265 + !defined(CONFIG_ACPI_PROCESSOR_AGGREGATOR_MODULE) 265 266 struct xen_platform_op op = { 266 267 .cmd = XENPF_set_processor_pminfo, 267 268 .u.set_pminfo.id = -1, ··· 350 349 /* Xen will set CR4.OSXSAVE if supported and not disabled by force */ 351 350 if ((cx & xsave_mask) != xsave_mask) 352 351 cpuid_leaf1_ecx_mask &= ~xsave_mask; /* disable XSAVE & OSXSAVE */ 353 - 354 352 if (xen_check_mwait()) 355 353 cpuid_leaf1_ecx_set_mask = (1 << (X86_FEATURE_MWAIT % 32)); 356 354 }
+15
arch/x86/xen/smp.c
··· 178 178 static void __init xen_filter_cpu_maps(void) 179 179 { 180 180 int i, rc; 181 + unsigned int subtract = 0; 181 182 182 183 if (!xen_initial_domain()) 183 184 return; ··· 193 192 } else { 194 193 set_cpu_possible(i, false); 195 194 set_cpu_present(i, false); 195 + subtract++; 196 196 } 197 197 } 198 + #ifdef CONFIG_HOTPLUG_CPU 199 + /* This is akin to using 'nr_cpus' on the Linux command line. 200 + * Which is OK as when we use 'dom0_max_vcpus=X' we can only 201 + * have up to X, while nr_cpu_ids is greater than X. This 202 + * normally is not a problem, except when CPU hotplugging 203 + * is involved and then there might be more than X CPUs 204 + * in the guest - which will not work as there is no 205 + * hypercall to expand the max number of VCPUs an already 206 + * running guest has. So cap it up to X. */ 207 + if (subtract) 208 + nr_cpu_ids = nr_cpu_ids - subtract; 209 + #endif 210 + 198 211 } 199 212 200 213 static void __init xen_smp_prepare_boot_cpu(void)
+1 -1
arch/x86/xen/xen-asm.S
··· 96 96 97 97 /* check for unmasked and pending */ 98 98 cmpw $0x0001, PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_pending 99 - jz 1f 99 + jnz 1f 100 100 2: call check_events 101 101 1: 102 102 ENDPATCH(xen_restore_fl_direct)
+1 -1
drivers/xen/events.c
··· 274 274 275 275 static bool pirq_check_eoi_map(unsigned irq) 276 276 { 277 - return test_bit(irq, pirq_eoi_map); 277 + return test_bit(pirq_from_irq(irq), pirq_eoi_map); 278 278 } 279 279 280 280 static bool pirq_needs_eoi_flag(unsigned irq)
+4 -1
drivers/xen/xen-acpi-processor.c
··· 128 128 pr_debug(" C%d: %s %d uS\n", 129 129 cx->type, cx->desc, (u32)cx->latency); 130 130 } 131 - } else 131 + } else if (ret != -EINVAL) 132 + /* EINVAL means the ACPI ID is incorrect - meaning the ACPI 133 + * table is referencing a non-existing CPU - which can happen 134 + * with broken ACPI tables. */ 132 135 pr_err(DRV_NAME "(CX): Hypervisor error (%d) for ACPI CPU%u\n", 133 136 ret, _pr->acpi_id); 134 137