Changeset 57506 in vbox
- Timestamp:
- Aug 24, 2015 11:28:41 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/GIMHv.cpp
r57358 r57506 94 94 int rc; 95 95 PGIMHV pHv = &pVM->gim.s.u.Hv; 96 97 /* 98 * Read configuration. 99 */ 100 PCFGMNODE pCfgNode = CFGMR3GetChild(CFGMR3GetRoot(pVM), "GIM/HyperV"); 101 102 /** @cfgm{/GIM/HyperV/VendorID, string, 'VBoxVBoxVBox'} 103 * The Hyper-V vendor signature, must be 12 characters. */ 104 char szVendor[13]; 105 rc = CFGMR3QueryStringDef(pCfgNode, "VendorID", szVendor, sizeof(szVendor), "VBoxVBoxVBox"); 106 AssertLogRelRCReturn(rc, rc); 96 107 97 108 /* … … 179 190 HyperLeaf.uLeaf = UINT32_C(0x40000000); 180 191 HyperLeaf.uEax = UINT32_C(0x40000006); /* Minimum value for Hyper-V is 0x40000005. */ 181 HyperLeaf.uEbx = 0x7263694D; /* 'Micr' */ 182 HyperLeaf.uEcx = 0x666F736F; /* 'osof' */ 183 HyperLeaf.uEdx = 0x76482074; /* 't Hv' */ 192 /* Don't report vendor as 'Microsoft Hv' by default, see @bugref{7270#c152}. */ 193 { 194 uint32_t uVendorEbx; 195 uint32_t uVendorEcx; 196 uint32_t uVendorEdx; 197 uVendorEbx = ((uint32_t)szVendor[ 3]) << 24 | ((uint32_t)szVendor[ 2]) << 16 | ((uint32_t)szVendor[1]) << 8 198 | (uint32_t)szVendor[ 0]; 199 uVendorEcx = ((uint32_t)szVendor[ 7]) << 24 | ((uint32_t)szVendor[ 6]) << 16 | ((uint32_t)szVendor[5]) << 8 200 | (uint32_t)szVendor[ 4]; 201 uVendorEdx = ((uint32_t)szVendor[11]) << 24 | ((uint32_t)szVendor[10]) << 16 | ((uint32_t)szVendor[9]) << 8 202 | (uint32_t)szVendor[ 8]; 203 HyperLeaf.uEbx = uVendorEbx; 204 HyperLeaf.uEcx = uVendorEcx; 205 HyperLeaf.uEdx = uVendorEdx; 206 } 184 207 rc = CPUMR3CpuIdInsert(pVM, &HyperLeaf); 185 208 AssertLogRelRCReturn(rc, rc);
Note:
See TracChangeset
for help on using the changeset viewer.