Skip to content

[Bug]: Frequent MTRR updates on QEMU Q35 #899

Closed

Description

@makubacki

Is there an existing issue for this?

  • I have searched existing issues

Current Behavior

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.

Steps To Reproduce

Boot Patina v5.1.0 on QEMU Q35.

Build Environment

N/A

Version Information

Tag: v5.1.0

Urgency

Medium

Are you going to fix this?

Someone else needs to fix it

Do you need maintainer feedback?

No maintainer feedback needed

Anything else?

No response

Activity

  1. added
    state:needs-triage
    type:bug
    on Oct 16, 2025
  2. added
    urgency:medium
    state:needs-owner
    on Oct 16, 2025
  3. moved this to Backlog in Patinaon Oct 16, 2025
  4. added theissue type on Oct 16, 2025
  5. moved this from Backlog to Committed in Patinaon Oct 16, 2025
  6. removed
    state:needs-owner
    on Oct 16, 2025
  7. os-d commented on Oct 16, 2025

    @os-d
    Contributor

    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.

  8. makubacki commented on Oct 16, 2025

    @makubacki
    CollaboratorAuthor

    Placed under the "Memory Management and Protection" tracking issue for now. Feel free to move as needed.

  9. changed the title [-][Bug]: Frequent MTRR updates on physical Intel platforms[/-] [+][Bug]: Frequent MTRR updates on QEMU Q35[/+] on Oct 16, 2025
  10. Javagedes commented on Oct 20, 2025

    @Javagedes
    Contributor

    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.

  11. os-d commented on Oct 20, 2025

    @os-d
    Contributor

    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.

  12. added this to the First Major Release milestone on Oct 29, 2025
  13. moved this from Committed to Done in Patinaon Oct 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

state:needs-triagetype:bugurgency:medium

Type

Projects

  • Status
    Done

Relationships

None yet

Development

No branches or pull requests

Issue actions