Use the new SDM-approved way to serialize x2APIC MSR writes.
SDM editions 64 and below stated that it is enough to use MFENCe or LFENCE to serialize x2APIC register writes. New edition 65 requires either full serialization instruction or MFENCE;LFENCE sequence. Use the later, FreeBSD needs serialization to ensure that writes done before IPI request are visible to the target IPI CPU. Sponsored by: The FreeBSD Foundation MFC after: 1 week
This commit is contained in:
parent
1517c9d893
commit
af317aa4e5
@ -217,6 +217,7 @@ lapic_write32(enum LAPIC_REGISTERS reg, uint32_t val)
|
||||
|
||||
if (x2apic_mode) {
|
||||
mfence();
|
||||
lfence();
|
||||
wrmsr(MSR_APIC_000 + reg, val);
|
||||
} else {
|
||||
*(volatile uint32_t *)(lapic_map + reg * LAPIC_MEM_MUL) = val;
|
||||
|
Loading…
Reference in New Issue
Block a user