From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 1/11] QEMU/KVM: Fix deadlocks in monitor and debugger Date: Tue, 27 May 2008 16:09:04 +0300 Message-ID: <483C07F0.800@qumranet.com> References: <4839B14A.3010406@web.de> <483B351E.6010305@web.de> <483BD633.3080302@qumranet.com> <483C05F7.8040104@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm-devel , Hollis Blanchard , Jerone Young , Joerg Roedel To: Jan Kiszka Return-path: Received: from il.qumranet.com ([212.179.150.194]:49387 "EHLO il.qumranet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757248AbYE0NJF (ORCPT ); Tue, 27 May 2008 09:09:05 -0400 In-Reply-To: <483C05F7.8040104@siemens.com> Sender: kvm-owner@vger.kernel.org List-ID: Jan Kiszka wrote: > Avi Kivity wrote: > >> Jan Kiszka wrote: >> >>> Some monitor commands as well as the vm_stop() issued by the gdbstub on >>> external interruption so far deadlock on vcpu locks in the kernel. Patch >>> below resolves the issue by temporarily or permanently stopping all vcpu >>> threads before issuing the related KVM IOCTLs. It enables, e.g., to >>> break into guest code spinning in the vcpu and to use things like "info >>> cpus" in the monitor. >>> >>> >> I implemented the alternative on_vcpu() approach for this (similar to >> smp_call_function_single in the kernel) which solves the livelock >> without resorting to stopping the VM. >> > > I assume this pattern should then be applied to kvm_guest_debug (and > later on kvm_set_guest_debug) as well? You missed to fix that bug. > Yeah, I just patched the register stuff so I could test on_vcpu(). > Here is a quick patch to complete the work, will post rebased versions > of my remaining patches later today: > ----------- > > Use on_vcpu to call into kvm_guest_debug. Applied that, thanks. > Fix on_vpuc usage in > kvm_load_registers. > How embarrasing. I had that queued already, though. -- error compiling committee.c: too many arguments to function