From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Hildenbrand Subject: Re: PATCH: setup_vmcs_config: disable TSC scaling on unlike processors Date: Wed, 7 Dec 2016 12:37:16 +0100 Message-ID: <22b615ad-9161-2fef-4d17-885c33b0ac76@redhat.com> References: <20161202150632.GA22204@potion> <59a3f1a2-5b9e-2ca7-5285-1469fef40f42@redhat.com> <20161206110858.GC8660@potion> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: Don Bowman , kvm@vger.kernel.org To: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Paolo Bonzini Return-path: Received: from mx1.redhat.com ([209.132.183.28]:46220 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750953AbcLGLhT (ORCPT ); Wed, 7 Dec 2016 06:37:19 -0500 In-Reply-To: <20161206110858.GC8660@potion> Sender: kvm-owner@vger.kernel.org List-ID: > 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? My intuition tells me that whenever we hotplug CPUs that have less features than used, we are in trouble. So tsc scaling might just be the tip of the iceberg. I think this is a general problem. What should happen if we hotplug such CPUs? We can't run existing VCPUs on them. And isn't this even a general problem, also for other tasks in the system (how is that problem solved with cpuid features?)? (I am currently thinking about "virsh capabilities", could it happen that our "host" cpu model is no longer valid after we hotplugged cpus (as the common feature set got smaller)? that would be very ugly) -- David