Skip to content

Commit c31496d

Browse files
committed
Merge tag 'for-linus-4.18-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip
Pull xen fixes from Juergen Gross: "Two related fixes for a boot failure of Xen PV guests" * tag 'for-linus-4.18-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen: setup pv irq ops vector earlier xen: remove global bit from __default_kernel_pte_mask for pv guests
2 parents 2da8c42 + 0ce0bba commit c31496d

File tree

2 files changed

+13
-16
lines changed

2 files changed

+13
-16
lines changed

arch/x86/xen/enlighten_pv.c

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,12 +1207,20 @@ asmlinkage __visible void __init xen_start_kernel(void)
12071207

12081208
xen_setup_features();
12091209

1210-
xen_setup_machphys_mapping();
1211-
12121210
/* Install Xen paravirt ops */
12131211
pv_info = xen_info;
12141212
pv_init_ops.patch = paravirt_patch_default;
12151213
pv_cpu_ops = xen_cpu_ops;
1214+
xen_init_irq_ops();
1215+
1216+
/*
1217+
* Setup xen_vcpu early because it is needed for
1218+
* local_irq_disable(), irqs_disabled(), e.g. in printk().
1219+
*
1220+
* Don't do the full vcpu_info placement stuff until we have
1221+
* the cpu_possible_mask and a non-dummy shared_info.
1222+
*/
1223+
xen_vcpu_info_reset(0);
12161224

12171225
x86_platform.get_nmi_reason = xen_get_nmi_reason;
12181226

@@ -1225,10 +1233,12 @@ asmlinkage __visible void __init xen_start_kernel(void)
12251233
* Set up some pagetable state before starting to set any ptes.
12261234
*/
12271235

1236+
xen_setup_machphys_mapping();
12281237
xen_init_mmu_ops();
12291238

12301239
/* Prevent unwanted bits from being set in PTEs. */
12311240
__supported_pte_mask &= ~_PAGE_GLOBAL;
1241+
__default_kernel_pte_mask &= ~_PAGE_GLOBAL;
12321242

12331243
/*
12341244
* Prevent page tables from being allocated in highmem, even
@@ -1249,20 +1259,9 @@ asmlinkage __visible void __init xen_start_kernel(void)
12491259
get_cpu_cap(&boot_cpu_data);
12501260
x86_configure_nx();
12511261

1252-
xen_init_irq_ops();
1253-
12541262
/* Let's presume PV guests always boot on vCPU with id 0. */
12551263
per_cpu(xen_vcpu_id, 0) = 0;
12561264

1257-
/*
1258-
* Setup xen_vcpu early because idt_setup_early_handler needs it for
1259-
* local_irq_disable(), irqs_disabled().
1260-
*
1261-
* Don't do the full vcpu_info placement stuff until we have
1262-
* the cpu_possible_mask and a non-dummy shared_info.
1263-
*/
1264-
xen_vcpu_info_reset(0);
1265-
12661265
idt_setup_early_handler();
12671266

12681267
xen_init_capabilities();

arch/x86/xen/irq.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,6 @@ static const struct pv_irq_ops xen_irq_ops __initconst = {
128128

129129
void __init xen_init_irq_ops(void)
130130
{
131-
/* For PVH we use default pv_irq_ops settings. */
132-
if (!xen_feature(XENFEAT_hvm_callback_vector))
133-
pv_irq_ops = xen_irq_ops;
131+
pv_irq_ops = xen_irq_ops;
134132
x86_init.irqs.intr_init = xen_init_IRQ;
135133
}

0 commit comments

Comments
 (0)