You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After updating to Patina 5.1.0 from Patina 4.5.1, the debug log has many prints of MpDxe updating MTRRs with APs. Hundreds of the prints are occurring during OS load.
Expected Behavior
Excessive MpDxe updating MTRRs with APs prints are not present.
Ironically, I was talking to @Javagedes about this not 30 mins ago :). He and I are going to look into it. This would be a perf impact on Intel (because each of these is synced to the APs) and also concerning for stability, that many cache attribute changes (403 in the Q35 boot Joey was looking at) is not expected.
Reacted by Michael Kubacki, Christopher Zurcher and Joey Vagedes
After investigation, CACHE_ATTRIBUTE_CHANGE_EVENT_GROUP is not signaled a single time on Q35 with the C DXE Core. All ~400 signals of this event in the Patina DXE Core come from this signal. This makes it appear as if we do not need to signal this for previously unmapped pages, however @os-d is going to be verifying this and making any appropriate changes. I'm still here to provide assistance as needed. Just let me know.
After investigation, CACHE_ATTRIBUTE_CHANGE_EVENT_GROUP is not signaled a single time on Q35 with the C DXE Core. All ~400 signals of this event in the Patina DXE Core come from this signal. This makes it appear as if we do not need to signal this for previously unmapped pages, however @os-d is going to be verifying this and making any appropriate changes. I'm still here to provide assistance as needed. Just let me know.
The problem here is that we currently don’g have a mechanism to query cache attributes when a page is unmapped. We’ll just return it is unmapped. If the cache attributes have not been changed in MTRRs, then we don’t need to send the event. But, if they have, we need to. I’ll be updating the API to still return cache attributes (or a new API).
A note, we introduced the CACHE_ATTRIBUTE_CHANGE_EVENT_GROUP for Patina, so you’ll never see it in the C core :). The operation still occurs, but without prints or an event because it is all within CpuDxe.
Activity
os-d commentedon Oct 16, 2025
Ironically, I was talking to @Javagedes about this not 30 mins ago :). He and I are going to look into it. This would be a perf impact on Intel (because each of these is synced to the APs) and also concerning for stability, that many cache attribute changes (403 in the Q35 boot Joey was looking at) is not expected.
makubacki commentedon Oct 16, 2025
Placed under the "Memory Management and Protection" tracking issue for now. Feel free to move as needed.
[-][Bug]: Frequent MTRR updates on physical Intel platforms[/-][+][Bug]: Frequent MTRR updates on QEMU Q35[/+]Javagedes commentedon Oct 20, 2025
After investigation,
CACHE_ATTRIBUTE_CHANGE_EVENT_GROUPis not signaled a single time on Q35 with the C DXE Core. All ~400 signals of this event in the Patina DXE Core come from this signal. This makes it appear as if we do not need to signal this for previously unmapped pages, however @os-d is going to be verifying this and making any appropriate changes. I'm still here to provide assistance as needed. Just let me know.os-d commentedon Oct 20, 2025
The problem here is that we currently don’g have a mechanism to query cache attributes when a page is unmapped. We’ll just return it is unmapped. If the cache attributes have not been changed in MTRRs, then we don’t need to send the event. But, if they have, we need to. I’ll be updating the API to still return cache attributes (or a new API).
A note, we introduced the CACHE_ATTRIBUTE_CHANGE_EVENT_GROUP for Patina, so you’ll never see it in the C core :). The operation still occurs, but without prints or an event because it is all within CpuDxe.