From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] KVM: VMX: Fix locking order in handle_invalid_guest_state Date: Sun, 26 Jul 2009 16:51:07 +0300 Message-ID: <4A6C5F4B.2000902@redhat.com> References: <4A678A56.7050901@web.de> <20090723214553.GA10152@amt.cnet> <4A695C1D.7030807@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm-devel To: Jan Kiszka Return-path: Received: from mx2.redhat.com ([66.187.237.31]:36273 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753445AbZGZNqn (ORCPT ); Sun, 26 Jul 2009 09:46:43 -0400 In-Reply-To: <4A695C1D.7030807@web.de> Sender: kvm-owner@vger.kernel.org List-ID: On 07/24/2009 10:00 AM, Jan Kiszka wrote: > Marcelo Tosatti wrote: > >> On Wed, Jul 22, 2009 at 11:53:26PM +0200, Jan Kiszka wrote: >> >>> Release and re-acquire preemption and IRQ lock in the same order as >>> vcpu_enter_guest does. >>> >> This should happen in vcpu_enter_guest, before it decides to disable >> preemption/irqs (so you consolidate the control there). >> > > Maybe, maybe not. handle_invalid_guest_state is an alternative way of > "executing" guest code, and it currently shares the setup and tear-down > with vmx_vcpu_run. If it has to share parts that actually require > preemption and IRQ lock, then moving makes not much sense. Can anyone > comment on what the requirements for handle_invalid_guest_state are? > Like you said, it's an alternative to vmx entry/exit, so it shares the same requirements. It must run with interrupts and preemption enabled, but any code that normally runs in the entry critical section (like interrupt injection) must continue to run in a critical section. > I would suggest to merge this fix first and then decide about and > potentially merge a refactoring patch. > btw, what does it fix? a debug warning? -- error compiling committee.c: too many arguments to function