VirtualBox

Changeset 57410 in vbox


Ignore:
Timestamp:
Aug 18, 2015 9:58:29 AM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
102174
Message:

Device/Graphics: fix padding if VBOX_WITH_VMSVGA is unset, and make the sanity checks a little more paranoid to get better diagnostics in the future if some VMSVGA related alignment is touched

Location:
trunk/src/VBox/Devices
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/DevVGA.h

    r57393 r57410  
    402402    /** Pointer to the GC vram mapping. */
    403403    RCPTRTYPE(uint8_t *)        vram_ptrRC;
    404     uint32_t                    PaddingMinus1;
     404    uint32_t                    Padding1;
    405405
    406406    /** Pointer to the device instance - R3 Ptr. */
     
    443443    R0PTRTYPE(uint8_t *)        vram_ptrR0;
    444444
    445 #ifdef VBOX_WITH_VMSVGA
    446445# if HC_ARCH_BITS == 32
    447446    uint32_t                    Padding3;
    448447# endif
     448
     449# ifdef VBOX_WITH_VMSVGA
    449450    VMSVGAState                 svga;
    450 #endif
     451# endif
    451452
    452453    /** The number of monitors. */
     
    469470    /** Whether to render the guest VRAM to the framebuffer memory. False only for some LFB modes. */
    470471    bool                        fRenderVRAM;
    471 #ifdef VBOX_WITH_VMSVGA
     472# ifdef VBOX_WITH_VMSVGA
    472473    /* Whether the SVGA emulation is enabled or not. */
    473474    bool                        fVMSVGAEnabled;
    474     bool                        Padding1[1+4];
    475 #else
    476     bool                        Padding1[2+4];
    477 #endif
     475    bool                        Padding4[1+4];
     476# else
     477    bool                        Padding4[2+4];
     478# endif
    478479
    479480    /** Physical access type for the linear frame buffer dirty page tracking. */
  • trunk/src/VBox/Devices/testcase/tstDeviceStructSize.cpp

    r57358 r57410  
    344344    CHECK_MEMBER_ALIGNMENT(SerialState, CritSect, 8);
    345345#ifdef VBOX_WITH_VMSVGA
     346    CHECK_SIZE(VMSVGAState, RT_ALIGN_Z(sizeof(VMSVGAState), 8));
     347    CHECK_MEMBER_ALIGNMENT(VGASTATE, svga, 8);
    346348    CHECK_MEMBER_ALIGNMENT(VGASTATE, svga.u64HostWindowId, 8);
    347349#endif
     350    CHECK_MEMBER_ALIGNMENT(VGASTATE, cMonitors, 8);
    348351    CHECK_MEMBER_ALIGNMENT(VGASTATE, GCPhysVRAM, 8);
    349352    CHECK_MEMBER_ALIGNMENT(VGASTATE, Dev, 8);
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