From mboxrd@z Thu Jan 1 00:00:00 1970 From: Radim =?utf-8?B?S3LEjW3DocWZ?= Subject: Re: [PATCH] KVM: hyperv: support HV_X64_MSR_TSC_FREQUENCY and HV_X64_MSR_APIC_FREQUENCY Date: Wed, 26 Jul 2017 14:45:59 +0200 Message-ID: <20170726124558.GE2544@flask> References: <20170717132847.29892-1-lprosek@redhat.com> <20170724142343.GA14941@potion> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: KVM list To: Ladi Prosek Return-path: Received: from mx1.redhat.com ([209.132.183.28]:38560 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751542AbdGZMqC (ORCPT ); Wed, 26 Jul 2017 08:46:02 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4E837C04D2F1 for ; Wed, 26 Jul 2017 12:46:02 +0000 (UTC) Content-Disposition: inline In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: 2017-07-26 11:47+0200, Ladi Prosek: > On Mon, Jul 24, 2017 at 4:23 PM, Radim Krčmář wrote: > > 2017-07-17 15:28+0200, Ladi Prosek: > >> The newly supported MSRs are advertised with the AccessFrequencyRegs > >> partition privilege flag and CPUID.40000003H:EDX[8] "Support for > >> determining timer frequencies is available" (both outside of the scope of > >> this KVM patch). > > > > Do Windows ignore the AccessFrequencyMsrs (CPUID.40000003H:EAX[11]) bit? > > No, Windows won't read the MSRs without CPUID.40000003H:EAX[11]. The > other bit (CPUID.40000003H:EDX[8]) appears to be ignored, or at least > I couldn't find any difference in behavior. Looking more into it, we are emulating non-root partitions, where CPUID.40000003H:EDX[8] would probably be clear and then the check Linux has in ms_hyperv_init_platform() could be wrong. I am not sure what FrequencyMsrsAvailable is for, though -- to allow AccessFrequencyMsrs in non-root even if root has AccessFrequencyMsrs disabled? > I wonder why you're asking, i.e. what is it that I'm misunderstanding :) I was just curious why you didn't mention both in the same way (CamelCase name or CPUID bit) and the best explanation was that you didn't need to care about one, because Windows worked without it. :) I think you got it all right. Thanks.