Branch: refs/heads/master
Home: https://github.com/tianocore/edk2
Commit: b0bc23d1f246dac977b639470a51bcef1bcd6e1d
https://github.com/tianocore/edk2/commit/b0bc23d1f246dac977b639470a51bcef1bcd6e1d
Author: Aaron Young <[email protected]>
Date: 2025-06-11 (Wed, 11 Jun 2025)
Changed paths:
M UefiCpuPkg/Library/MpInitLib/MpEqu.inc
M UefiCpuPkg/Library/MpInitLib/MpLib.c
M UefiCpuPkg/Library/MpInitLib/MpLib.h
Log Message:
-----------
UefiCpuPkg/MpInitLib: Fix split-lock violation from MP_CPU_EXCHANGE_INFO
A split-lock violation in OVMF was discovered due to the
NumApsExecuting field of the MP_CPU_EXCHANGE_INFO
struct (which is used atomically by the AP Reset Vector
assembly code) crossing a cacheline boundary.
Since the MP_CPU_EXCHANGE_INFO struct is unaligned and
the NumApsExecuting field resides after other non-UINTN aligned
fields in the struct (i.e. GdtrProfile/IdtrProfile), the
NumApsExecuting field was allocated at a non-UINTN aligned
address (crossing a cache-line) resulting in the split-lock
violation.
Therefore, align the MP_CPU_EXCHANGE_INFO struct (on a UINTN
boundary) and move the NumApsExecuting field to before the
GdtrProfile/IdtrProfile fields to ensure it is UINTN aligned and
thus resides within a single cacheline avoiding the split-lock.
Do the same for the ApIndex field as it is also used atomically
and thus subject to a split-lock violation.
Cc: Ray Ni <[email protected]>
Cc: Jiaxin Wu <[email protected]>
Cc: Zhiguang Liu <[email protected]>
Cc: Dun Tan <[email protected]>
Cc: Rahul Kumar <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Cc: Star Zeng <[email protected]>
Signed-off-by: Aaron Young <[email protected]>
To unsubscribe from these emails, change your notification settings at
https://github.com/tianocore/edk2/settings/notifications
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits