VirtualBox

Changeset 87652 in vbox for trunk/src/VBox/VMM/VMMAll


Ignore:
Timestamp:
Feb 9, 2021 12:40:06 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
142694
Message:

AMD IOMMU: bugref:9654 Returns all 1s on PCI physical memory read failures that go through the IOMMU (but don't fake VINF_SUCCESS).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/PDMAllIommu.cpp

    r87494 r87652  
    2525
    2626#include <VBox/vmm/vmcc.h>
     27#include <iprt/string.h>
    2728#ifdef IN_RING3
    2829# include <iprt/mem.h>
     
    122123                if (RT_SUCCESS(rc))
    123124                {
     125                    Assert(cbContig <= cbRead);
    124126                    cbRead -= cbContig;
    125127                    pvBuf   = (void *)((uintptr_t)pvBuf + cbContig);
     
    132134            {
    133135                LogFunc(("IOMMU memory read failed. uDeviceId=%#x GCPhys=%#RGp cb=%zu rc=%Rrc\n", uDeviceId, GCPhys, cbRead, rc));
     136
     137                /*
     138                 * We should initialize the read buffer on failure for devices that don't check
     139                 * return codes (but would verify the data). But we still want to propagate the
     140                 * error code from the IOMMU to the device, see @bugref{9936#c3}.
     141                 */
     142                memset(pvBuf, 0xff, cbRead);
    134143                break;
    135144            }
     
    178187                if (RT_SUCCESS(rc))
    179188                {
     189                    Assert(cbContig <= cbWrite);
    180190                    cbWrite -= cbContig;
    181191                    pvBuf    = (const void *)((uintptr_t)pvBuf + cbContig);
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