From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] Activate Virtualization On Demand v3 Date: Wed, 05 Nov 2008 13:49:47 +0200 Message-ID: <4911885B.3040703@redhat.com> References: <1225881664-16643-1-git-send-email-agraf@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, kraxel@redhat.com, anthony@codemonkey.ws, Sander.Vanleeuwen@sun.com, zach@vmware.com, brogers@novell.com To: Alexander Graf Return-path: Received: from mx2.redhat.com ([66.187.237.31]:55505 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755324AbYKELt4 (ORCPT ); Wed, 5 Nov 2008 06:49:56 -0500 In-Reply-To: <1225881664-16643-1-git-send-email-agraf@suse.de> Sender: kvm-owner@vger.kernel.org List-ID: Alexander Graf wrote: > X86 CPUs need to have some magic happening to enable the virtualization > extensions on them. This magic can result in unpleasant results for > users, like blocking other VMMs from working (vmx) or using invalid TLB > entries (svm). > > Currently KVM activates virtualization when the respective kernel module > is loaded. This blocks us from autoloading KVM modules without breaking > other VMMs. > > To circumvent this problem at least a bit, this patch introduces on > demand activation of virtualization. This means, that instead > virtualization is enabled on creation of the first virtual machine > and disabled on removal of the last one. > > So using this, KVM can be easily autoloaded, while keeping other > hypervisors usable. > > v2 adds returns to non-x86 hardware_enables and adds IA64 change > v3 changes: > - use spin_lock instead of atomics > - put locking to new functions hardware_{en,dis}able_all that get called > on VM creation/destruction > - remove usage counter checks where not necessary > - return -EINVAL for IA64 slot < 0 case > > Is this v3 with all the latest changes? it precedes some messages where you say you'll change things by about 40 minutes. In any case, I'll defer applying until Eduardo's kdump/reboot changes go in, since they touch the same places, and Eduardo's changes are much harder to test. -- error compiling committee.c: too many arguments to function