* [PATCH] kvm: cpuid: Expose leaves 0x80000005 and 0x80000006 to the guest
@ 2019-10-22 21:33 Jim Mattson
2019-11-04 20:49 ` Jim Mattson
0 siblings, 1 reply; 4+ messages in thread
From: Jim Mattson @ 2019-10-22 21:33 UTC (permalink / raw)
To: kvm, Paolo Bonzini; +Cc: Jim Mattson
Leaf 0x80000005 is "L1 Cache and TLB Information." Leaf 0x80000006 is
"L2 Cache and TLB and L3 Cache Information." Include these leaves in
the array returned by KVM_GET_SUPPORTED_CPUID.
Signed-off-by: Jim Mattson <jmattson@google.com>
---
arch/x86/kvm/cpuid.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
index 9c5029cf6f3f..1b40d8277b84 100644
--- a/arch/x86/kvm/cpuid.c
+++ b/arch/x86/kvm/cpuid.c
@@ -730,6 +730,9 @@ static inline int __do_cpuid_func(struct kvm_cpuid_entry2 *entry, u32 function,
entry->ecx &= kvm_cpuid_8000_0001_ecx_x86_features;
cpuid_mask(&entry->ecx, CPUID_8000_0001_ECX);
break;
+ case 0x80000005:
+ case 0x80000006:
+ break;
case 0x80000007: /* Advanced power management */
/* invariant TSC is CPUID.80000007H:EDX[8] */
entry->edx &= (1 << 8);
--
2.23.0.866.gb869b98d4c-goog
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] kvm: cpuid: Expose leaves 0x80000005 and 0x80000006 to the guest
2019-10-22 21:33 [PATCH] kvm: cpuid: Expose leaves 0x80000005 and 0x80000006 to the guest Jim Mattson
@ 2019-11-04 20:49 ` Jim Mattson
2019-11-05 2:02 ` Krish Sadhukhan
0 siblings, 1 reply; 4+ messages in thread
From: Jim Mattson @ 2019-11-04 20:49 UTC (permalink / raw)
To: kvm list, Paolo Bonzini
On Tue, Oct 22, 2019 at 2:33 PM Jim Mattson <jmattson@google.com> wrote:
>
> Leaf 0x80000005 is "L1 Cache and TLB Information." Leaf 0x80000006 is
> "L2 Cache and TLB and L3 Cache Information." Include these leaves in
> the array returned by KVM_GET_SUPPORTED_CPUID.
>
> Signed-off-by: Jim Mattson <jmattson@google.com>
> ---
> arch/x86/kvm/cpuid.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
> index 9c5029cf6f3f..1b40d8277b84 100644
> --- a/arch/x86/kvm/cpuid.c
> +++ b/arch/x86/kvm/cpuid.c
> @@ -730,6 +730,9 @@ static inline int __do_cpuid_func(struct kvm_cpuid_entry2 *entry, u32 function,
> entry->ecx &= kvm_cpuid_8000_0001_ecx_x86_features;
> cpuid_mask(&entry->ecx, CPUID_8000_0001_ECX);
> break;
> + case 0x80000005:
> + case 0x80000006:
> + break;
> case 0x80000007: /* Advanced power management */
> /* invariant TSC is CPUID.80000007H:EDX[8] */
> entry->edx &= (1 << 8);
> --
> 2.23.0.866.gb869b98d4c-goog
>
Ping.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] kvm: cpuid: Expose leaves 0x80000005 and 0x80000006 to the guest
2019-11-04 20:49 ` Jim Mattson
@ 2019-11-05 2:02 ` Krish Sadhukhan
2019-11-05 10:39 ` Paolo Bonzini
0 siblings, 1 reply; 4+ messages in thread
From: Krish Sadhukhan @ 2019-11-05 2:02 UTC (permalink / raw)
To: Jim Mattson, kvm list, Paolo Bonzini
On 11/04/2019 12:49 PM, Jim Mattson wrote:
> On Tue, Oct 22, 2019 at 2:33 PM Jim Mattson <jmattson@google.com> wrote:
>> Leaf 0x80000005 is "L1 Cache and TLB Information." Leaf 0x80000006 is
>> "L2 Cache and TLB and L3 Cache Information." Include these leaves in
>> the array returned by KVM_GET_SUPPORTED_CPUID.
>>
>> Signed-off-by: Jim Mattson <jmattson@google.com>
>> ---
>> arch/x86/kvm/cpuid.c | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
>> index 9c5029cf6f3f..1b40d8277b84 100644
>> --- a/arch/x86/kvm/cpuid.c
>> +++ b/arch/x86/kvm/cpuid.c
>> @@ -730,6 +730,9 @@ static inline int __do_cpuid_func(struct kvm_cpuid_entry2 *entry, u32 function,
>> entry->ecx &= kvm_cpuid_8000_0001_ecx_x86_features;
>> cpuid_mask(&entry->ecx, CPUID_8000_0001_ECX);
>> break;
>> + case 0x80000005:
>> + case 0x80000006:
>> + break;
>> case 0x80000007: /* Advanced power management */
>> /* invariant TSC is CPUID.80000007H:EDX[8] */
>> entry->edx &= (1 << 8);
>> --
>> 2.23.0.866.gb869b98d4c-goog
>>
> Ping.
Just curious about where we are actually setting the information for
these two leaves. I don't see it either in __do_cpuid_func() or in
kvm_x86_ops->set_supported_cpuid().
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] kvm: cpuid: Expose leaves 0x80000005 and 0x80000006 to the guest
2019-11-05 2:02 ` Krish Sadhukhan
@ 2019-11-05 10:39 ` Paolo Bonzini
0 siblings, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2019-11-05 10:39 UTC (permalink / raw)
To: Krish Sadhukhan, Jim Mattson, kvm list
On 05/11/19 03:02, Krish Sadhukhan wrote:
>>>
>>> + case 0x80000005:
>>> + case 0x80000006:
>>> + break;
>>> case 0x80000007: /* Advanced power management */
>>> /* invariant TSC is CPUID.80000007H:EDX[8] */
>>> entry->edx &= (1 << 8);
>>> --
>>> 2.23.0.866.gb869b98d4c-goog
>>>
>> Ping.
>
> Just curious about where we are actually setting the information for
> these two leaves. I don't see it either in __do_cpuid_func() or in
> kvm_x86_ops->set_supported_cpuid().
do_cpuid_1_ent simply passes down the host information.
Patch queued, thanks.
Paolo
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-11-05 10:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-22 21:33 [PATCH] kvm: cpuid: Expose leaves 0x80000005 and 0x80000006 to the guest Jim Mattson
2019-11-04 20:49 ` Jim Mattson
2019-11-05 2:02 ` Krish Sadhukhan
2019-11-05 10:39 ` Paolo Bonzini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.