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