File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
src/vmm/src/cpu_config/x86_64/cpuid Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -69,8 +69,6 @@ pub enum ExtendedTopologyError {
6969 NumLogicalProcs ( u32 , CheckedAssignError ) ,
7070 /// Failed to set right-shift bits (CPUID.(EAX=0xB,ECX={0}):EAX[4:0]): {1}
7171 RightShiftBits ( u32 , CheckedAssignError ) ,
72- /// Unexpected subleaf: {0}
73- UnexpectedSubleaf ( u32 )
7472}
7573
7674/// Error type for setting leaf 0x80000006 of Cpuid::normalize().
@@ -372,11 +370,9 @@ impl super::Cpuid {
372370 . map_err ( |err| ExtendedTopologyError :: DomainType ( index, err) ) ?;
373371 }
374372 _ => {
375- // KVM no longer returns any subleaf numbers greater than 0. The patch was
376- // merged in v6.2 and backported to v5.10. Subleaves >= 2 should not be
377- // included.
378- // https://github.com/torvalds/linux/commit/45e966fcca03ecdcccac7cb236e16eea38cc18af
379- return Err ( ExtendedTopologyError :: UnexpectedSubleaf ( index) ) ;
373+ // We expect here as this is an extremely rare case that is unlikely to ever
374+ // occur.
375+ subleaf. result . ecx = index;
380376 }
381377 }
382378 } else {
You can’t perform that action at this time.
0 commit comments