kvm: x86: Include multiple indices with CPUID leaf 0x8000001d
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 23 lines · Borislav Petkov
Quoted 12 lines · Jim Mattson
Per the APM, "CPUID Fn8000_001D_E[D,C,B,A]X reports cache topology information for the cache enumerated by the value passed to the instruction in ECX, referred to as Cache n in the following description. To gather information for all cache levels, software must repeatedly execute CPUID with 8000_001Dh in EAX and ECX set to increasing values beginning with 0 until a value of 00h is returned in the field CacheType (EAX[4:0]) indicating no more cache descriptions are available for this processor."
The termination condition is the same as leaf 4, so we can reuse that code block for leaf
0x8000001d.Quoted 8 lines
Fixes 8765d75329a38 ("KVM: X86: Extend CPUID range to include new leaf")Cc Brijesh Singh <[email protected]>Cc Borislav Petkov <[email protected]>Signed-off-by Jim Mattson <[email protected]>Reviewed-by Marc Orr <[email protected]>--- arch/x86/kvm/cpuid.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
Quoted 1 line
Reviewed-by Borislav Petkov <[email protected]>
Paolo?
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH 2/2] kvm: x86: Include CPUID leaf 0x8000001e in kvm's supported CPUID
Quoted 19 lines · Borislav Petkov
Quoted 8 lines · Jim Mattson
Kvm now supports extended CPUID functions through
0x8000001f. CPUID leaf0x8000001eis AMD's Processor Topology Information leaf. This contains similar information to CPUID leaf0xb(Intel's Extended Topology Enumeration leaf), and should be included in the output ofKVM_GET_SUPPORTED_CPUID, even though userspace is likely to override some of this information based upon the configuration of the particular VM.Quoted 8 lines
Cc Brijesh Singh <[email protected]>Cc Borislav Petkov <[email protected]>Fixes 8765d75329a38 ("KVM: X86: Extend CPUID range to include new leaf")Signed-off-by Jim Mattson <[email protected]>Reviewed-by Marc Orr <[email protected]>--- arch/x86/kvm/cpuid.c | 1 + 1 file changed, 1 insertion(+)
Quoted 1 line
Reviewed-by Borislav Petkov <[email protected]>
Paolo?
Re: [PATCH 2/2] kvm: x86: Include CPUID leaf 0x8000001e in kvm's supported CPUID
Quoted 20 lines · Jim Mattson
Quoted 19 lines · Borislav Petkov
Quoted 16 lines · Jim Mattson
Kvm now supports extended CPUID functions through
0x8000001f. CPUID leaf0x8000001eis AMD's Processor Topology Information leaf. This contains similar information to CPUID leaf0xb(Intel's Extended Topology Enumeration leaf), and should be included in the output ofKVM_GET_SUPPORTED_CPUID, even though userspace is likely to override some of this information based upon the configuration of the particular VM.Cc Brijesh Singh <[email protected]>Cc Borislav Petkov <[email protected]>Fixes 8765d75329a38 ("KVM: X86: Extend CPUID range to include new leaf")Signed-off-by Jim Mattson <[email protected]>Reviewed-by Marc Orr <[email protected]>--- arch/x86/kvm/cpuid.c | 1 + 1 file changed, 1 insertion(+)
Quoted 4 lines
Quoted 1 line
Reviewed-by Borislav Petkov <[email protected]>Paolo?
Queued both (for 5.2-rc2), thanks.
Paolo