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: Tue, 6 Dec 2016 12:08:58 +0100 Message-ID: <20161206110858.GC8660@potion> References: <20161202150632.GA22204@potion> <59a3f1a2-5b9e-2ca7-5285-1469fef40f42@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: David Hildenbrand , Don Bowman , kvm@vger.kernel.org To: Paolo Bonzini Return-path: Received: from mx1.redhat.com ([209.132.183.28]:12806 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751888AbcLFLJC (ORCPT ); Tue, 6 Dec 2016 06:09:02 -0500 Content-Disposition: inline In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: 2016-12-06 10:09+0100, Paolo Bonzini: > On 06/12/2016 09:49, David Hildenbrand wrote: >>>> >>>> I feel a better solution is to mask off this capability on the one >>>> processor. >>> >>> I like the global toggle better -- it is less code with more uses. >> >> (not having much insight) what speaks against allowing such features >> only if available on all CPUs symmetrically? I actually prefer having an >> automatism to some magic toggle. > > I agree with David. Just warn and proceed with the minimum common set > of features. Yes, that is reasonable -- I though David wanted to use the feature when running on CPUs that support it (only mask off on the one). I'd start with changing the check in vmx_check_processor_compat() to ignore disabled features and then extend KVM to enable only the common set. Finding the minimal set of common features is complicated by hotplug ... I think that the check we have is not working perfectly, so if you currently 1) offline all cores on the worse CPU 2) load kvm module 3) online all CPUs then KVM is going enable tsc-scaling and not complain, but guests running on onlined CPUs are not going to work. Can you confirm that? Thanks.