From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751950AbcGNIkQ (ORCPT ); Thu, 14 Jul 2016 04:40:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43453 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751755AbcGNIkF (ORCPT ); Thu, 14 Jul 2016 04:40:05 -0400 Subject: Re: [PATCH 3.12 81/88] KVM: x86: expose invariant tsc cpuid bit (v2) To: Jiri Slaby , stable@vger.kernel.org References: <3d4036cb9b963cdd270c02856a888183da0623db.1468483951.git.jslaby@suse.cz> <7841d487c95b78c992a46f0e6440a6a9975f0982.1468483951.git.jslaby@suse.cz> Cc: linux-kernel@vger.kernel.org, Marcelo Tosatti From: Paolo Bonzini Message-ID: <5156cbea-978a-f6cd-1ea7-62378303e21c@redhat.com> Date: Thu, 14 Jul 2016 10:40:00 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <7841d487c95b78c992a46f0e6440a6a9975f0982.1468483951.git.jslaby@suse.cz> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 14 Jul 2016 08:40:04 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14/07/2016 10:16, Jiri Slaby wrote: > From: Marcelo Tosatti > > 3.12-stable review patch. If anyone has any objections, please let me know. Why stable? The commit is in 3.16, but AFAICS it never went into other stable kernels. Paolo > =============== > > commit e4c9a5a17567f8ea975bdcfdd1bf9d63965de6c9 upstream. > > Invariant TSC is a property of TSC, no additional > support code necessary. > > Signed-off-by: Marcelo Tosatti > Signed-off-by: Paolo Bonzini > Signed-off-by: Jiri Slaby > --- > arch/x86/kvm/cpuid.c | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c > index b132551528e5..6620ac307215 100644 > --- a/arch/x86/kvm/cpuid.c > +++ b/arch/x86/kvm/cpuid.c > @@ -437,6 +437,13 @@ static 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); > @@ -467,7 +474,6 @@ static 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: >