NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

PR/58561 CVS commit: src/sys/arch



The following reply was made to PR port-xen/58561; it has been noted by GNATS.

From: "Manuel Bouyer" <bouyer%netbsd.org@localhost>
To: gnats-bugs%gnats.NetBSD.org@localhost
Cc: 
Subject: PR/58561 CVS commit: src/sys/arch
Date: Sat, 17 Jan 2026 10:53:20 +0000

 Module Name:	src
 Committed By:	bouyer
 Date:		Sat Jan 17 10:53:19 UTC 2026
 
 Modified Files:
 	src/sys/arch/amd64/amd64: amd64_trap.S cpufunc.S locore.S spl.S
 	src/sys/arch/amd64/include: frameasm.h
 	src/sys/arch/xen/x86: xen_intr.c
 
 Log Message:
 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.
 
 
 To generate a diff of this commit:
 cvs rdiff -u -r1.55 -r1.56 src/sys/arch/amd64/amd64/amd64_trap.S
 cvs rdiff -u -r1.70 -r1.71 src/sys/arch/amd64/amd64/cpufunc.S
 cvs rdiff -u -r1.235 -r1.236 src/sys/arch/amd64/amd64/locore.S
 cvs rdiff -u -r1.49 -r1.50 src/sys/arch/amd64/amd64/spl.S
 cvs rdiff -u -r1.55 -r1.56 src/sys/arch/amd64/include/frameasm.h
 cvs rdiff -u -r1.31 -r1.32 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