[2/2] kvm: x86: Include CPUID leaf 0x8000001e in kvm's supported CPUID
diff mbox series

Message ID 20190327201537.77350-2-jmattson@google.com
State New
Headers show
Series
  • [1/2] kvm: x86: Include multiple indices with CPUID leaf 0x8000001d
Related show

Commit Message

Jim Mattson March 27, 2019, 8:15 p.m. UTC
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 <brijesh.singh@amd.com>
Cc: Borislav Petkov <bp@suse.de>
Fixes: 8765d75329a38 ("KVM: X86: Extend CPUID range to include new leaf")
Signed-off-by: Jim Mattson <jmattson@google.com>
Reviewed-by: Marc Orr <marcorr@google.com>
---
 arch/x86/kvm/cpuid.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Borislav Petkov April 1, 2019, 5:13 p.m. UTC | #1
On Wed, Mar 27, 2019 at 01:15:37PM -0700, Jim Mattson wrote:
> 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 <brijesh.singh@amd.com>
> Cc: Borislav Petkov <bp@suse.de>
> Fixes: 8765d75329a38 ("KVM: X86: Extend CPUID range to include new leaf")
> Signed-off-by: Jim Mattson <jmattson@google.com>
> Reviewed-by: Marc Orr <marcorr@google.com>
> ---
>  arch/x86/kvm/cpuid.c | 1 +
>  1 file changed, 1 insertion(+)

Reviewed-by: Borislav Petkov <bp@suse.de>
Jim Mattson May 17, 2019, 5:48 p.m. UTC | #2
On Mon, Apr 1, 2019 at 10:13 AM Borislav Petkov <bp@suse.de> wrote:
>
> On Wed, Mar 27, 2019 at 01:15:37PM -0700, Jim Mattson wrote:
> > 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 <brijesh.singh@amd.com>
> > Cc: Borislav Petkov <bp@suse.de>
> > Fixes: 8765d75329a38 ("KVM: X86: Extend CPUID range to include new leaf")
> > Signed-off-by: Jim Mattson <jmattson@google.com>
> > Reviewed-by: Marc Orr <marcorr@google.com>
> > ---
> >  arch/x86/kvm/cpuid.c | 1 +
> >  1 file changed, 1 insertion(+)
>
> Reviewed-by: Borislav Petkov <bp@suse.de>

Paolo?
Paolo Bonzini May 20, 2019, 10:04 a.m. UTC | #3
On 17/05/19 19:48, Jim Mattson wrote:
> On Mon, Apr 1, 2019 at 10:13 AM Borislav Petkov <bp@suse.de> wrote:
>>
>> On Wed, Mar 27, 2019 at 01:15:37PM -0700, Jim Mattson wrote:
>>> 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 <brijesh.singh@amd.com>
>>> Cc: Borislav Petkov <bp@suse.de>
>>> Fixes: 8765d75329a38 ("KVM: X86: Extend CPUID range to include new leaf")
>>> Signed-off-by: Jim Mattson <jmattson@google.com>
>>> Reviewed-by: Marc Orr <marcorr@google.com>
>>> ---
>>>  arch/x86/kvm/cpuid.c | 1 +
>>>  1 file changed, 1 insertion(+)
>>
>> Reviewed-by: Borislav Petkov <bp@suse.de>
> 
> Paolo?
> 

Queued both (for 5.2-rc2), thanks.

Paolo

Patch
diff mbox series

diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
index d22bba0b2ecc..ad1096e7b861 100644
--- a/arch/x86/kvm/cpuid.c
+++ b/arch/x86/kvm/cpuid.c
@@ -701,6 +701,7 @@  static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
 		entry->ecx = entry->edx = 0;
 		break;
 	case 0x8000001a:
+	case 0x8000001e:
 		break;
 	/*Add support for Centaur's CPUID instruction*/
 	case 0xC0000000: