-/* $OpenBSD: vector.S,v 1.73 2018/07/12 14:24:54 guenther Exp $ */
+/* $OpenBSD: vector.S,v 1.74 2018/07/21 02:19:54 guenther Exp $ */
/* $NetBSD: vector.S,v 1.5 2004/06/28 09:13:11 fvdl Exp $ */
/*
/* XXX See comment in locore.s */
#define XINTR(name,num) Xintr_##name##num
- KUTEXT
- .globl _C_LABEL(x2apic_eoi)
-_C_LABEL(x2apic_eoi):
+KUENTRY(x2apic_eoi)
pushq %rax
pushq %rcx
pushq %rdx
-/* $OpenBSD: frameasm.h,v 1.18 2018/07/10 08:57:44 guenther Exp $ */
+/* $OpenBSD: frameasm.h,v 1.19 2018/07/21 02:19:54 guenther Exp $ */
/* $NetBSD: frameasm.h,v 1.1 2003/04/26 18:39:40 fvdl Exp $ */
#ifndef _AMD64_MACHINE_FRAMEASM_H
/* For real interrupt code paths, where we can come from userspace */
#define INTRENTRY_LABEL(label) X##label##_untramp
#define INTRENTRY(label) \
- testq $SEL_RPL,24(%rsp) ; \
+ testb $SEL_RPL,24(%rsp) ; \
je INTRENTRY_LABEL(label) ; \
swapgs ; \
movq %rax,CPUVAR(SCRATCH) ; \
+ CODEPATCH_START ; \
movq CPUVAR(KERN_CR3),%rax ; \
- testq %rax,%rax ; \
- jz 98f ; \
movq %rax,%cr3 ; \
+ CODEPATCH_END(CPTAG_MELTDOWN_NOP);\
jmp 98f ; \
.text ; \
+ _ALIGN_TRAPS ; \
.global INTRENTRY_LABEL(label) ; \
INTRENTRY_LABEL(label): /* from kernel */ \
INTR_ENTRY_KERN ; \
jmp 99f ; \
+ _ALIGN_TRAPS ; \
98: /* from userspace */ \
INTR_ENTRY_USER ; \
99: INTR_SAVE_MOST_GPRS_NO_ADJ ; \