From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] KVM: VMX cannot yet handle migration-after-preemption, so disable it Date: Wed, 25 Jul 2007 07:13:25 +0300 Message-ID: <46A6CDE5.60904@qumranet.com> References: <46A694EC0200005A000281E3@mcclure.wal.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Gregory Haskins Return-path: In-Reply-To: <46A694EC0200005A000281E3-Igcdv/6uVdMHoYOw/+koYqIwWpluYiW7@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Gregory Haskins wrote: > On Wed, 2007-07-25 at 06:20 +0300, Avi Kivity wrote: > > >> I'd rather wait for the real fix, especially as this is an experimental >> branch. Can you provide details of the issue? >> >> > > Sure. Keep in mind I am working with the RT kernel, so things might be > tighter and/or different than the vanilla kernel w.r.t. what I am about > to say: > > But in a nutshell, the current code calls vcpu_clear() during a sched-in > operation. If the vcpu is simply uninitialized, no problem. We clear > it inline in the handler. However, if the vcpu is migrating we have an > issue. A synchronous smp_call_function_single() is invoked to > vcpu_clear the remote pCPU, but you must have interrupts enabled to call > this function to avoid a deadlock in the IPI handshake. sched-in() > handlers are (and should be) called with interrupts and preemption > disabled. > > Preemption disabled yes, but interrupts? IIRC I picked the place where sched_in is called to have interrupts enabled, but maybe -rt changes that. Seems like finding a better position for that hook would solve the problem. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/