History

Merge tag 'for-linus-6.9a-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip

Pull xen fixes from Juergen Gross: "Two fixes when running as Xen PV guests for issues introduced in the 6.9 merge window, both related to apic id handling" * tag 'for-linus-6.9a-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: x86/xen: return a sane initial apic id when running as PV guest x86/xen/smp_pv: Register the boot CPU APIC properly

Linus Torvalds committed 2 years ago

Commit ddb4c3f2 parents f094ee7 802600e2 files · +12 −3Browse files

Unified · Split

2 files
  1. arch/x86/xen/enlighten_pv.c +10 −1
  2. arch/x86/xen/smp_pv.c +2 −2
arch/x86/xen/enlighten_pv.c+10−1
@@ -219,13 +219,21 @@ static __read_mostly unsigned int cpuid_leaf5_edx_val; · 218 unmodified lines
219static void xen_cpuid(unsigned int *ax, unsigned int *bx,219static void xen_cpuid(unsigned int *ax, unsigned int *bx,
220 unsigned int *cx, unsigned int *dx)220 unsigned int *cx, unsigned int *dx)
221{221{
222 unsigned maskebx = ~0;222 unsigned int maskebx = ~0;
223 unsigned int or_ebx = 0;
223 224
224 /*225 /*
225 * Mask out inconvenient features, to try and disable as many226 * Mask out inconvenient features, to try and disable as many
226 * unsupported kernel subsystems as possible.227 * unsupported kernel subsystems as possible.
227 */228 */
228 switch (*ax) {229 switch (*ax) {
230 case 0x1:
231 /* Replace initial APIC ID in bits 24-31 of EBX. */
232 /* See xen_pv_smp_config() for related topology preparations. */
233 maskebx = 0x00ffffff;
234 or_ebx = smp_processor_id() << 24;
235 break;
236
229 case CPUID_MWAIT_LEAF:237 case CPUID_MWAIT_LEAF:
230 /* Synthesize the values.. */238 /* Synthesize the values.. */
231 *ax = 0;239 *ax = 0;
@@ -248,6 +256,7 @@ static void xen_cpuid(unsigned int *ax, unsigned int *bx, · 16 unmodified lines
248 : "0" (*ax), "2" (*cx));256 : "0" (*ax), "2" (*cx));
249 257
250 *bx &= maskebx;258 *bx &= maskebx;
259 *bx |= or_ebx;
251}260}
252 261
253static bool __init xen_check_mwait(void)262static bool __init xen_check_mwait(void)
arch/x86/xen/smp_pv.c+2−2
@@ -154,9 +154,9 @@ static void __init xen_pv_smp_config(void) · 153 unmodified lines
154 u32 apicid = 0;154 u32 apicid = 0;
155 int i;155 int i;
156 156
157 topology_register_boot_apic(apicid++);157 topology_register_boot_apic(apicid);
158 158
159 for (i = 1; i < nr_cpu_ids; i++)159 for (i = 0; i < nr_cpu_ids; i++)
160 topology_register_apic(apicid++, CPU_ACPIID_INVALID, true);160 topology_register_apic(apicid++, CPU_ACPIID_INVALID, true);
161 161
162 /* Pretend to be a proper enumerated system */162 /* Pretend to be a proper enumerated system */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t