Lines Matching defs:ppaLeaves

565  * @returns Pointer to the CPUID leaf array (*ppaLeaves) on success.  NULL on
570 * @param ppaLeaves Pointer to the variable holding the array pointer
575 * using the hyper heap, which means @a ppaLeaves and @a cLeaves must
578 static PCPUMCPUIDLEAF cpumR3CpuIdEnsureSpace(PVM pVM, PCPUMCPUIDLEAF *ppaLeaves, uint32_t cLeaves)
590 void *pvNew = RTMemRealloc(*ppaLeaves, (cAllocated + 16) * sizeof(**ppaLeaves));
592 *ppaLeaves = (PCPUMCPUIDLEAF)pvNew;
595 RTMemFree(*ppaLeaves);
596 *ppaLeaves = NULL;
609 Assert(ppaLeaves == &pVM->cpum.s.GuestInfo.paCpuIdLeavesR3);
612 size_t cb = cLeaves * sizeof(**ppaLeaves);
613 size_t cbNew = (cLeaves + 1) * sizeof(**ppaLeaves);
614 int rc = MMR3HyperRealloc(pVM, *ppaLeaves, cb, 32, MM_TAG_CPUM_CPUID, cbNew, (void **)ppaLeaves);
618 pVM->cpum.s.GuestInfo.paCpuIdLeavesR0 = MMHyperR3ToR0(pVM, *ppaLeaves);
619 pVM->cpum.s.GuestInfo.paCpuIdLeavesRC = MMHyperR3ToRC(pVM, *ppaLeaves);
623 *ppaLeaves = NULL;
630 return *ppaLeaves;
640 * @returns VINF_SUCCESS or VERR_NO_MEMORY. On error, *ppaLeaves is freed, so
642 * @param ppaLeaves Pointer to the the pointer to the array of sorted
644 * @param pcLeaves Where we keep the leaf count for *ppaLeaves.
654 static int cpumR3CollectCpuIdInfoAddOne(PCPUMCPUIDLEAF *ppaLeaves, uint32_t *pcLeaves,
658 if (!cpumR3CpuIdEnsureSpace(NULL /* pVM */, ppaLeaves, *pcLeaves))
661 PCPUMCPUIDLEAF pNew = &(*ppaLeaves)[*pcLeaves];
724 * @param ppaLeaves Pointer to the the pointer to the array of sorted
727 * @param pcLeaves Where we keep the leaf count for *ppaLeaves. Must be
732 static int cpumR3CpuIdInsert(PVM pVM, PCPUMCPUIDLEAF *ppaLeaves, uint32_t *pcLeaves, PCPUMCPUIDLEAF pNewLeaf)
739 AssertReturn(!ppaLeaves, VERR_INVALID_PARAMETER);
742 ppaLeaves = &pVM->cpum.s.GuestInfo.paCpuIdLeavesR3;
746 PCPUMCPUIDLEAF paLeaves = *ppaLeaves;
814 cpumR3CpuIdAssertOrder(*ppaLeaves, *pcLeaves);
832 cpumR3CpuIdAssertOrder(*ppaLeaves, *pcLeaves);
841 paLeaves = cpumR3CpuIdEnsureSpace(pVM, ppaLeaves, cLeaves);
850 cpumR3CpuIdAssertOrder(*ppaLeaves, *pcLeaves);
1071 return cpumR3CpuIdInsert(pVM, NULL /* ppaLeaves */, NULL /* pcLeaves */, pNewLeaf);
1078 * @param ppaLeaves Where to return the array pointer on success.
1083 VMMR3DECL(int) CPUMR3CpuIdCollectLeaves(PCPUMCPUIDLEAF *ppaLeaves, uint32_t *pcLeaves)
1085 *ppaLeaves = NULL;
1144 || ASMIsAmdCpuEx((*ppaLeaves)[0].uEbx, (*ppaLeaves)[0].uEcx, (*ppaLeaves)[0].uEdx)) )
1172 (*ppaLeaves)[i].uLeaf, (*ppaLeaves)[i].uSubLeaf, (*ppaLeaves)[i].fSubLeafMask,
1173 (*ppaLeaves)[i].uEax, (*ppaLeaves)[i].uEbx, (*ppaLeaves)[i].uEcx, (*ppaLeaves)[i].uEdx));
1184 int rc = cpumR3CollectCpuIdInfoAddOne(ppaLeaves, pcLeaves,
1192 int rc = cpumR3CollectCpuIdInfoAddOne(ppaLeaves, pcLeaves,
1231 int rc = cpumR3CollectCpuIdInfoAddOne(ppaLeaves, pcLeaves,
1239 cpumR3CpuIdAssertOrder(*ppaLeaves, *pcLeaves);
3982 static int cpumR3LoadOneOldGuestCpuIdArray(PSSMHANDLE pSSM, uint32_t uBase, PCPUMCPUIDLEAF *ppaLeaves, uint32_t *pcLeaves)
4006 rc = cpumR3CpuIdInsert(NULL /* pVM */, ppaLeaves, pcLeaves, &NewLeaf);
4014 RTMemFree(*ppaLeaves);
4015 *ppaLeaves = NULL;
4022 static int cpumR3LoadGuestCpuIdArray(PVM pVM, PSSMHANDLE pSSM, uint32_t uVersion, PCPUMCPUIDLEAF *ppaLeaves, uint32_t *pcLeaves)
4024 *ppaLeaves = NULL;
4039 if (cbLeaf == sizeof(**ppaLeaves))
4063 rc = cpumR3CpuIdInsert(NULL /* pVM */, ppaLeaves, pcLeaves, &Leaf);
4077 "CPUMCPUIDLEAF size differs: saved=%#x, our=%#x", cbLeaf, sizeof(**ppaLeaves));
4085 rc = cpumR3LoadOneOldGuestCpuIdArray(pSSM, UINT32_C(0x00000000), ppaLeaves, pcLeaves);
4087 rc = cpumR3LoadOneOldGuestCpuIdArray(pSSM, UINT32_C(0x80000000), ppaLeaves, pcLeaves);
4089 rc = cpumR3LoadOneOldGuestCpuIdArray(pSSM, UINT32_C(0xc0000000), ppaLeaves, pcLeaves);
4095 PCPUMCPUIDLEAF pLeaf = cpumR3CpuIdGetLeaf(*ppaLeaves, *pcLeaves, 0, 0);
4113 rc = cpumR3CpuIdInsert(NULL /* pVM */, ppaLeaves, pcLeaves, &Leaf);
4117 rc = cpumR3CpuIdInsert(NULL /* pVM */, ppaLeaves, pcLeaves, &Leaf);
4129 rc = cpumR3CpuIdInsert(NULL /* pVM */, ppaLeaves, pcLeaves, &Leaf);