@@ -561,10 +561,28 @@ pub fn turin_v1() -> CpuIdDump {
561
561
562
562
let mut cpuid = CpuId :: with_cpuid_reader ( baseline) ;
563
563
564
+ let mut leaf =
565
+ cpuid. get_feature_info ( ) . expect ( "baseline Milan defines leaf 1" ) ;
566
+
567
+ // Set up EAX: Family 1Ah model 2h stepping 1.
568
+ leaf. set_extended_family_id ( 0x0B ) ;
569
+ leaf. set_base_family_id ( 0x0F ) ;
570
+ leaf. set_base_model_id ( 0x02 ) ;
571
+ leaf. set_stepping_id ( 0x01 ) ;
572
+
573
+ // EBX, ECX, EDX are all unchanged from Milan (same cache line flush size,
574
+ // leaf 1 features are unchanged)
575
+
576
+ cpuid. set_feature_info ( Some ( leaf) ) . expect ( "can set leaf 1" ) ;
577
+
564
578
let mut leaf = cpuid
565
579
. get_extended_feature_info ( )
566
580
. expect ( "baseline Milan defines leaf 7" ) ;
567
581
582
+ // Same as with initial Milan profiles, `rdseed` is not supported by the
583
+ // virt stack, so we should hide it from guests for now.
584
+ leaf. set_rdseed ( false ) ;
585
+
568
586
// Turin supports the TSC_ADJUST MSR but guest plumbing is not present for
569
587
// it and it's not clear what a guest would productively do with it anyway.
570
588
leaf. set_tsc_adjust_msr ( false ) ;
@@ -1036,11 +1054,11 @@ mod test {
1036
1054
// guests.
1037
1055
const TURIN_V1_CPUID : [ CpuidEntry ; 26 ] = [
1038
1056
cpuid_leaf ! ( 0x0 , 0x0000000D , 0x68747541 , 0x444D4163 , 0x69746E65 ) ,
1039
- cpuid_leaf ! ( 0x1 , 0x00A00F11 , 0x00000800 , 0xF6D83203 , 0x078BFBFF ) ,
1057
+ cpuid_leaf ! ( 0x1 , 0x00B00F21 , 0x00000800 , 0xF6D83203 , 0x078BFBFF ) ,
1040
1058
cpuid_leaf ! ( 0x5 , 0x00000000 , 0x00000000 , 0x00000000 , 0x00000000 ) ,
1041
1059
cpuid_leaf ! ( 0x6 , 0x00000004 , 0x00000000 , 0x00000000 , 0x00000000 ) ,
1042
1060
cpuid_subleaf ! (
1043
- 0x7 , 0x0 , 0x00000001 , 0xF1BF03A9 , 0x00005F42 , 0x00000110
1061
+ 0x7 , 0x0 , 0x00000001 , 0xF1BB03A9 , 0x00005F42 , 0x00000110
1044
1062
) ,
1045
1063
cpuid_subleaf ! (
1046
1064
0x7 , 0x1 , 0x00000030 , 0x00000000 , 0x00000000 , 0x00000000
0 commit comments