linux-brain/arch/x86/xen
Juergen Gross 66c88a4793 xen: reset legacy rtc flag for PV domU
commit f68aa100d815b5b4467fd1c3abbe3b99d65fd028 upstream.

A Xen PV guest doesn't have a legacy RTC device, so reset the legacy
RTC flag. Otherwise the following WARN splat will occur at boot:

[    1.333404] WARNING: CPU: 1 PID: 1 at /home/gross/linux/head/drivers/rtc/rtc-mc146818-lib.c:25 mc146818_get_time+0x1be/0x210
[    1.333404] Modules linked in:
[    1.333404] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G        W         5.14.0-rc7-default+ #282
[    1.333404] RIP: e030:mc146818_get_time+0x1be/0x210
[    1.333404] Code: c0 64 01 c5 83 fd 45 89 6b 14 7f 06 83 c5 64 89 6b 14 41 83 ec 01 b8 02 00 00 00 44 89 63 10 5b 5d 41 5c 41 5d 41 5e 41 5f c3 <0f> 0b 48 c7 c7 30 0e ef 82 4c 89 e6 e8 71 2a 24 00 48 c7 c0 ff ff
[    1.333404] RSP: e02b:ffffc90040093df8 EFLAGS: 00010002
[    1.333404] RAX: 00000000000000ff RBX: ffffc90040093e34 RCX: 0000000000000000
[    1.333404] RDX: 0000000000000001 RSI: 0000000000000000 RDI: 000000000000000d
[    1.333404] RBP: ffffffff82ef0e30 R08: ffff888005013e60 R09: 0000000000000000
[    1.333404] R10: ffffffff82373e9b R11: 0000000000033080 R12: 0000000000000200
[    1.333404] R13: 0000000000000000 R14: 0000000000000002 R15: ffffffff82cdc6d4
[    1.333404] FS:  0000000000000000(0000) GS:ffff88807d440000(0000) knlGS:0000000000000000
[    1.333404] CS:  10000e030 DS: 0000 ES: 0000 CR0: 0000000080050033
[    1.333404] CR2: 0000000000000000 CR3: 000000000260a000 CR4: 0000000000050660
[    1.333404] Call Trace:
[    1.333404]  ? wakeup_sources_sysfs_init+0x30/0x30
[    1.333404]  ? rdinit_setup+0x2b/0x2b
[    1.333404]  early_resume_init+0x23/0xa4
[    1.333404]  ? cn_proc_init+0x36/0x36
[    1.333404]  do_one_initcall+0x3e/0x200
[    1.333404]  kernel_init_freeable+0x232/0x28e
[    1.333404]  ? rest_init+0xd0/0xd0
[    1.333404]  kernel_init+0x16/0x120
[    1.333404]  ret_from_fork+0x1f/0x30

Cc: <stable@vger.kernel.org>
Fixes: 8d152e7a5c ("x86/rtc: Replace paravirt rtc check with platform legacy quirk")
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Link: https://lore.kernel.org/r/20210903084937.19392-3-jgross@suse.com
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-22 12:26:39 +02:00
..
Kconfig x86/Kconfig: Add new X86_HV_CALLBACK_VECTOR config symbol 2019-06-11 21:21:11 +02:00
Makefile xen/pvh: Create a new file for Xen specific PVH code 2018-12-13 13:41:49 -05:00
apic.c Merge branch 'WIP.x86/asm' into x86/urgent, because the topic is ready 2018-04-12 09:42:34 +02:00
debugfs.c x86: xen: no need to check return value of debugfs_create functions 2019-06-03 15:49:07 +02:00
debugfs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
efi.c xen/efi: have a common runtime setup function 2019-10-02 10:31:07 -04:00
enlighten.c x86/xen: Return from panic notifier 2019-10-07 17:53:30 -04:00
enlighten_hvm.c x86/xen: Add xen_no_vector_callback option to test PCI INTX delivery 2021-01-27 11:47:45 +01:00
enlighten_pv.c xen: reset legacy rtc flag for PV domU 2021-09-22 12:26:39 +02:00
enlighten_pvh.c xen/pvh: correctly setup the PV EFI interface for dom0 2019-04-25 10:36:25 -04:00
grant-table.c x86/xen: Add SPDX identifier in arch/x86/xen files 2018-09-03 16:50:33 +02:00
irq.c x86/paravirt: Use a single ops structure 2018-09-03 16:50:35 +02:00
mmu.c x86/xen: Add SPDX identifier in arch/x86/xen files 2018-09-03 16:50:33 +02:00
mmu.h mm: update ptep_modify_prot_start/commit to take vm_area_struct as arg 2019-03-05 21:07:18 -08:00
mmu_hvm.c x86/paravirt: Use a single ops structure 2018-09-03 16:50:35 +02:00
mmu_pv.c xen: remove the exports for xen_{create,destroy}_contiguous_region 2019-09-11 12:43:26 +02:00
multicalls.c treewide: Switch printk users from %pf and %pF to %ps and %pS, respectively 2019-04-09 14:19:06 +02:00
multicalls.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
p2m.c xen: fix setting of max_pfn in shared_info 2021-09-22 12:26:20 +02:00
pci-swiotlb-xen.c x86/xen: Add SPDX identifier in arch/x86/xen files 2018-09-03 16:50:33 +02:00
platform-pci-unplug.c xen/pvh: don't try to unplug emulated devices 2018-10-26 09:16:57 +02:00
pmu.c Merge branch 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2018-10-23 16:16:40 +01:00
pmu.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
setup.c x86/xen: dont add memory above max allowed allocation 2019-02-18 06:52:51 +01:00
smp.c x86/xen: Calculate __max_logical_packages on PV domains 2018-02-17 09:40:45 +01:00
smp.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
smp_hvm.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
smp_pv.c x86: Fix early boot crash on gcc-10, third try 2020-05-20 08:20:34 +02:00
spinlock.c x86/xen: don't unbind uninitialized lock_kicker_irq 2020-12-02 08:49:48 +01:00
suspend.c x86/xen: Zero MSR_IA32_SPEC_CTRL before suspend 2018-02-28 16:03:19 +01:00
suspend_hvm.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
suspend_pv.c x86/xen/time: Initialize pv xen time in init_hypervisor_platform() 2018-07-20 00:02:39 +02:00
time.c x86/xen: Add "xen_timer_slop" command line option 2019-04-23 11:06:26 -04:00
trace.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vdso.h x86/xen: Add SPDX identifier in arch/x86/xen files 2018-09-03 16:50:33 +02:00
vga.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xen-asm.S x86/paravirt: Make read_cr2() CALLEE_SAVE 2019-07-17 23:17:37 +02:00
xen-asm_32.S x86/asm/32: Add ENDs to some functions and relabel with SYM_CODE_* 2021-01-17 14:05:30 +01:00
xen-asm_64.S xen/pv: Fix a boot up hang revealed by int3 self test 2019-07-17 08:09:59 +02:00
xen-head.S x86/irq/64: Split the IRQ stack into its own pages 2019-04-17 15:37:02 +02:00
xen-ops.h x86/paravirt: Make read_cr2() CALLEE_SAVE 2019-07-17 23:17:37 +02:00