VirtualBox

Changeset 88322 in vbox for trunk


Ignore:
Timestamp:
Mar 30, 2021 5:41:45 AM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
143541
Message:

Intel IOMMU: bugref:9967 WIP.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Bus/DevIommuIntel.cpp

    r88321 r88322  
    526526    uint64_t const fRoBits   = uCurReg & ~fRwMask;      /* Preserve current read-only and reserved bits. */
    527527    uint64_t const fRwBits   = uReg & fRwMask;          /* Merge newly written read/write bits. */
    528     uint64_t const fRw1cBits = ~(fRw1cMask & uReg);     /* Clear newly written RW1C bits. */
    529     uint64_t const uNewReg   = (fRoBits | fRwBits) & fRw1cBits;
     528    uint64_t const fRw1cBits = uReg & fRw1cMask;        /* Clear 1s written to RW1C bits. */
     529    uint64_t const uNewReg   = (fRoBits | fRwBits) & ~fRw1cBits;
    530530
    531531    /* Write new value to the 64-bit register. */
     
    552552    uint32_t const fRoBits   = uCurReg & ~fRwMask;      /* Preserve current read-only and reserved bits. */
    553553    uint32_t const fRwBits   = uReg & fRwMask;          /* Merge newly written read/write bits. */
    554     uint32_t const fRw1cBits = ~(fRw1cMask & uReg);     /* Clear newly written RW1C bits. */
    555     uint32_t const uNewReg   = (fRoBits | fRwBits) & fRw1cBits;
     554    uint32_t const fRw1cBits = uReg & fRw1cMask;        /* Clear 1s written to RW1C bits. */
     555    uint32_t const uNewReg   = (fRoBits | fRwBits) & ~fRw1cBits;
    556556
    557557    /* Write new value to the 32-bit register. */
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette