From mboxrd@z Thu Jan 1 00:00:00 1970 From: Radim =?utf-8?B?S3LEjW3DocWZ?= Subject: Re: PATCH: setup_vmcs_config: disable TSC scaling on unlike processors Date: Mon, 5 Dec 2016 17:37:39 +0100 Message-ID: <20161205163738.GA7972@potion> References: <20161202150632.GA22204@potion> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: kvm@vger.kernel.org, pbonzini@redhat.com To: Don Bowman Return-path: Received: from mx1.redhat.com ([209.132.183.28]:46148 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751455AbcLEQhs (ORCPT ); Mon, 5 Dec 2016 11:37:48 -0500 Content-Disposition: inline In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: 2016-12-02 15:58-0500, Don Bowman: > On 2 December 2016 at 14:10, Don Bowman wrote: >> On 2 December 2016 at 10:07, Radim Krčmář wrote: >>> 2016-12-01 21:32-0500, Don Bowman: >>>> My system has what i thought were two identical processors (same >>>> stepping ID etc). >>>> However, bafflingly, one of them has the ability to do TSC scaling, >>>> and one does not (as reported in the vmcs). >>> > OK, how about this? The check has to be in setup_vmcs_config() not > elsewhere I think. This is where the rdmsr occurs, and immediately > following that is the compare against the other processor(s). Unless > I'm missing something I don't see how vmx_secondary_exec_control() > could work. For the enable I was following the 'enable_pml' which is > already there, but have changed it below. vmx_check_processor_compat() > calls setup_vmcs_config() and then the memcmp() immediately > afterwards. Right, KVM checks this early ... I don't like that the patch treats tsc_scaling specially while the same could happen with some other feature. What about warning in vmx_check_processor_compat() if features that won't be used don't match, but letting the check pass? (I'd even prefer an unsafe option to disable the check than to treat tsc_scaling differently.)