From: Paolo Bonzini <pbonzini@redhat.com>
To: Marcelo Tosatti <mtosatti@redhat.com>, kvm-devel <kvm@vger.kernel.org>
Subject: Re: KVM: x86: expose invariant tsc cpuid bit (v2)
Date: Tue, 29 Apr 2014 15:12:59 +0200 [thread overview]
Message-ID: <535FA55B.1060300@redhat.com> (raw)
In-Reply-To: <20140427013023.GA6673@amt.cnet>
Il 27/04/2014 03:30, Marcelo Tosatti ha scritto:
>
> Invariant TSC is a property of TSC, no additional
> support code necessary.
>
> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
>
> diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
> index f47a104..333b88d 100644
> --- a/arch/x86/kvm/cpuid.c
> +++ b/arch/x86/kvm/cpuid.c
> @@ -495,6 +495,13 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
> entry->ecx &= kvm_supported_word6_x86_features;
> cpuid_mask(&entry->ecx, 6);
> break;
> + case 0x80000007: /* Advanced power management */
> + /* invariant TSC is CPUID.80000007H:EDX[8] */
> + entry->edx &= (1 << 8);
> + /* mask against host */
> + entry->edx &= boot_cpu_data.x86_power;
> + entry->eax = entry->ebx = entry->ecx = 0;
> + break;
> case 0x80000008: {
> unsigned g_phys_as = (entry->eax >> 16) & 0xff;
> unsigned virt_as = max((entry->eax >> 8) & 0xff, 48U);
> @@ -525,7 +532,6 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
> case 3: /* Processor serial number */
> case 5: /* MONITOR/MWAIT */
> case 6: /* Thermal management */
> - case 0x80000007: /* Advanced power management */
> case 0xC0000002:
> case 0xC0000003:
> case 0xC0000004:
>
Applying to kvm/queue, thanks.
Paolo
prev parent reply other threads:[~2014-04-29 13:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-25 22:15 KVM: x86: expose invariant tsc cpuid bit Marcelo Tosatti
2014-04-27 1:30 ` KVM: x86: expose invariant tsc cpuid bit (v2) Marcelo Tosatti
2014-04-29 13:12 ` Paolo Bonzini [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=535FA55B.1060300@redhat.com \
--to=pbonzini@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.