Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: [netbsd-10] src/sys/arch
Module Name: src
Committed By: martin
Date: Sun Jan 25 16:38:53 UTC 2026
Modified Files:
src/sys/arch/amd64/amd64 [netbsd-10]: amd64_trap.S cpufunc.S locore.S
spl.S
src/sys/arch/amd64/include [netbsd-10]: frameasm.h
src/sys/arch/i386/i386 [netbsd-10]: i386_trap.S locore.S spl.S
src/sys/arch/i386/include [netbsd-10]: frameasm.h
src/sys/arch/x86/x86 [netbsd-10]: fpu.c
src/sys/arch/xen/x86 [netbsd-10]: xen_intr.c
Log Message:
Pull up following revision(s) (requested by bouyer in ticket #1226):
sys/arch/amd64/include/frameasm.h: revision 1.56
sys/arch/xen/x86/xen_intr.c: revision 1.32
sys/arch/i386/include/frameasm.h: revision 1.36
sys/arch/i386/i386/locore.S: revision 1.206
sys/arch/amd64/amd64/cpufunc.S: revision 1.71
sys/arch/i386/i386/i386_trap.S: revision 1.25
sys/arch/i386/i386/spl.S: revision 1.59
sys/arch/amd64/amd64/locore.S: revision 1.236
sys/arch/amd64/amd64/spl.S: revision 1.50
sys/arch/x86/x86/fpu.c: revision 1.94
sys/arch/amd64/amd64/amd64_trap.S: revision 1.56
fputrap: enable interrupts before panic(), for consistency.
noticed while working on PR port-xen/58561
updating curcup()->ci_vcpu->evtchn_upcall_mask requires 2 intructions, e.g.
movq CPUVAR(VCPU),%r ## temp_reg ;
movb $1,EVTCHN_UPCALL_MASK(%r ## temp_reg);
With preemption enabled we may be moved to another CPU between the
2 intructions and we end up updating the evtchn_upcall_mask of another VCPU
than the one we're now running on.
Fix for Xen/amd64:
- Add a CLI2 macro, which disables preemtion before the above sequence.
Use it instead of CLI where preemtion may be enabled
- Add DIAGNOSTIC code to check that preemtion is disabled in CLI
- Add DIAGNOSTIC code to check that interrupts are disabled when calling STI
while there, remove PUSHF/POPF macros which are unused
Hopefully fixes PR port-xen/58561
Thanks to Konrad Schroder for testing and Taylor R Campbell for review.
Port amd64 fix for PR port-xen/58561 to i386, with one extra fix:
with recent Xen (maybe since pvshim), traps handlers are called with
interrupts enabled, so adjust the i386 assembly code for this.
updating curcup()->ci_vcpu->evtchn_upcall_mask requires 2 intructions, e.g.
movl CPUVAR(VCPU),reg
movb $1,EVTCHN_UPCALL_MASK(reg)
With preemption enabled we may be moved to another CPU between the
2 intructions and we end up updating the evtchn_upcall_mask of another VCPU
than the one we're now running on.
Fix for Xen/i386:
- Add a CLI2 macro, which disables preemtion before the above sequence.
Use it instead of CLI where preemtion may be enabled
- Add DIAGNOSTIC code to check that preemtion is disabled in CLI
- Add DIAGNOSTIC code to check that interrupts are disabled when calling STI and STIC
- rename PUSHF to PUSHFCLI and change it to both read and disable
EVTCHN_UPCALL_MASK with preemption disabled
- remove the XENPVHVM version of STIC which is unused
To generate a diff of this commit:
cvs rdiff -u -r1.54.4.1 -r1.54.4.2 src/sys/arch/amd64/amd64/amd64_trap.S
cvs rdiff -u -r1.65.18.2 -r1.65.18.3 src/sys/arch/amd64/amd64/cpufunc.S
cvs rdiff -u -r1.214.4.4 -r1.214.4.5 src/sys/arch/amd64/amd64/locore.S
cvs rdiff -u -r1.48 -r1.48.4.1 src/sys/arch/amd64/amd64/spl.S
cvs rdiff -u -r1.55 -r1.55.4.1 src/sys/arch/amd64/include/frameasm.h
cvs rdiff -u -r1.23 -r1.23.4.1 src/sys/arch/i386/i386/i386_trap.S
cvs rdiff -u -r1.190.4.3 -r1.190.4.4 src/sys/arch/i386/i386/locore.S
cvs rdiff -u -r1.57 -r1.57.4.1 src/sys/arch/i386/i386/spl.S
cvs rdiff -u -r1.35 -r1.35.4.1 src/sys/arch/i386/include/frameasm.h
cvs rdiff -u -r1.79.4.5 -r1.79.4.6 src/sys/arch/x86/x86/fpu.c
cvs rdiff -u -r1.30.4.1 -r1.30.4.2 src/sys/arch/xen/x86/xen_intr.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index