- Timestamp:
- May 19, 2016 11:57:10 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 13 edited
-
include/VBox/settings.h (modified) (2 diffs)
-
src/VBox/Devices/EFI/DevEFI.cpp (modified) (4 diffs)
-
src/VBox/Devices/PC/DevPcBios.cpp (modified) (3 diffs)
-
src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp (modified) (2 diffs)
-
src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp (modified) (3 diffs)
-
src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp (modified) (7 diffs)
-
src/VBox/Main/idl/VirtualBox.xidl (modified) (7 diffs)
-
src/VBox/Main/include/BIOSSettingsImpl.h (modified) (2 diffs)
-
src/VBox/Main/include/MachineImpl.h (modified) (1 diff)
-
src/VBox/Main/src-client/ConsoleImpl2.cpp (modified) (8 diffs)
-
src/VBox/Main/src-server/BIOSSettingsImpl.cpp (modified) (2 diffs)
-
src/VBox/Main/src-server/MachineImpl.cpp (modified) (5 diffs)
-
src/VBox/Main/xml/Settings.cpp (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/settings.h
r61036 r61042 463 463 fIOAPICEnabled, 464 464 fLogoFadeIn, 465 fLogoFadeOut; 465 fLogoFadeOut, 466 fPXEDebugEnabled; 466 467 uint32_t ulLogoDisplayTime; 468 BIOSBootMenuMode_T biosBootMenuMode; 469 APICMode_T apicMode; // requires settings version 1.16 (VirtualBox 5.1) 470 int64_t llTimeOffset; 467 471 com::Utf8Str strLogoImagePath; 468 BIOSBootMenuMode_T biosBootMenuMode;469 bool fPXEDebugEnabled;470 int64_t llTimeOffset;471 472 }; 472 473 … … 892 893 fSyntheticCpu, 893 894 fTripleFaultReset, 894 fPAE; 895 fPAE, 896 fAPIC, // requires settings version 1.16 (VirtualBox 5.1) 897 fX2APIC; // requires settings version 1.16 (VirtualBox 5.1) 895 898 typedef enum LongModeType { LongMode_Enabled, LongMode_Disabled, LongMode_Legacy } LongModeType; 896 899 LongModeType enmLongMode; -
trunk/src/VBox/Devices/EFI/DevEFI.cpp
r58170 r61042 5 5 6 6 /* 7 * Copyright (C) 2006-201 5Oracle Corporation7 * Copyright (C) 2006-2016 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 202 202 /** I/O-APIC enabled? */ 203 203 uint8_t u8IOAPIC; 204 205 /** APIC mode to be set up by firmware. */ 206 uint8_t u8APIC; 204 207 205 208 /** Boot parameters passed to the firmware. */ … … 2100 2103 "UUID\0" 2101 2104 "IOAPIC\0" 2105 "APIC\0" 2102 2106 "DmiBIOSFirmwareMajor\0" 2103 2107 "DmiBIOSFirmwareMinor\0" … … 2150 2154 return PDMDEV_SET_ERROR(pDevIns, rc, 2151 2155 N_("Configuration error: Failed to read \"IOAPIC\"")); 2156 2157 rc = CFGMR3QueryU8Def(pCfg, "APIC", &pThis->u8APIC, 1); 2158 if (RT_FAILURE (rc)) 2159 return PDMDEV_SET_ERROR(pDevIns, rc, 2160 N_("Configuration error: Failed to read \"APIC\"")); 2152 2161 2153 2162 /* -
trunk/src/VBox/Devices/PC/DevPcBios.cpp
r60433 r61042 193 193 /** I/O-APIC enabled? */ 194 194 uint8_t u8IOAPIC; 195 /** APIC mode to be set up by BIOS */ 196 uint8_t u8APIC; 195 197 /** PXE debug logging enabled? */ 196 198 uint8_t u8PXEDebug; … … 1101 1103 "UUID\0" 1102 1104 "IOAPIC\0" 1105 "APIC\0" 1103 1106 "NumCPUs\0" 1104 1107 "McfgBase\0" … … 1177 1180 return PDMDEV_SET_ERROR(pDevIns, rc, 1178 1181 N_("Configuration error: Failed to read \"IOAPIC\"")); 1182 1183 rc = CFGMR3QueryU8Def(pCfg, "APIC", &pThis->u8APIC, 1); 1184 if (RT_FAILURE (rc)) 1185 return PDMDEV_SET_ERROR(pDevIns, rc, 1186 N_("Configuration error: Failed to read \"APIC\"")); 1179 1187 1180 1188 static const char * const s_apszBootDevices[] = { "BootDevice0", "BootDevice1", "BootDevice2", "BootDevice3" }; -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
r60734 r61042 681 681 " [--hpet on|off]\n" 682 682 " [--triplefaultreset on|off]\n" 683 " [--apic on|off]\n" 684 " [--x2apic on|off]\n" 683 685 " [--paravirtprovider none|default|legacy|minimal|\n" 684 686 " hyperv|kvm]\n" … … 720 722 " [--bioslogoimagepath <imagepath>]\n" 721 723 " [--biosbootmenu disabled|menuonly|messageandmenu]\n" 724 " [--biosapic disabled|apic|x2apic]\n" 722 725 " [--biossystemtimeoffset <msec>]\n" 723 726 " [--biospxedebug on|off]\n" -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp
r60410 r61042 5 5 6 6 /* 7 * Copyright (C) 2006-201 5Oracle Corporation7 * Copyright (C) 2006-2016 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 618 618 SHOW_BOOLEAN_METHOD( machine, GetCPUProperty(CPUPropertyType_PAE, &f), "pae", "PAE"); 619 619 SHOW_BOOLEAN_METHOD( machine, GetCPUProperty(CPUPropertyType_LongMode, &f), "longmode", "Long Mode"); 620 SHOW_BOOLEAN_METHOD( machine, GetCPUProperty(CPUPropertyType_TripleFaultReset, &f), "triplefaultreset", "Triple Fault Reset"); 621 SHOW_BOOLEAN_METHOD( machine, GetCPUProperty(CPUPropertyType_APIC, &f), "apic", "APIC"); 622 SHOW_BOOLEAN_METHOD( machine, GetCPUProperty(CPUPropertyType_X2APIC, &f), "x2apic", "X2APIC"); 620 623 SHOW_ULONG_PROP( machine, CPUIDPortabilityLevel, "cpuid-portability-level", "CPUID Portability Level", ""); 621 624 … … 738 741 SHOW_BOOLEAN_PROP(biosSettings, ACPIEnabled, "acpi", "ACPI"); 739 742 SHOW_BOOLEAN_PROP(biosSettings, IOAPICEnabled, "ioapic", "IOAPIC"); 743 744 APICMode_T apicMode; 745 CHECK_ERROR2I_RET(biosSettings, COMGETTER(APICMode)(&apicMode), hrcCheck); 746 const char *pszAPIC; 747 switch (apicMode) 748 { 749 case APICMode_Disabled: 750 pszAPIC = "disabled"; 751 break; 752 case APICMode_APIC: 753 default: 754 if (details == VMINFO_MACHINEREADABLE) 755 pszAPIC = "apic"; 756 else 757 pszAPIC = "APIC"; 758 break; 759 case APICMode_X2APIC: 760 if (details == VMINFO_MACHINEREADABLE) 761 pszBootMenu = "x2apic"; 762 else 763 pszBootMenu = "x2APIC"; 764 break; 765 } 766 if (details == VMINFO_MACHINEREADABLE) 767 RTPrintf("biosapic=\"%s\"\n", pszAPIC); 768 else 769 RTPrintf("BIOS APIC mode: %s\n", pszAPIC); 770 740 771 SHOW_LONG64_PROP(biosSettings, TimeOffset, "biossystemtimeoffset", "Time offset", "ms"); 741 772 SHOW_BOOLEAN_PROP_EX(machine, RTCUseUTC, "rtcuseutc", "RTC", "UTC", "local time"); -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
r60410 r61042 5 5 6 6 /* 7 * Copyright (C) 2006-201 5Oracle Corporation7 * Copyright (C) 2006-2016 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 63 63 MODIFYVM_CPUID_PORTABILITY, 64 64 MODIFYVM_TFRESET, 65 MODIFYVM_APIC, 66 MODIFYVM_X2APIC, 65 67 MODIFYVM_PARAVIRTPROVIDER, 66 68 MODIFYVM_PARAVIRTDEBUG, … … 89 91 MODIFYVM_BIOSLOGOIMAGEPATH, 90 92 MODIFYVM_BIOSBOOTMENU, 93 MODIFYVM_BIOSAPIC, 91 94 MODIFYVM_BIOSSYSTEMTIMEOFFSET, 92 95 MODIFYVM_BIOSPXEDEBUG, … … 236 239 { "--cpuid-portability-level", MODIFYVM_CPUID_PORTABILITY, RTGETOPT_REQ_UINT32 }, 237 240 { "--triplefaultreset", MODIFYVM_TFRESET, RTGETOPT_REQ_BOOL_ONOFF }, 241 { "--apic", MODIFYVM_APIC, RTGETOPT_REQ_BOOL_ONOFF }, 242 { "--x2apic", MODIFYVM_X2APIC, RTGETOPT_REQ_BOOL_ONOFF }, 238 243 { "--paravirtprovider", MODIFYVM_PARAVIRTPROVIDER, RTGETOPT_REQ_STRING }, 239 244 { "--paravirtdebug", MODIFYVM_PARAVIRTDEBUG, RTGETOPT_REQ_STRING }, … … 265 270 { "--biosbootmenu", MODIFYVM_BIOSBOOTMENU, RTGETOPT_REQ_STRING }, 266 271 { "--biossystemtimeoffset", MODIFYVM_BIOSSYSTEMTIMEOFFSET, RTGETOPT_REQ_INT64 }, 272 { "--biosapic", MODIFYVM_BIOSAPIC, RTGETOPT_REQ_STRING }, 267 273 { "--biospxedebug", MODIFYVM_BIOSPXEDEBUG, RTGETOPT_REQ_BOOL_ONOFF }, 268 274 { "--boot", MODIFYVM_BOOT, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX }, … … 672 678 } 673 679 680 case MODIFYVM_APIC: 681 { 682 CHECK_ERROR(sessionMachine, SetCPUProperty(CPUPropertyType_APIC, ValueUnion.f)); 683 break; 684 } 685 686 case MODIFYVM_X2APIC: 687 { 688 CHECK_ERROR(sessionMachine, SetCPUProperty(CPUPropertyType_X2APIC, ValueUnion.f)); 689 break; 690 } 691 674 692 case MODIFYVM_PARAVIRTPROVIDER: 675 693 { … … 887 905 { 888 906 errorArgument("Invalid --biosbootmenu argument '%s'", ValueUnion.psz); 907 rc = E_FAIL; 908 } 909 break; 910 } 911 912 case MODIFYVM_BIOSAPIC: 913 { 914 if (!RTStrICmp(ValueUnion.psz, "disabled")) 915 { 916 CHECK_ERROR(biosSettings, COMSETTER(APICMode)(APICMode_Disabled)); 917 } 918 else if ( !RTStrICmp(ValueUnion.psz, "apic") 919 || !RTStrICmp(ValueUnion.psz, "lapic") 920 || !RTStrICmp(ValueUnion.psz, "xapic")) 921 { 922 CHECK_ERROR(biosSettings, COMSETTER(APICMode)(APICMode_APIC)); 923 } 924 else if (!RTStrICmp(ValueUnion.psz, "x2apic")) 925 { 926 CHECK_ERROR(biosSettings, COMSETTER(APICMode)(APICMode_X2APIC)); 927 } 928 else 929 { 930 errorArgument("Invalid --biosapic argument '%s'", ValueUnion.psz); 889 931 rc = E_FAIL; 890 932 } -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r61009 r61042 570 570 <desc>Settings version "1.16", written by VirtualBox 5.1.x.</desc> 571 571 <!-- 572 Machine changes: NVMe storage controller. 572 Machine changes: NVMe storage controller, paravirt debug options, CPU 573 profile and BIOS/CPU APIC settings. 573 574 VirtualBox.xml: Add support for additional USB device sources (e.g. USB/IP) 574 575 --> … … 952 953 <enum 953 954 name="CPUPropertyType" 954 uuid=" ed4094c1-d00e-483a-93e9-7163549ebd6e"955 uuid="cc6ecdad-a07c-4e81-9c0e-d767e0678d5a" 955 956 > 956 957 <desc> … … 979 980 trigger an internal error condition and stop the VM (default) or reset 980 981 the virtual CPU/VM and continue execution. 982 </desc> 983 </const> 984 <const name="APIC" value="4"> 985 <desc> 986 This setting determines whether an APIC is part of the virtual CPU. 987 This feature can only be turned off when the X2APIC feature is off. 988 </desc> 989 </const> 990 <const name="X2APIC" value="5"> 991 <desc> 992 This setting determines whether an x2APIC is part of the virtual CPU. 993 Since this feature implies that the APIC feature is present, it 994 automatically enables the APIC feature when set. 981 995 </desc> 982 996 </const> … … 1242 1256 <const name="MenuOnly" value="1"/> 1243 1257 <const name="MessageAndMenu" value="2"/> 1258 </enum> 1259 1260 <enum 1261 name="APICMode" 1262 uuid="c6884ba5-3cc4-4a92-a7f6-4410f9fd894e" 1263 > 1264 <desc> 1265 BIOS APIC initialization mode. If the hardware does not support the 1266 mode then the code falls back to a lower mode. 1267 </desc> 1268 1269 <const name="Disabled" value="0"/> 1270 <const name="APIC" value="1"/> 1271 <const name="X2APIC" value="2"/> 1244 1272 </enum> 1245 1273 … … 2992 3020 > 2993 3021 <desc> 2994 X.509 certificate version numbers.3022 X.509 certificate version numbers. 2995 3023 </desc> 2996 3024 <const name="V1" value="1"/> … … 4071 4099 <interface 4072 4100 name="IBIOSSettings" extends="$unknown" 4073 uuid=" c5b5afe3-4a6f-05eb-c9b6-4dbf98538b67"4101 uuid="f13f667d-3624-4ac5-99c1-3d982ebd8d98" 4074 4102 wsmap="managed" 4075 4103 reservedMethods="1" reservedAttributes="8" … … 4110 4138 IO APIC support flag. If set, VirtualBox will provide an IO APIC 4111 4139 and support IRQs above 15. 4140 </desc> 4141 </attribute> 4142 4143 <attribute name="APICMode" type="APICMode"> 4144 <desc> 4145 APIC mode to set up by the firmware. 4112 4146 </desc> 4113 4147 </attribute> -
trunk/src/VBox/Main/include/BIOSSettingsImpl.h
r49871 r61042 7 7 8 8 /* 9 * Copyright (C) 2006-201 3Oracle Corporation9 * Copyright (C) 2006-2016 Oracle Corporation 10 10 * 11 11 * This file is part of VirtualBox Open Source Edition (OSE), as … … 72 72 HRESULT getIOAPICEnabled(BOOL *aIOAPICEnabled); 73 73 HRESULT setIOAPICEnabled(BOOL aIOAPICEnabled); 74 HRESULT getAPICMode(APICMode_T *aAPICMode); 75 HRESULT setAPICMode(APICMode_T aAPICMode); 74 76 HRESULT getTimeOffset(LONG64 *offset); 75 77 HRESULT setTimeOffset(LONG64 offset); -
trunk/src/VBox/Main/include/MachineImpl.h
r61009 r61042 277 277 settings::Hardware::LongModeType mLongMode; 278 278 BOOL mTripleFaultReset; 279 BOOL mAPIC; 280 BOOL mX2APIC; 279 281 ULONG mCPUCount; 280 282 BOOL mCPUHotPlugEnabled; -
trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp
r60743 r61042 10 10 11 11 /* 12 * Copyright (C) 2006-201 5Oracle Corporation12 * Copyright (C) 2006-2016 Oracle Corporation 13 13 * 14 14 * This file is part of VirtualBox Open Source Edition (OSE), as … … 821 821 hrc = biosSettings->COMGETTER(IOAPICEnabled)(&fIOAPIC); H(); 822 822 823 APICMode_T apicMode; 824 hrc = biosSettings->COMGETTER(APICMode)(&apicMode); H(); 825 uint32_t uAPIC; 826 switch (apicMode) 827 { 828 case APICMode_Disabled: 829 uAPIC = 0; 830 break; 831 case APICMode_APIC: 832 uAPIC = 1; 833 break; 834 case APICMode_X2APIC: 835 uAPIC = 2; 836 break; 837 default: 838 AssertMsgFailed(("Invalid APICMode=%d\n", apicMode)); 839 uAPIC = 1; 840 break; 841 } 842 823 843 ComPtr<IGuestOSType> guestOSType; 824 844 hrc = virtualBox->GetGuestOSType(osTypeId.raw(), guestOSType.asOutParam()); H(); … … 979 999 InsertConfigInteger(pRoot, "EnablePAE", fEnablePAE); 980 1000 1001 /* APIC/X2APIC configuration */ 1002 BOOL fEnableAPIC = true; 1003 BOOL fEnableX2APIC = true; 1004 hrc = pMachine->GetCPUProperty(CPUPropertyType_APIC, &fEnableAPIC); H(); 1005 hrc = pMachine->GetCPUProperty(CPUPropertyType_X2APIC, &fEnableX2APIC); H(); 1006 if (fEnableX2APIC) 1007 Assert(fEnableAPIC); 1008 981 1009 /* CPUM profile name. */ 982 1010 hrc = pMachine->COMGETTER(CPUProfile)(bstr.asOutParam()); H(); … … 989 1017 * dead wrong on 8086 (see http://www.os2museum.com/wp/undocumented-8086-opcodes/). 990 1018 */ 991 bool fDisableApic = false;992 1019 if ( bstr.equals("Intel 80386") /* just for now */ 993 1020 || bstr.equals("Intel 80286") … … 999 1026 if (!bstr.equals("Intel 80386")) 1000 1027 { 1001 fDisableApic = true; 1002 fIOAPIC = false; 1003 } 1004 } 1028 fEnableAPIC = false; 1029 fIOAPIC = false; 1030 } 1031 fEnableX2APIC = false; 1032 } 1033 1034 /* /APIC/xzy */ 1035 PCFGMNODE pAPIC; 1036 InsertConfigNode(pRoot, "APIC", &pAPIC); 1037 uint32_t uAPICMode = 1; 1038 if (fEnableX2APIC) 1039 uAPICMode = 2; 1040 else if (!fEnableAPIC) 1041 uAPICMode = 0; 1042 InsertConfigInteger(pAPIC, "Mode", uAPICMode); 1005 1043 1006 1044 /* … … 1552 1590 * thus only single insert 1553 1591 */ 1554 if ( !fDisableApic)1592 if (fEnableAPIC) 1555 1593 { 1556 1594 InsertConfigNode(pDevices, "apic", &pDev); … … 1634 1672 InsertConfigString(pBiosCfg, "FloppyDevice", "i82078"); 1635 1673 InsertConfigInteger(pBiosCfg, "IOAPIC", fIOAPIC); 1674 InsertConfigInteger(pBiosCfg, "APIC", uAPIC); 1636 1675 BOOL fPXEDebug; 1637 1676 hrc = biosSettings->COMGETTER(PXEDebugEnabled)(&fPXEDebug); H(); … … 1738 1777 InsertConfigString(pCfg, "DeviceProps", deviceProps); 1739 1778 InsertConfigInteger(pCfg, "IOAPIC", fIOAPIC); 1779 InsertConfigInteger(pCfg, "APIC", uAPIC); 1740 1780 InsertConfigBytes(pCfg, "UUID", &HardwareUuid,sizeof(HardwareUuid)); 1741 1781 InsertConfigInteger(pCfg, "64BitEntry", f64BitEntry); /* boolean */ -
trunk/src/VBox/Main/src-server/BIOSSettingsImpl.cpp
r55401 r61042 6 6 7 7 /* 8 * Copyright (C) 2006-201 4Oracle Corporation8 * Copyright (C) 2006-2016 Oracle Corporation 9 9 * 10 10 * This file is part of VirtualBox Open Source Edition (OSE), as … … 380 380 381 381 m->bd->fIOAPICEnabled = !!aIOAPICEnabled; 382 alock.release(); 383 AutoWriteLock mlock(m->pMachine COMMA_LOCKVAL_SRC_POS); // mParent is const, needs no locking 384 m->pMachine->i_setModified(Machine::IsModified_BIOS); 385 386 return S_OK; 387 } 388 389 390 HRESULT BIOSSettings::getAPICMode(APICMode_T *aAPICMode) 391 { 392 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 393 394 *aAPICMode = m->bd->apicMode; 395 396 return S_OK; 397 } 398 399 400 HRESULT BIOSSettings::setAPICMode(APICMode_T aAPICMode) 401 { 402 /* the machine needs to be mutable */ 403 AutoMutableStateDependency adep(m->pMachine); 404 if (FAILED(adep.rc())) return adep.rc(); 405 406 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 407 408 m->bd.backup(); 409 410 m->bd->apicMode = aAPICMode; 382 411 alock.release(); 383 412 AutoWriteLock mlock(m->pMachine COMMA_LOCKVAL_SRC_POS); // mParent is const, needs no locking -
trunk/src/VBox/Main/src-server/MachineImpl.cpp
r61009 r61042 193 193 mLongMode = HC_ARCH_BITS == 64 ? settings::Hardware::LongMode_Enabled : settings::Hardware::LongMode_Disabled; 194 194 mTripleFaultReset = false; 195 mAPIC = true; 196 mX2APIC = false; 195 197 mHPETEnabled = false; 196 198 mCpuExecutionCap = 100; /* Maximum CPU execution cap by default. */ … … 2249 2251 break; 2250 2252 2253 case CPUPropertyType_APIC: 2254 *aValue = mHWData->mAPIC; 2255 break; 2256 2257 case CPUPropertyType_X2APIC: 2258 *aValue = mHWData->mX2APIC; 2259 break; 2260 2251 2261 default: 2252 2262 return E_INVALIDARG; … … 2280 2290 mHWData.backup(); 2281 2291 mHWData->mTripleFaultReset = !!aValue; 2292 break; 2293 2294 case CPUPropertyType_APIC: 2295 if (mHWData->mX2APIC) 2296 aValue = TRUE; 2297 i_setModified(IsModified_MachineData); 2298 mHWData.backup(); 2299 mHWData->mAPIC = !!aValue; 2300 break; 2301 2302 case CPUPropertyType_X2APIC: 2303 i_setModified(IsModified_MachineData); 2304 mHWData.backup(); 2305 mHWData->mX2APIC = !!aValue; 2306 if (aValue) 2307 mHWData->mAPIC = !!aValue; 2282 2308 break; 2283 2309 … … 8840 8866 mHWData->mLongMode = data.enmLongMode; 8841 8867 mHWData->mTripleFaultReset = data.fTripleFaultReset; 8868 mHWData->mAPIC = data.fAPIC; 8869 mHWData->mX2APIC = data.fX2APIC; 8842 8870 mHWData->mCPUCount = data.cCPUs; 8843 8871 mHWData->mCPUHotPlugEnabled = data.fCpuHotPlug; … … 10159 10187 data.enmLongMode = mHWData->mLongMode; 10160 10188 data.fTripleFaultReset = !!mHWData->mTripleFaultReset; 10189 data.fAPIC = !!mHWData->mAPIC; 10190 data.fX2APIC = !!mHWData->mX2APIC; 10161 10191 data.cCPUs = mHWData->mCPUCount; 10162 10192 data.fCpuHotPlug = !!mHWData->mCPUHotPlugEnabled; -
trunk/src/VBox/Main/xml/Settings.cpp
r61036 r61042 2155 2155 fLogoFadeIn(true), 2156 2156 fLogoFadeOut(true), 2157 fPXEDebugEnabled(false), 2157 2158 ulLogoDisplayTime(0), 2158 2159 biosBootMenuMode(BIOSBootMenuMode_MessageAndMenu), 2159 fPXEDebugEnabled(false),2160 apicMode(APICMode_APIC), 2160 2161 llTimeOffset(0) 2161 2162 { … … 2171 2172 && fLogoFadeIn 2172 2173 && fLogoFadeOut 2174 && !fPXEDebugEnabled 2173 2175 && ulLogoDisplayTime == 0 2174 2176 && biosBootMenuMode == BIOSBootMenuMode_MessageAndMenu 2175 && !fPXEDebugEnabled 2176 && llTimeOffset == 0; 2177 && apicMode == APICMode_APIC 2178 && llTimeOffset == 0 2179 && strLogoImagePath.isEmpty(); 2177 2180 } 2178 2181 … … 2189 2192 && fLogoFadeIn == d.fLogoFadeIn 2190 2193 && fLogoFadeOut == d.fLogoFadeOut 2194 && fPXEDebugEnabled == d.fPXEDebugEnabled 2191 2195 && ulLogoDisplayTime == d.ulLogoDisplayTime 2192 && strLogoImagePath == d.strLogoImagePath2193 2196 && biosBootMenuMode == d.biosBootMenuMode 2194 && fPXEDebugEnabled == d.fPXEDebugEnabled 2195 && llTimeOffset == d.llTimeOffset); 2197 && apicMode == d.apicMode 2198 && llTimeOffset == d.llTimeOffset 2199 && strLogoImagePath == d.strLogoImagePath); 2196 2200 } 2197 2201 … … 2692 2696 fTripleFaultReset(false), 2693 2697 fPAE(false), 2698 fAPIC(true), 2699 fX2APIC(false), 2694 2700 enmLongMode(HC_ARCH_BITS == 64 ? Hardware::LongMode_Enabled : Hardware::LongMode_Disabled), 2695 2701 cCPUs(1), … … 2842 2848 && enmLongMode == h.enmLongMode 2843 2849 && fTripleFaultReset == h.fTripleFaultReset 2850 && fAPIC == h.fAPIC 2851 && fX2APIC == h.fX2APIC 2844 2852 && cCPUs == h.cCPUs 2845 2853 && fCpuHotPlug == h.fCpuHotPlug … … 3795 3803 pelmCPUChild->getAttributeValue("enabled", hw.fTripleFaultReset); 3796 3804 3805 if ((pelmCPUChild = pelmHwChild->findChildElement("APIC"))) 3806 pelmCPUChild->getAttributeValue("enabled", hw.fAPIC); 3807 if ((pelmCPUChild = pelmHwChild->findChildElement("X2APIC"))) 3808 pelmCPUChild->getAttributeValue("enabled", hw.fX2APIC); 3809 3797 3810 if ((pelmCPUChild = pelmHwChild->findChildElement("CpuIdTree"))) 3798 3811 readCpuIdTree(*pelmCPUChild, hw.llCpuIdLeafs); … … 4078 4091 if ((pelmBIOSChild = pelmHwChild->findChildElement("IOAPIC"))) 4079 4092 pelmBIOSChild->getAttributeValue("enabled", hw.biosSettings.fIOAPICEnabled); 4093 if ((pelmBIOSChild = pelmHwChild->findChildElement("APIC"))) 4094 { 4095 Utf8Str strAPIC; 4096 if (pelmBIOSChild->getAttributeValue("mode", strAPIC)) 4097 { 4098 strAPIC.toUpper(); 4099 if (strAPIC == "DISABLED") 4100 hw.biosSettings.apicMode = APICMode_Disabled; 4101 else if (strAPIC == "APIC") 4102 hw.biosSettings.apicMode = APICMode_APIC; 4103 else if (strAPIC == "X2APIC") 4104 hw.biosSettings.apicMode = APICMode_X2APIC; 4105 else 4106 throw ConfigFileError(this, pelmBIOSChild, N_("Invalid value '%s' in APIC/@mode attribute"), strAPIC.c_str()); 4107 } 4108 } 4080 4109 if ((pelmBIOSChild = pelmHwChild->findChildElement("Logo"))) 4081 4110 { … … 5100 5129 // PAE has too crazy default handling, must always save this setting. 5101 5130 pelmCPU->createChild("PAE")->setAttribute("enabled", hw.fPAE); 5131 if (m->sv >= SettingsVersion_v1_16) 5132 { 5133 } 5102 5134 if (m->sv >= SettingsVersion_v1_14 && hw.enmLongMode != Hardware::LongMode_Legacy) 5103 5135 { … … 5108 5140 if (hw.fTripleFaultReset) 5109 5141 pelmCPU->createChild("TripleFaultReset")->setAttribute("enabled", hw.fTripleFaultReset); 5142 if (m->sv >= SettingsVersion_v1_14) 5143 { 5144 if (hw.fX2APIC) 5145 pelmCPU->createChild("X2APIC")->setAttribute("enabled", hw.fX2APIC); 5146 else if (!hw.fAPIC) 5147 pelmCPU->createChild("APIC")->setAttribute("enabled", hw.fAPIC); 5148 } 5110 5149 if (hw.cCPUs > 1) 5111 5150 pelmCPU->setAttribute("count", hw.cCPUs); … … 5450 5489 if (hw.biosSettings.fIOAPICEnabled) 5451 5490 pelmBIOS->createChild("IOAPIC")->setAttribute("enabled", hw.biosSettings.fIOAPICEnabled); 5491 if (hw.biosSettings.apicMode != APICMode_APIC) 5492 { 5493 const char *pcszAPIC; 5494 switch (hw.biosSettings.apicMode) 5495 { 5496 case APICMode_Disabled: 5497 pcszAPIC = "Disabled"; 5498 break; 5499 case APICMode_APIC: 5500 default: 5501 pcszAPIC = "APIC"; 5502 break; 5503 case APICMode_X2APIC: 5504 pcszAPIC = "X2APIC"; 5505 break; 5506 } 5507 pelmBIOS->createChild("APIC")->setAttribute("mode", pcszAPIC); 5508 } 5452 5509 5453 5510 if ( !hw.biosSettings.fLogoFadeIn … … 6726 6783 if (m->sv < SettingsVersion_v1_16) 6727 6784 { 6728 // VirtualBox 5.1 adds a NVMe storage controller, paravirt debug options, cpu profile. 6785 // VirtualBox 5.1 adds a NVMe storage controller, paravirt debug 6786 // options, cpu profile, APIC settings (CPU capability and BIOS). 6729 6787 6730 6788 if ( hardwareMachine.strParavirtDebug.isNotEmpty() 6731 || (!hardwareMachine.strCpuProfile.equals("host") && hardwareMachine.strCpuProfile.isNotEmpty()) 6789 || (!hardwareMachine.strCpuProfile.equals("host") && hardwareMachine.strCpuProfile.isNotEmpty() 6790 || hardwareMachine.biosSettings.apicMode != APICMode_APIC 6791 || !hardwareMachine.fAPIC 6792 || hardwareMachine.fX2APIC) 6732 6793 ) 6733 6794 {
Note:
See TracChangeset
for help on using the changeset viewer.

