kvm: x86: Add "significant index" flag to a few CPUID leaves
diff mbox series

Message ID 20190912165503.190905-1-jmattson@google.com
State New
Headers show
Series
  • kvm: x86: Add "significant index" flag to a few CPUID leaves
Related show

Commit Message

Jim Mattson Sept. 12, 2019, 4:55 p.m. UTC
According to the Intel SDM, volume 2, "CPUID," the index is
significant (or partially significant) for CPUID leaves 0FH, 10H, 12H,
17H, 18H, and 1FH.

Add the corresponding flag to these CPUID leaves in do_host_cpuid().

Signed-off-by: Jim Mattson <jmattson@google.com>
Reviewed-by: Peter Shier <pshier@google.com>
Reviewed-by: Steve Rutherford <srutherford@google.com>
Fixes: a87f2d3a6eadab ("KVM: x86: Add Intel CPUID.1F cpuid emulation support")
---
 arch/x86/kvm/cpuid.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Krish Sadhukhan Sept. 12, 2019, 5:41 p.m. UTC | #1
On 9/12/19 9:55 AM, Jim Mattson wrote:
> According to the Intel SDM, volume 2, "CPUID," the index is
> significant (or partially significant) for CPUID leaves 0FH, 10H, 12H,
> 17H, 18H, and 1FH.
>
> Add the corresponding flag to these CPUID leaves in do_host_cpuid().
>
> Signed-off-by: Jim Mattson <jmattson@google.com>
> Reviewed-by: Peter Shier <pshier@google.com>
> Reviewed-by: Steve Rutherford <srutherford@google.com>
> Fixes: a87f2d3a6eadab ("KVM: x86: Add Intel CPUID.1F cpuid emulation support")
> ---
>   arch/x86/kvm/cpuid.c | 6 ++++++
>   1 file changed, 6 insertions(+)
>
> diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
> index 22c2720cd948e..e7d25f4364664 100644
> --- a/arch/x86/kvm/cpuid.c
> +++ b/arch/x86/kvm/cpuid.c
> @@ -304,7 +304,13 @@ static void do_host_cpuid(struct kvm_cpuid_entry2 *entry, u32 function,
>   	case 7:
>   	case 0xb:
>   	case 0xd:
> +	case 0xf:
> +	case 0x10:
> +	case 0x12:
>   	case 0x14:
> +	case 0x17:
> +	case 0x18:
> +	case 0x1f:
>   	case 0x8000001d:
>   		entry->flags |= KVM_CPUID_FLAG_SIGNIFCANT_INDEX;
>   		break;


Reviewed-by: Krish Sadhukhan <krish.sadhukhan@oracle.com>
Jim Mattson Sept. 18, 2019, 11:05 p.m. UTC | #2
On Thu, Sep 12, 2019 at 10:41 AM Krish Sadhukhan
<krish.sadhukhan@oracle.com> wrote:
>
>
> On 9/12/19 9:55 AM, Jim Mattson wrote:
> > According to the Intel SDM, volume 2, "CPUID," the index is
> > significant (or partially significant) for CPUID leaves 0FH, 10H, 12H,
> > 17H, 18H, and 1FH.
> >
> > Add the corresponding flag to these CPUID leaves in do_host_cpuid().
> >
> > Signed-off-by: Jim Mattson <jmattson@google.com>
> > Reviewed-by: Peter Shier <pshier@google.com>
> > Reviewed-by: Steve Rutherford <srutherford@google.com>
> > Fixes: a87f2d3a6eadab ("KVM: x86: Add Intel CPUID.1F cpuid emulation support")
> > ---
> >   arch/x86/kvm/cpuid.c | 6 ++++++
> >   1 file changed, 6 insertions(+)
> >
> > diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
> > index 22c2720cd948e..e7d25f4364664 100644
> > --- a/arch/x86/kvm/cpuid.c
> > +++ b/arch/x86/kvm/cpuid.c
> > @@ -304,7 +304,13 @@ static void do_host_cpuid(struct kvm_cpuid_entry2 *entry, u32 function,
> >       case 7:
> >       case 0xb:
> >       case 0xd:
> > +     case 0xf:
> > +     case 0x10:
> > +     case 0x12:
> >       case 0x14:
> > +     case 0x17:
> > +     case 0x18:
> > +     case 0x1f:
> >       case 0x8000001d:
> >               entry->flags |= KVM_CPUID_FLAG_SIGNIFCANT_INDEX;
> >               break;
>
>
> Reviewed-by: Krish Sadhukhan <krish.sadhukhan@oracle.com>


Ping.
Paolo Bonzini Sept. 20, 2019, 11:40 a.m. UTC | #3
On 19/09/19 01:05, Jim Mattson wrote:
> On Thu, Sep 12, 2019 at 10:41 AM Krish Sadhukhan
> <krish.sadhukhan@oracle.com> wrote:
>>
>>
>> On 9/12/19 9:55 AM, Jim Mattson wrote:
>>> According to the Intel SDM, volume 2, "CPUID," the index is
>>> significant (or partially significant) for CPUID leaves 0FH, 10H, 12H,
>>> 17H, 18H, and 1FH.
>>>
>>> Add the corresponding flag to these CPUID leaves in do_host_cpuid().
>>>
>>> Signed-off-by: Jim Mattson <jmattson@google.com>
>>> Reviewed-by: Peter Shier <pshier@google.com>
>>> Reviewed-by: Steve Rutherford <srutherford@google.com>
>>> Fixes: a87f2d3a6eadab ("KVM: x86: Add Intel CPUID.1F cpuid emulation support")
>>> ---
>>>   arch/x86/kvm/cpuid.c | 6 ++++++
>>>   1 file changed, 6 insertions(+)
>>>
>>> diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
>>> index 22c2720cd948e..e7d25f4364664 100644
>>> --- a/arch/x86/kvm/cpuid.c
>>> +++ b/arch/x86/kvm/cpuid.c
>>> @@ -304,7 +304,13 @@ static void do_host_cpuid(struct kvm_cpuid_entry2 *entry, u32 function,
>>>       case 7:
>>>       case 0xb:
>>>       case 0xd:
>>> +     case 0xf:
>>> +     case 0x10:
>>> +     case 0x12:
>>>       case 0x14:
>>> +     case 0x17:
>>> +     case 0x18:
>>> +     case 0x1f:
>>>       case 0x8000001d:
>>>               entry->flags |= KVM_CPUID_FLAG_SIGNIFCANT_INDEX;
>>>               break;
>>
>>
>> Reviewed-by: Krish Sadhukhan <krish.sadhukhan@oracle.com>
> 
> 
> Ping.
> 

Queued, thanks.

Paolo
Paolo Bonzini Sept. 24, 2019, 1:58 p.m. UTC | #4
On 12/09/19 18:55, Jim Mattson wrote:
> According to the Intel SDM, volume 2, "CPUID," the index is
> significant (or partially significant) for CPUID leaves 0FH, 10H, 12H,
> 17H, 18H, and 1FH.
> 
> Add the corresponding flag to these CPUID leaves in do_host_cpuid().
> 
> Signed-off-by: Jim Mattson <jmattson@google.com>
> Reviewed-by: Peter Shier <pshier@google.com>
> Reviewed-by: Steve Rutherford <srutherford@google.com>
> Fixes: a87f2d3a6eadab ("KVM: x86: Add Intel CPUID.1F cpuid emulation support")
> ---
>  arch/x86/kvm/cpuid.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
> index 22c2720cd948e..e7d25f4364664 100644
> --- a/arch/x86/kvm/cpuid.c
> +++ b/arch/x86/kvm/cpuid.c
> @@ -304,7 +304,13 @@ static void do_host_cpuid(struct kvm_cpuid_entry2 *entry, u32 function,
>  	case 7:
>  	case 0xb:
>  	case 0xd:
> +	case 0xf:
> +	case 0x10:
> +	case 0x12:
>  	case 0x14:
> +	case 0x17:
> +	case 0x18:
> +	case 0x1f:
>  	case 0x8000001d:
>  		entry->flags |= KVM_CPUID_FLAG_SIGNIFCANT_INDEX;
>  		break;
> 

Queued, thanks.

Paolo

Patch
diff mbox series

diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
index 22c2720cd948e..e7d25f4364664 100644
--- a/arch/x86/kvm/cpuid.c
+++ b/arch/x86/kvm/cpuid.c
@@ -304,7 +304,13 @@  static void do_host_cpuid(struct kvm_cpuid_entry2 *entry, u32 function,
 	case 7:
 	case 0xb:
 	case 0xd:
+	case 0xf:
+	case 0x10:
+	case 0x12:
 	case 0x14:
+	case 0x17:
+	case 0x18:
+	case 0x1f:
 	case 0x8000001d:
 		entry->flags |= KVM_CPUID_FLAG_SIGNIFCANT_INDEX;
 		break;