VirtualBox

Changeset 101216 in vbox for trunk


Ignore:
Timestamp:
Sep 21, 2023 8:56:02 AM (15 months ago)
Author:
vboxsync
Message:

VMM/CPUMR3CpuId-armv8.cpp: Check for more features when loading a saved state, bugref:10525

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/CPUMR3CpuId-armv8.cpp

    r101190 r101216  
    570570    AssertLogRelRCReturn(rc, rc);
    571571
     572    /** @todo Add more options for other extensions. */
     573
    572574    return VINF_SUCCESS;
    573575}
     
    727729    do { \
    728730        if (RT_BF_GET(pGuestIdRegs->a_IdReg, a_Field) > RT_BF_GET(pVM->cpum.s.GuestIdRegs.a_IdReg, a_Field)) \
     731        { \
     732            if (fStrictCpuIdChecks) \
     733                return SSMR3SetLoadError(pSSM, VERR_SSM_LOAD_CPUID_MISMATCH, RT_SRC_POS, \
     734                                         N_(#a_Field " is not supported by the host but has already exposed to the guest")); \
     735            LogRel(("CPUM: " #a_Field " is not supported by the host but has already been exposed to the guest\n")); \
     736        } \
     737    } while (0)
     738#define CPUID_GST_FEATURE_RET_NOT_IMPL(a_IdReg, a_Field, a_NotImpl) \
     739    do { \
     740        if (   (   RT_BF_GET(pGuestIdRegs->a_IdReg, a_Field) != (a_NotImpl) \
     741                && RT_BF_GET(pVM->cpum.s.GuestIdRegs.a_IdReg, a_Field) == (a_NotImpl)) \
     742            || RT_BF_GET(pGuestIdRegs->a_IdReg, a_Field) > RT_BF_GET(pVM->cpum.s.GuestIdRegs.a_IdReg, a_Field)) \
    729743        { \
    730744            if (fStrictCpuIdChecks) \
     
    802816    CPUID_GST_FEATURE_RET(u64RegIdAa64Isar2El1, ARMV8_ID_AA64ISAR2_EL1_PACFRAC);
    803817
     818    /* ID_AA64PFR0_EL1 */
     819    CPUID_GST_FEATURE_RET(u64RegIdAa64Pfr0El1,  ARMV8_ID_AA64PFR0_EL1_EL0);
     820    CPUID_GST_FEATURE_RET(u64RegIdAa64Pfr0El1,  ARMV8_ID_AA64PFR0_EL1_EL1);
     821    CPUID_GST_FEATURE_RET(u64RegIdAa64Pfr0El1,  ARMV8_ID_AA64PFR0_EL1_EL2);
     822    CPUID_GST_FEATURE_RET(u64RegIdAa64Pfr0El1,  ARMV8_ID_AA64PFR0_EL1_EL3);
     823    CPUID_GST_FEATURE_RET_NOT_IMPL(u64RegIdAa64Pfr0El1, ARMV8_ID_AA64PFR0_EL1_FP,      ARMV8_ID_AA64PFR0_EL1_FP_NOT_IMPL);      /* Special not implemented value. */
     824    CPUID_GST_FEATURE_RET_NOT_IMPL(u64RegIdAa64Pfr0El1, ARMV8_ID_AA64PFR0_EL1_ADVSIMD, ARMV8_ID_AA64PFR0_EL1_ADVSIMD_NOT_IMPL); /* Special not implemented value. */
     825    CPUID_GST_FEATURE_IGN(u64RegIdAa64Pfr0El1,  ARMV8_ID_AA64PFR0_EL1_GIC);
     826    CPUID_GST_FEATURE_RET(u64RegIdAa64Pfr0El1,  ARMV8_ID_AA64PFR0_EL1_RAS);
     827    CPUID_GST_FEATURE_RET(u64RegIdAa64Pfr0El1,  ARMV8_ID_AA64PFR0_EL1_SVE);
     828    CPUID_GST_FEATURE_RET(u64RegIdAa64Pfr0El1,  ARMV8_ID_AA64PFR0_EL1_SEL2);
     829    /** @todo MPAM */
     830    CPUID_GST_FEATURE_RET(u64RegIdAa64Pfr0El1,  ARMV8_ID_AA64PFR0_EL1_AMU);
     831    CPUID_GST_FEATURE_RET(u64RegIdAa64Pfr0El1,  ARMV8_ID_AA64PFR0_EL1_DIT);
     832    CPUID_GST_FEATURE_RET(u64RegIdAa64Pfr0El1,  ARMV8_ID_AA64PFR0_EL1_RME);
     833    CPUID_GST_FEATURE_RET(u64RegIdAa64Pfr0El1,  ARMV8_ID_AA64PFR0_EL1_CSV2);
     834    CPUID_GST_FEATURE_RET(u64RegIdAa64Pfr0El1,  ARMV8_ID_AA64PFR0_EL1_CSV3);
     835
     836    /* ID_AA64PFR1_EL1 */
     837    CPUID_GST_FEATURE_RET(u64RegIdAa64Pfr1El1,  ARMV8_ID_AA64PFR1_EL1_BT);
     838    CPUID_GST_FEATURE_RET(u64RegIdAa64Pfr1El1,  ARMV8_ID_AA64PFR1_EL1_SSBS);
     839    CPUID_GST_FEATURE_RET(u64RegIdAa64Pfr1El1,  ARMV8_ID_AA64PFR1_EL1_MTE);
     840    CPUID_GST_FEATURE_RET(u64RegIdAa64Pfr1El1,  ARMV8_ID_AA64PFR1_EL1_RASFRAC);
     841    /** @todo MPAM. */
     842    CPUID_GST_FEATURE_RET(u64RegIdAa64Pfr1El1,  ARMV8_ID_AA64PFR1_EL1_SME);
     843    CPUID_GST_FEATURE_RET(u64RegIdAa64Pfr1El1,  ARMV8_ID_AA64PFR1_EL1_RNDRTRAP);
     844    CPUID_GST_FEATURE_RET(u64RegIdAa64Pfr1El1,  ARMV8_ID_AA64PFR1_EL1_CSV2FRAC);
     845    CPUID_GST_FEATURE_RET(u64RegIdAa64Pfr1El1,  ARMV8_ID_AA64PFR1_EL1_NMI);
     846
     847    /* ID_AA64MMFR0_EL1 */
     848    CPUID_GST_FEATURE_RET(u64RegIdAa64Mmfr0El1, ARMV8_ID_AA64MMFR0_EL1_PARANGE);
     849    CPUID_GST_FEATURE_RET(u64RegIdAa64Mmfr0El1, ARMV8_ID_AA64MMFR0_EL1_ASIDBITS);
     850    CPUID_GST_FEATURE_RET(u64RegIdAa64Mmfr0El1, ARMV8_ID_AA64MMFR0_EL1_BIGEND);
     851    CPUID_GST_FEATURE_RET(u64RegIdAa64Mmfr0El1, ARMV8_ID_AA64MMFR0_EL1_SNSMEM);
     852    CPUID_GST_FEATURE_RET(u64RegIdAa64Mmfr0El1, ARMV8_ID_AA64MMFR0_EL1_BIGENDEL0);
     853    CPUID_GST_FEATURE_RET(u64RegIdAa64Mmfr0El1, ARMV8_ID_AA64MMFR0_EL1_TGRAN16);
     854    CPUID_GST_FEATURE_RET_NOT_IMPL(u64RegIdAa64Mmfr0El1, ARMV8_ID_AA64MMFR0_EL1_TGRAN64, ARMV8_ID_AA64MMFR0_EL1_TGRAN64_NOT_IMPL);
     855    CPUID_GST_FEATURE_RET_NOT_IMPL(u64RegIdAa64Mmfr0El1, ARMV8_ID_AA64MMFR0_EL1_TGRAN4,  ARMV8_ID_AA64MMFR0_EL1_TGRAN4_NOT_IMPL);
     856    CPUID_GST_FEATURE_RET(u64RegIdAa64Mmfr0El1, ARMV8_ID_AA64MMFR0_EL1_TGRAN16_2);
     857    CPUID_GST_FEATURE_RET(u64RegIdAa64Mmfr0El1, ARMV8_ID_AA64MMFR0_EL1_TGRAN64_2);
     858    CPUID_GST_FEATURE_RET(u64RegIdAa64Mmfr0El1, ARMV8_ID_AA64MMFR0_EL1_TGRAN4_2);
     859    CPUID_GST_FEATURE_RET(u64RegIdAa64Mmfr0El1, ARMV8_ID_AA64MMFR0_EL1_EXS);
     860    CPUID_GST_FEATURE_RET(u64RegIdAa64Mmfr0El1, ARMV8_ID_AA64MMFR0_EL1_FGT);
     861    CPUID_GST_FEATURE_RET(u64RegIdAa64Mmfr0El1, ARMV8_ID_AA64MMFR0_EL1_ECV);
     862
     863    /* ID_AA64MMFR1_EL1 */
     864    CPUID_GST_FEATURE_RET(u64RegIdAa64Mmfr1El1, ARMV8_ID_AA64MMFR1_EL1_HAFDBS);
     865    CPUID_GST_FEATURE_RET(u64RegIdAa64Mmfr1El1, ARMV8_ID_AA64MMFR1_EL1_VMIDBITS);
     866    CPUID_GST_FEATURE_RET(u64RegIdAa64Mmfr1El1, ARMV8_ID_AA64MMFR1_EL1_VHE);
     867    CPUID_GST_FEATURE_RET(u64RegIdAa64Mmfr1El1, ARMV8_ID_AA64MMFR1_EL1_HPDS);
     868    CPUID_GST_FEATURE_RET(u64RegIdAa64Mmfr1El1, ARMV8_ID_AA64MMFR1_EL1_LO);
     869    CPUID_GST_FEATURE_RET(u64RegIdAa64Mmfr1El1, ARMV8_ID_AA64MMFR1_EL1_PAN);
     870    CPUID_GST_FEATURE_RET(u64RegIdAa64Mmfr1El1, ARMV8_ID_AA64MMFR1_EL1_SPECSEI);
     871    CPUID_GST_FEATURE_RET(u64RegIdAa64Mmfr1El1, ARMV8_ID_AA64MMFR1_EL1_XNX);
     872    CPUID_GST_FEATURE_RET(u64RegIdAa64Mmfr1El1, ARMV8_ID_AA64MMFR1_EL1_TWED);
     873    CPUID_GST_FEATURE_RET(u64RegIdAa64Mmfr1El1, ARMV8_ID_AA64MMFR1_EL1_ETS);
     874    CPUID_GST_FEATURE_RET(u64RegIdAa64Mmfr1El1, ARMV8_ID_AA64MMFR1_EL1_HCX);
     875    CPUID_GST_FEATURE_RET(u64RegIdAa64Mmfr1El1, ARMV8_ID_AA64MMFR1_EL1_AFP);
     876    CPUID_GST_FEATURE_RET(u64RegIdAa64Mmfr1El1, ARMV8_ID_AA64MMFR1_EL1_NTLBPA);
     877    CPUID_GST_FEATURE_RET(u64RegIdAa64Mmfr1El1, ARMV8_ID_AA64MMFR1_EL1_TIDCP1);
     878    CPUID_GST_FEATURE_RET(u64RegIdAa64Mmfr1El1, ARMV8_ID_AA64MMFR1_EL1_CMOW);
     879
     880    /* ID_AA64MMFR2_EL1 */
     881    CPUID_GST_FEATURE_RET(u64RegIdAa64Mmfr2El1, ARMV8_ID_AA64MMFR2_EL1_CNP);
     882    CPUID_GST_FEATURE_RET(u64RegIdAa64Mmfr2El1, ARMV8_ID_AA64MMFR2_EL1_UAO);
     883    CPUID_GST_FEATURE_RET(u64RegIdAa64Mmfr2El1, ARMV8_ID_AA64MMFR2_EL1_LSM);
     884    CPUID_GST_FEATURE_RET(u64RegIdAa64Mmfr2El1, ARMV8_ID_AA64MMFR2_EL1_IESB);
     885    CPUID_GST_FEATURE_RET(u64RegIdAa64Mmfr2El1, ARMV8_ID_AA64MMFR2_EL1_VARANGE);
     886    CPUID_GST_FEATURE_RET(u64RegIdAa64Mmfr2El1, ARMV8_ID_AA64MMFR2_EL1_CCIDX);
     887    CPUID_GST_FEATURE_RET(u64RegIdAa64Mmfr2El1, ARMV8_ID_AA64MMFR2_EL1_CNP);
     888    CPUID_GST_FEATURE_RET(u64RegIdAa64Mmfr2El1, ARMV8_ID_AA64MMFR2_EL1_NV);
     889    CPUID_GST_FEATURE_RET(u64RegIdAa64Mmfr2El1, ARMV8_ID_AA64MMFR2_EL1_ST);
     890    CPUID_GST_FEATURE_RET(u64RegIdAa64Mmfr2El1, ARMV8_ID_AA64MMFR2_EL1_AT);
     891    CPUID_GST_FEATURE_RET(u64RegIdAa64Mmfr2El1, ARMV8_ID_AA64MMFR2_EL1_IDS);
     892    CPUID_GST_FEATURE_RET(u64RegIdAa64Mmfr2El1, ARMV8_ID_AA64MMFR2_EL1_FWB);
     893    CPUID_GST_FEATURE_RET(u64RegIdAa64Mmfr2El1, ARMV8_ID_AA64MMFR2_EL1_TTL);
     894    CPUID_GST_FEATURE_RET(u64RegIdAa64Mmfr2El1, ARMV8_ID_AA64MMFR2_EL1_BBM);
     895    CPUID_GST_FEATURE_RET(u64RegIdAa64Mmfr2El1, ARMV8_ID_AA64MMFR2_EL1_EVT);
     896    CPUID_GST_FEATURE_RET(u64RegIdAa64Mmfr2El1, ARMV8_ID_AA64MMFR2_EL1_E0PD);
     897
     898    /* ID_AA64DFR0_EL1 */
     899    CPUID_GST_FEATURE_RET(u64RegIdAa64Dfr0El1, ARMV8_ID_AA64DFR0_EL1_DEBUGVER);
     900    CPUID_GST_FEATURE_RET(u64RegIdAa64Dfr0El1, ARMV8_ID_AA64DFR0_EL1_TRACEVER);
     901    CPUID_GST_FEATURE_RET(u64RegIdAa64Dfr0El1, ARMV8_ID_AA64DFR0_EL1_PMUVER);
     902    CPUID_GST_FEATURE_RET(u64RegIdAa64Dfr0El1, ARMV8_ID_AA64DFR0_EL1_BRPS);
     903    CPUID_GST_FEATURE_RET(u64RegIdAa64Dfr0El1, ARMV8_ID_AA64DFR0_EL1_WRPS);
     904    CPUID_GST_FEATURE_RET(u64RegIdAa64Dfr0El1, ARMV8_ID_AA64DFR0_EL1_CTXCMPS);
     905    CPUID_GST_FEATURE_RET(u64RegIdAa64Dfr0El1, ARMV8_ID_AA64DFR0_EL1_PMSVER);
     906    CPUID_GST_FEATURE_RET(u64RegIdAa64Dfr0El1, ARMV8_ID_AA64DFR0_EL1_DOUBLELOCK);
     907    CPUID_GST_FEATURE_RET(u64RegIdAa64Dfr0El1, ARMV8_ID_AA64DFR0_EL1_TRACEFILT);
     908    CPUID_GST_FEATURE_RET(u64RegIdAa64Dfr0El1, ARMV8_ID_AA64DFR0_EL1_TRACEBUFFER);
     909    CPUID_GST_FEATURE_RET(u64RegIdAa64Dfr0El1, ARMV8_ID_AA64DFR0_EL1_MTPMU);
     910    CPUID_GST_FEATURE_RET(u64RegIdAa64Dfr0El1, ARMV8_ID_AA64DFR0_EL1_BRBE);
     911    CPUID_GST_FEATURE_RET(u64RegIdAa64Dfr0El1, ARMV8_ID_AA64DFR0_EL1_HPMN0);
     912
    804913#undef CPUID_GST_FEATURE_RET
     914#undef CPUID_GST_FEATURE_RET_NOT_IMPL
    805915#undef CPUID_GST_FEATURE_WRN
    806916#undef CPUID_GST_FEATURE_EMU
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