Skip to content

Commit 54dedb5

Browse files
committed
Merge tag 'for-linus-5.6-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip
Pull xen fixes from Juergen Gross: "Two small fixes for Xen: - a fix to avoid warnings with new gcc - a fix for incorrectly disabled interrupts when calling _cond_resched()" * tag 'for-linus-5.6-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen: Enable interrupts when calling _cond_resched() x86/xen: Distribute switch variables for initialization
2 parents 63f01d8 + 8645e56 commit 54dedb5

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

arch/x86/xen/enlighten_pv.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -896,14 +896,15 @@ static u64 xen_read_msr_safe(unsigned int msr, int *err)
896896
static int xen_write_msr_safe(unsigned int msr, unsigned low, unsigned high)
897897
{
898898
int ret;
899+
#ifdef CONFIG_X86_64
900+
unsigned int which;
901+
u64 base;
902+
#endif
899903

900904
ret = 0;
901905

902906
switch (msr) {
903907
#ifdef CONFIG_X86_64
904-
unsigned which;
905-
u64 base;
906-
907908
case MSR_FS_BASE: which = SEGBASE_FS; goto set;
908909
case MSR_KERNEL_GS_BASE: which = SEGBASE_GS_USER; goto set;
909910
case MSR_GS_BASE: which = SEGBASE_GS_KERNEL; goto set;

drivers/xen/preempt.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ asmlinkage __visible void xen_maybe_preempt_hcall(void)
3333
* cpu.
3434
*/
3535
__this_cpu_write(xen_in_preemptible_hcall, false);
36-
_cond_resched();
36+
local_irq_enable();
37+
cond_resched();
38+
local_irq_disable();
3739
__this_cpu_write(xen_in_preemptible_hcall, true);
3840
}
3941
}

0 commit comments

Comments
 (0)