twx-linux/arch/x86/include/asm
Juergen Gross fe0ba8c23f acpi: Fix suspend with Xen PV
Commit f1e525009493 ("x86/boot: Skip realmode init code when running as
Xen PV guest") missed one code path accessing real_mode_header, leading
to dereferencing NULL when suspending the system under Xen:

    [  348.284004] PM: suspend entry (deep)
    [  348.289532] Filesystems sync: 0.005 seconds
    [  348.291545] Freezing user space processes ... (elapsed 0.000 seconds) done.
    [  348.292457] OOM killer disabled.
    [  348.292462] Freezing remaining freezable tasks ... (elapsed 0.104 seconds) done.
    [  348.396612] printk: Suspending console(s) (use no_console_suspend to debug)
    [  348.749228] PM: suspend devices took 0.352 seconds
    [  348.769713] ACPI: EC: interrupt blocked
    [  348.816077] BUG: kernel NULL pointer dereference, address: 000000000000001c
    [  348.816080] #PF: supervisor read access in kernel mode
    [  348.816081] #PF: error_code(0x0000) - not-present page
    [  348.816083] PGD 0 P4D 0
    [  348.816086] Oops: 0000 [#1] PREEMPT SMP NOPTI
    [  348.816089] CPU: 0 PID: 6764 Comm: systemd-sleep Not tainted 6.1.3-1.fc32.qubes.x86_64 #1
    [  348.816092] Hardware name: Star Labs StarBook/StarBook, BIOS 8.01 07/03/2022
    [  348.816093] RIP: e030:acpi_get_wakeup_address+0xc/0x20

Fix that by adding an optional acpi callback allowing to skip setting
the wakeup address, as in the Xen PV case this will be handled by the
hypervisor anyway.

Fixes: f1e525009493 ("x86/boot: Skip realmode init code when running as Xen PV guest")
Reported-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://lore.kernel.org/all/20230117155724.22940-1-jgross%40suse.com
2023-01-19 13:52:05 -08:00
..
e820 x86/PCI: Revert "x86/PCI: Clip only host bridge windows for E820 regions" 2022-06-17 14:24:14 -05:00
fpu x86/signal: Add ABI prefixes to frame setup functions 2022-10-19 09:58:49 +02:00
numachip
shared Intel Trust Domain Extensions 2022-05-23 17:51:12 -07:00
trace
uv
vdso
xen x86/xen: Add support for HVMOP_set_evtchn_upcall_vector 2022-08-12 11:28:21 +02:00
acenv.h
acpi.h acpi: Fix suspend with Xen PV 2023-01-19 13:52:05 -08:00
acrn.h x86/acrn: Set up timekeeping 2022-08-04 11:11:59 +02:00
agp.h
alternative.h x86/ibt: Implement FineIBT 2022-11-01 13:44:10 +01:00
amd_hsmp.h
amd_nb.h
amd-ibs.h perf/x86/amd: Add IBS OP_DATA2 DataSrc bit definitions 2022-09-29 12:20:54 +02:00
apic.h x86/apic: Handle no CONFIG_X86_X2APIC on systems with x2APIC enabled by BIOS 2022-12-02 14:28:52 +01:00
apicdef.h KVM: x86: lapic: Rename [GET/SET]_APIC_DEST_FIELD to [GET/SET]_XAPIC_DEST_FIELD 2022-06-24 12:44:34 -04:00
apm.h
arch_hweight.h
archrandom.h random: handle archrandom with multiple longs 2022-07-25 13:26:14 +02:00
asm-offsets.h
asm-prototypes.h
asm.h
atomic64_32.h
atomic64_64.h
atomic.h
audit.h
barrier.h
bios_ebda.h
bitops.h x86/asm/bitops: Use __builtin_ctzl() to evaluate constant expressions 2022-09-20 15:35:37 +02:00
boot.h
bootparam_utils.h
bug.h - Remove all the code around GS switching on 32-bit now that it is not 2022-05-23 18:42:07 -07:00
bugs.h
cache.h
cacheflush.h
cacheinfo.h x86/cacheinfo: Switch cache_ap_init() to hotplug callback 2022-11-10 13:12:45 +01:00
ce4100.h
cfi.h x86: Add support for CONFIG_CFI_CLANG 2022-09-26 10:13:16 -07:00
checksum_32.h
checksum_64.h
checksum.h x86: kasan: kmsan: support CONFIG_GENERIC_CSUM on x86, enable it for KASAN/KMSAN 2022-10-03 14:03:24 -07:00
clocksource.h
cmdline.h
cmpxchg_32.h x86/mm/pae: Get rid of set_64bit() 2022-12-15 10:37:27 -08:00
cmpxchg_64.h x86_64: Remove pointless set_64bit() usage 2022-12-15 10:37:27 -08:00
cmpxchg.h
coco.h
compat.h RISC-V Patches for the 5.19 Merge Window, Part 1 2022-05-31 14:10:54 -07:00
cpu_device_id.h
cpu_entry_area.h x86/mm: Randomize per-cpu entry area 2022-12-15 10:37:26 -08:00
cpu.h x86/microcode/intel: Add hdr_type to intel_microcode_sanity_check() 2022-11-18 22:08:19 +01:00
cpufeature.h asm goto: eradicate CC_HAS_ASM_GOTO 2022-08-21 10:06:28 -07:00
cpufeatures.h ARM64: 2022-12-15 11:12:21 -08:00
cpuid.h x86/cpuid: Carve out all CPUID functionality 2022-11-29 20:41:24 +01:00
cpuidle_haltpoll.h
cpumask.h
crash.h
current.h x86/retbleed: Add SKL return thunk 2022-10-17 16:41:15 +02:00
debugreg.h x86/debug: Include percpu.h in debugreg.h to get DECLARE_PER_CPU() et al 2022-11-16 10:12:56 +01:00
delay.h
desc_defs.h
desc.h
device.h
disabled-features.h - Add the call depth tracking mitigation for Retbleed which has 2022-12-14 15:03:00 -08:00
div64.h
dma-mapping.h
dma.h PCI: Move isa_dma_bridge_buggy out of asm/dma.h 2022-07-22 17:24:47 -05:00
dmi.h
doublefault.h
dwarf2.h
edac.h
efi.h efi: x86: Move EFI runtime map sysfs code to arch/x86 2022-11-18 09:14:09 +01:00
elf.h Unification of regset and non-regset sides of ELF coredump 2022-12-12 18:18:34 -08:00
elfcore-compat.h
emergency-restart.h
emulate_prefix.h
enclu.h
entry-common.h x86/cpu: Remove unneeded 64-bit dependency in arch_enter_from_user_mode() 2022-11-22 16:11:57 +01:00
espfix.h
exec.h
extable_fixup_types.h x86: simplify load_unaligned_zeropad() implementation 2022-08-16 11:03:38 -07:00
extable.h x86/extable: Annotate ex_handler_msr_mce() as a dead end 2022-05-27 12:34:45 +02:00
fb.h
fixmap.h
floppy.h
frame.h
fsgsbase.h
ftrace.h ftrace: abstract DYNAMIC_FTRACE_WITH_ARGS accesses 2022-11-18 13:56:41 +00:00
futex.h
gart.h
GEN-for-each-reg.h
genapic.h
geode.h
hardirq.h x86/softirq: Move softirq pending next to current task 2022-10-17 16:41:05 +02:00
highmem.h
hpet.h
hugetlb.h
hw_breakpoint.h perf/hw_breakpoint: Optimize constant number of breakpoint slots 2022-08-30 10:56:22 +02:00
hw_irq.h
hyperv_timer.h clocksource/drivers/hyper-v: Include asm/hyperv-tlfs.h not asm/mshyperv.h 2022-11-17 13:58:32 +01:00
hyperv-tlfs.h ARM64: 2022-12-15 11:12:21 -08:00
hypervisor.h
i8259.h
ia32_unistd.h
ia32.h
ibt.h x86/ibt, objtool: Add IBT_NOSEAL() 2022-08-19 04:05:42 -04:00
idtentry.h
imr.h
inat_types.h
inat.h
init.h
insn-eval.h x86/insn: Avoid namespace clash by separating instruction decoder MMIO type from MMIO trace type 2023-01-03 18:46:06 +01:00
insn.h
inst.h
intel_ds.h
intel_pconfig.h
intel_pt.h
intel_punit_ipc.h
intel_scu_ipc.h
intel_telemetry.h
intel-family.h x86/cpu: Add several Intel server CPU model numbers 2022-11-04 21:12:22 +01:00
intel-mid.h
invpcid.h
io_apic.h
io_bitmap.h
io.h arch/*/: remove CONFIG_VIRT_TO_BUS 2022-06-28 13:20:21 +02:00
iomap.h
iommu.h iommu/vt-d: Allow NVS regions in arch_rmrr_sanity_check() 2022-10-21 10:49:35 +02:00
iosf_mbi.h
irq_remapping.h x86/apic/msi: Remove arch_create_remap_msi_irq_domain() 2022-12-05 22:22:33 +01:00
irq_stack.h x86/percpu: Move irq_stack variables next to current_task 2022-10-17 16:41:05 +02:00
irq_vectors.h
irq_work.h
irq.h
irqdomain.h x86/apic: Remove X86_IRQ_ALLOC_CONTIGUOUS_VECTORS 2022-11-17 15:15:22 +01:00
irqflags.h
ist.h
jailhouse_para.h
jump_label.h
kasan.h x86/kasan: Map shadow for percpu pages on demand 2022-12-15 10:37:26 -08:00
kaslr.h
kbdleds.h
Kbuild
kdebug.h
kexec-bzimage64.h
kexec.h kexec: drop weak attribute from functions 2022-07-15 12:21:16 -04:00
kfence.h
kgdb.h
kmsan.h x86: kmsan: handle CPU entry area 2022-10-03 14:03:26 -07:00
kprobes.h x86/kprobes: Remove unused arch_kprobe_override_function() declaration 2022-09-26 13:20:52 -04:00
kvm_host.h KVM: x86/xen: Avoid deadlock by adding kvm->arch.xen.xen_lock leaf node lock 2023-01-11 17:45:58 -05:00
kvm_page_track.h
kvm_para.h
kvm_types.h
kvm_vcpu_regs.h
kvm-x86-ops.h KVM: x86: Rename 'enable_direct_tlbflush' to 'enable_l2_tlb_flush' 2022-11-18 12:59:00 -05:00
kvm-x86-pmu-ops.h KVM: x86/pmu: Drop amd_event_mapping[] in the KVM context 2022-06-08 04:49:06 -04:00
kvmclock.h
linkage.h x86/ibt: Implement FineIBT 2022-11-01 13:44:10 +01:00
local.h
mach_timer.h
mach_traps.h
math_emu.h
mc146818rtc.h x86/rtc: Rename mach_set_rtc_mmss() to mach_set_cmos_time() 2022-08-14 11:24:29 +02:00
mce.h EDAC/i10nm: Add driver decoder for Ice Lake and Tremont CPUs 2022-09-08 11:40:01 -07:00
mem_encrypt.h x86/mm: move protection_map[] inside the platform 2022-07-17 17:14:38 -07:00
memtype.h x86: Decouple PAT and MTRR handling 2022-11-10 13:12:45 +01:00
microcode_amd.h
microcode_intel.h platform/x86/intel/ifs: Use generic microcode headers and functions 2022-11-19 11:12:06 +01:00
microcode.h x86/microcode: Drop struct ucode_cpu_info.valid 2022-11-02 16:45:46 +01:00
misc.h
mmconfig.h
mmu_context.h
mmu.h
mmzone_32.h
mmzone_64.h
mmzone.h
module.h
mpspec_def.h
mpspec.h
mshyperv.h clocksource/drivers/hyper-v: Include asm/hyperv-tlfs.h not asm/mshyperv.h 2022-11-17 13:58:32 +01:00
msi.h x86/apic/msi: Enable MSI_FLAG_PCI_MSIX_ALLOC_DYN 2022-12-05 22:22:34 +01:00
msr-index.h x86/sev: Add SEV-SNP guest feature negotiation support 2023-01-19 17:29:58 +01:00
msr-trace.h
msr.h
mtrr.h x86/mtrr: Add a stop_machine() handler calling only cache_cpu_init() 2022-11-10 13:12:45 +01:00
mwait.h x86: Remove vendor checks from prefer_mwait_c1_over_halt 2022-06-08 13:00:19 -07:00
nmi.h x86/nmi: Make register_nmi_handler() more robust 2022-05-17 09:25:25 +02:00
nops.h
nospec-branch.h - Add the call depth tracking mitigation for Retbleed which has 2022-12-14 15:03:00 -08:00
numa_32.h
numa.h
olpc_ofw.h
olpc.h
orc_lookup.h
orc_types.h
page_32_types.h
page_32.h
page_64_types.h
page_64.h mm: kmsan: maintain KMSAN metadata for page operations 2022-10-03 14:03:20 -07:00
page_types.h x86/mm: Remove P*D_PAGE_MASK and P*D_PAGE_SIZE macros 2022-12-15 10:37:27 -08:00
page.h
paravirt_api_clock.h
paravirt_types.h x86/paravirt: Remove clobber bitmask from .parainstructions 2022-11-24 13:53:54 +01:00
paravirt.h x86/paravirt: Use common macro for creating simple asm paravirt functions 2022-11-24 13:56:44 +01:00
parport.h
pc-conf-reg.h
pci_x86.h x86/PCI: Revert "x86/PCI: Clip only host bridge windows for E820 regions" 2022-06-17 14:24:14 -05:00
pci-direct.h
pci-functions.h
pci.h x86/apic/vector: Provide MSI parent domain 2022-12-05 22:22:33 +01:00
percpu.h
perf_event_p4.h
perf_event.h perf/x86/core: Zero @lbr instead of returning -1 in x86_perf_get_lbr() stub 2022-11-09 12:31:11 -05:00
pgalloc.h
pgtable_32_areas.h
pgtable_32_types.h
pgtable_32.h mm: remove kern_addr_valid() completely 2022-11-08 17:37:18 -08:00
pgtable_64_types.h x86/mm/pae: Make pmd_t similar to pte_t 2022-12-15 10:37:27 -08:00
pgtable_64.h mm: remove kern_addr_valid() completely 2022-11-08 17:37:18 -08:00
pgtable_areas.h x86/mm: Randomize per-cpu entry area 2022-12-15 10:37:26 -08:00
pgtable_types.h x86/mm/pae: Make pmd_t similar to pte_t 2022-12-15 10:37:27 -08:00
pgtable-2level_types.h
pgtable-2level.h
pgtable-3level_types.h x86/mm/pae: Make pmd_t similar to pte_t 2022-12-15 10:37:27 -08:00
pgtable-3level.h x86/mm/pae: Get rid of set_64bit() 2022-12-15 10:37:27 -08:00
pgtable-invert.h
pgtable.h mm/uffd: sanity check write bit for uffd-wp protected ptes 2022-11-30 15:58:55 -08:00
pkeys.h
pkru.h
platform_sst_audio.h
pm-trace.h
posix_types.h
preempt.h x86/percpu: Move preempt_count next to current_task 2022-10-17 16:41:04 +02:00
probe_roms.h
processor-cyrix.h
processor-flags.h x86/mm: Fix CR3_ADDR_MASK 2022-12-15 10:37:28 -08:00
processor.h - Add the call depth tracking mitigation for Retbleed which has 2022-12-14 15:03:00 -08:00
prom.h
proto.h - Serious sanitization and cleanup of the whole APERF/MPERF and 2022-05-23 18:17:09 -07:00
pti.h
ptrace.h x86/sev: Mark the code returning to user space as syscall gap 2022-05-19 10:56:46 +02:00
purgatory.h
pvclock-abi.h
pvclock.h
qrwlock.h
qspinlock_paravirt.h x86/paravirt: Use common macro for creating simple asm paravirt functions 2022-11-24 13:56:44 +01:00
qspinlock.h
realmode.h x86/boot: Skip realmode init code when running as Xen PV guest 2022-11-25 12:05:22 +01:00
reboot_fixups.h
reboot.h
required-features.h
resctrl.h x86/resctrl: Move MSR defines into msr-index.h 2022-11-27 23:00:45 +01:00
rmwcc.h asm goto: eradicate CC_HAS_ASM_GOTO 2022-08-21 10:06:28 -07:00
seccomp.h
sections.h
segment.h x86/signal/32: Merge native and compat 32-bit signal code 2022-10-19 09:58:49 +02:00
serial.h
set_memory.h x86/mm: Implement native set_memory_rox() 2022-12-15 10:37:27 -08:00
setup_arch.h
setup.h x86/xen: Use clear_bss() for Xen PV guests 2022-07-01 10:57:52 +02:00
sev-common.h
sev.h x86/sev: Mark snp_abort() noreturn 2022-08-25 15:54:03 +02:00
sgx.h x86/sgx: Allow enclaves to use Asynchrounous Exit Notification 2022-11-04 15:33:30 -07:00
shmparam.h
sigcontext.h
sigframe.h
sighandling.h x86/signal: Add ABI prefixes to frame setup functions 2022-10-19 09:58:49 +02:00
signal.h x86/signal: Remove sigset_t parameter from frame setup functions 2022-10-19 09:58:48 +02:00
simd.h
smap.h
smp.h x86/percpu: Move cpu_number next to current_task 2022-10-17 16:41:04 +02:00
softirq_stack.h
sparsemem.h x86: add missing include to sparsemem.h 2022-10-03 14:03:17 -07:00
spec-ctrl.h x86, KVM: remove unnecessary argument to x86_virt_spec_ctrl and callers 2022-11-09 12:26:51 -05:00
special_insns.h x86/fpu: Add a helper to prepare AMX state for low-power CPU idle 2022-07-19 18:46:15 +02:00
spinlock_types.h
spinlock.h
sta2x11.h
stackprotector.h stackprotector: actually use get_random_canary() 2022-11-18 02:18:10 +01:00
stacktrace.h
static_call.h x86/retbleed: Add fine grained Kconfig knobs 2022-06-29 17:43:41 +02:00
string_32.h
string_64.h x86: fortify: kmsan: fix KMSAN fortify builds 2022-10-28 13:37:23 -07:00
string.h
suspend_32.h
suspend_64.h
suspend.h
svm.h x86/hyperv: KVM: Rename "hv_enlightenments" to "hv_vmcb_enlightenments" 2022-11-18 12:58:59 -05:00
switch_to.h x86/cpu: Drop 32-bit Xen PV guest code in update_task_stack() 2022-11-22 16:14:15 +01:00
sync_bitops.h
sync_core.h
syscall_wrapper.h x86/syscall: Include asm/ptrace.h in syscall_wrapper header 2022-10-24 17:57:28 +02:00
syscall.h
syscalls.h
tdx.h x86/tdx: Add a wrapper to get TDREPORT0 from the TDX Module 2022-11-17 11:03:09 -08:00
text-patching.h x86/alternatives: Provide text_poke_copy_locked() 2022-10-17 16:41:11 +02:00
thermal.h
thread_info.h
time.h
timer.h
timex.h x86/tsc: Use fallback for random_get_entropy() instead of zero 2022-05-13 23:59:23 +02:00
tlb.h mmu_gather: Remove per arch tlb_{start,end}_vma() 2022-07-21 10:50:13 -07:00
tlbbatch.h
tlbflush.h - Rename a PKRU macro to make more sense when reading the code 2022-08-01 09:34:39 -07:00
topology.h
trace_clock.h
trap_pf.h
trapnr.h
traps.h
tsc.h x86/tsc: Use fallback for random_get_entropy() instead of zero 2022-05-13 23:59:23 +02:00
uaccess_32.h
uaccess_64.h x86/clear_user: Make it faster 2022-08-18 12:36:42 +02:00
uaccess.h x86: asm: make sure __put_user_size() evaluates pointer once 2022-10-28 13:37:23 -07:00
umip.h
unistd.h
unwind_hints.h objtool: Re-add UNWIND_HINT_{SAVE_RESTORE} 2022-06-27 10:34:00 +02:00
unwind.h
uprobes.h
user32.h
user_32.h
user_64.h
user.h
vdso.h
vermagic.h
vga.h
vgtod.h
virtext.h
vm86.h
vmalloc.h
vmware.h
vmx.h kvm: vmx: keep constant definition format consistent 2022-09-30 07:11:17 -04:00
vmxfeatures.h KVM: VMX: Enable Notify VM exit 2022-06-08 05:56:24 -04:00
vsyscall.h
vvar.h
word-at-a-time.h x86: simplify load_unaligned_zeropad() implementation 2022-08-16 11:03:38 -07:00
x86_init.h x86/boot: Skip realmode init code when running as Xen PV guest 2022-11-25 12:05:22 +01:00
xor_32.h
xor_64.h
xor_avx.h
xor.h