VirtualBox

Changeset 107298 in vbox


Ignore:
Timestamp:
Dec 12, 2024 12:01:08 PM (2 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
166328
Message:

Main/Appliance: Within IMachine::exportTo() only call IPlatform::getX86()
and IPlatformX86::getCPUProperty() if the VM being exported contains an
x86 CPU.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/ApplianceImplExport.cpp

    r106061 r107298  
    147147        uint32_t ulMemSizeMB = mHWData->mMemorySize;
    148148
    149         ComPtr<IPlatformX86> pPlatformX86;
    150         mPlatform->COMGETTER(X86)(pPlatformX86.asOutParam());
    151 
    152         // VRAM size?
    153         // BIOS settings?
    154         // 3D acceleration enabled?
    155         // hardware virtualization enabled?
    156         // nested paging enabled?
    157         // HWVirtExVPIDEnabled?
    158         // PAEEnabled?
    159         // Long mode enabled?
    160         BOOL fLongMode;
    161         hrc = pPlatformX86->GetCPUProperty(CPUPropertyTypeX86_LongMode, &fLongMode);
    162         if (FAILED(hrc)) throw hrc;
     149        PlatformArchitecture_T enmPlatformArch;
     150        mPlatform->COMGETTER(Architecture)(&enmPlatformArch);
     151
     152        BOOL fLongMode = false;
     153        if (enmPlatformArch == PlatformArchitecture_x86)
     154        {
     155            ComPtr<IPlatformX86> pPlatformX86;
     156            mPlatform->COMGETTER(X86)(pPlatformX86.asOutParam());
     157
     158            // VRAM size?
     159            // BIOS settings?
     160            // 3D acceleration enabled?
     161            // hardware virtualization enabled?
     162            // nested paging enabled?
     163            // HWVirtExVPIDEnabled?
     164            // PAEEnabled?
     165            // Long mode enabled?
     166            hrc = pPlatformX86->GetCPUProperty(CPUPropertyTypeX86_LongMode, &fLongMode);
     167            if (FAILED(hrc)) throw hrc;
     168        }
    163169
    164170        // snapshotFolder?
Note: See TracChangeset for help on using the changeset viewer.

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