* [PATCH] KVM: x86: Allow ARAT CPU feature
@ 2015-05-24 15:22 Jan Kiszka
2015-05-25 13:24 ` Paolo Bonzini
0 siblings, 1 reply; 4+ messages in thread
From: Jan Kiszka @ 2015-05-24 15:22 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: kvm
[-- Attachment #1: Type: text/plain, Size: 1146 bytes --]
From: Jan Kiszka <jan.kiszka@siemens.com>
There is no reason to deny this feature to guests. We are emulating the
APIC timer, thus are exposing it without stops in power-saving states.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
arch/x86/kvm/cpuid.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
index 59b69f6..6d84a9e 100644
--- a/arch/x86/kvm/cpuid.c
+++ b/arch/x86/kvm/cpuid.c
@@ -411,6 +411,12 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
}
break;
}
+ case 6: /* Thermal management */
+ entry->eax = 0x4; /* allow ARAT */
+ entry->ebx = 0;
+ entry->ecx = 0;
+ entry->edx = 0;
+ break;
case 7: {
entry->flags |= KVM_CPUID_FLAG_SIGNIFCANT_INDEX;
/* Mask ebx against host capability word 9 */
@@ -587,7 +593,6 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
break;
case 3: /* Processor serial number */
case 5: /* MONITOR/MWAIT */
- case 6: /* Thermal management */
case 0xC0000002:
case 0xC0000003:
case 0xC0000004:
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] KVM: x86: Allow ARAT CPU feature
2015-05-24 15:22 [PATCH] KVM: x86: Allow ARAT CPU feature Jan Kiszka
@ 2015-05-25 13:24 ` Paolo Bonzini
2015-05-26 1:37 ` Yong Wang
0 siblings, 1 reply; 4+ messages in thread
From: Paolo Bonzini @ 2015-05-25 13:24 UTC (permalink / raw)
To: Jan Kiszka; +Cc: kvm
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On 24/05/2015 17:22, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> There is no reason to deny this feature to guests. We are
> emulating the APIC timer, thus are exposing it without stops in
> power-saving states.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Thanks, looks good.
Paolo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQEcBAEBCAAGBQJVYyJyAAoJEL/70l94x66DuA8H/isaX6grqCJRUAj15LJAJJrw
nP39iVN+pMcmivoOxWRzIJspZerb06pEZMWAlSaxdkykYVkD23agCqXGBbFO1YTX
pB3X4y+5TPbhwxkJs0ElusThUr0R/I4Y5Nj9rwfA13+JA9IRDJhlAZJKfQvNFNqj
Q8PV/JD/c1ScWFsfVys9oZfjFKa5Wg9js9ayeWP0dLKiLRNQC/6LJJwHPN9zOouP
tYf6HejpHqybF89g7nLfP3ihIPHHoIWtn8pikBN+idCqB7szpwNpBoe0RVcCDA7k
3rdJk6zGxss7Fruw3qVtKk5ze9u5H4kCrLovOGgboYvRYC5flS/0y/zH/4dHiOQ=
=/JKw
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] KVM: x86: Allow ARAT CPU feature
2015-05-25 13:24 ` Paolo Bonzini
@ 2015-05-26 1:37 ` Yong Wang
2015-05-26 4:36 ` Jan Kiszka
0 siblings, 1 reply; 4+ messages in thread
From: Yong Wang @ 2015-05-26 1:37 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: Jan Kiszka, kvm
On Mon, May 25, 2015 at 03:24:05PM +0200, Paolo Bonzini wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
>
>
> On 24/05/2015 17:22, Jan Kiszka wrote:
> > From: Jan Kiszka <jan.kiszka@siemens.com>
> >
> > There is no reason to deny this feature to guests. We are
> > emulating the APIC timer, thus are exposing it without stops in
> > power-saving states.
> >
> > Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>
> Thanks, looks good.
>
What's the motivation of exposing ARAT to guests?
Thanks
-Yong
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] KVM: x86: Allow ARAT CPU feature
2015-05-26 1:37 ` Yong Wang
@ 2015-05-26 4:36 ` Jan Kiszka
0 siblings, 0 replies; 4+ messages in thread
From: Jan Kiszka @ 2015-05-26 4:36 UTC (permalink / raw)
To: Yong Wang, Paolo Bonzini; +Cc: kvm
[-- Attachment #1: Type: text/plain, Size: 850 bytes --]
On 2015-05-26 03:37, Yong Wang wrote:
> On Mon, May 25, 2015 at 03:24:05PM +0200, Paolo Bonzini wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA256
>>
>>
>>
>> On 24/05/2015 17:22, Jan Kiszka wrote:
>>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>>
>>> There is no reason to deny this feature to guests. We are
>>> emulating the APIC timer, thus are exposing it without stops in
>>> power-saving states.
>>>
>>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>>
>> Thanks, looks good.
>>
>
> What's the motivation of exposing ARAT to guests?
First of all, another step towards feature correctness for real CPU
models. But I also have a setup where Linux only has APICs as
clockevents (Jailhouse non-root cells), thus has no broadcast source. In
that case it depends on ARAT to switch to highres mode.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-05-26 4:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-24 15:22 [PATCH] KVM: x86: Allow ARAT CPU feature Jan Kiszka
2015-05-25 13:24 ` Paolo Bonzini
2015-05-26 1:37 ` Yong Wang
2015-05-26 4:36 ` Jan Kiszka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox