Skip to contentSkip to conversation

kvm: x86: Include multiple indices with CPUID leaf 0x8000001d

PATCH Applied Jim Mattson 2 participants 3 messages May 17, 2019 – May 20, 2019 4 messages not in the archive KVM

lore
Share & tools
lore

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]

#2 lore raw
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]>
---
 arch/x86/kvm/cpuid.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
Quoted 1 line

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]

#5 lore raw

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 leaf 0x8000001e is AMD's Processor Topology Information leaf. This contains similar information to CPUID leaf 0xb (Intel's Extended Topology Enumeration leaf), and should be included in the output of KVM_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")
---
 arch/x86/kvm/cpuid.c | 1 +
 1 file changed, 1 insertion(+)
Quoted 1 line

Paolo?

maintainer Applied
#6 lore raw

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 leaf 0x8000001e is AMD's Processor Topology Information leaf. This contains similar information to CPUID leaf 0xb (Intel's Extended Topology Enumeration leaf), and should be included in the output of KVM_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")
---
 arch/x86/kvm/cpuid.c | 1 +
 1 file changed, 1 insertion(+)
Quoted 4 lines
Quoted 1 line

Paolo?

Queued both (for 5.2-rc2), thanks.

Paolo