From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: kvm crashes with spice while loading qxl Date: Tue, 08 Mar 2011 10:28:54 +0100 Message-ID: <4D75F6D6.1000600@redhat.com> References: <4D68F20D.2020401@web.de> <20110305163558.GA4607@amt.cnet> <4D736434.1030704@redhat.com> <20110307161305.GB10021@amt.cnet> <4D75F440.6010401@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , Jan Kiszka , xming , Gerd Hoffmann , kvm@vger.kernel.org, qemu-devel To: Avi Kivity Return-path: Received: from mx1.redhat.com ([209.132.183.28]:2852 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750844Ab1CHJ3G (ORCPT ); Tue, 8 Mar 2011 04:29:06 -0500 In-Reply-To: <4D75F440.6010401@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 03/08/2011 10:17 AM, Avi Kivity wrote: >> Memory map can be protected by a read-write lock initially, so that vcpu >> thread holds it for read. Later can be converted to URCU. > > rwlock is insufficient, need a way to force the vcpu off so a writer can > actually do something. > > So we need some kind of priority rwlock where a reader lets the lock > know how it can force it off in case a writer comes along. If the reader is the VCPU thread, the VCPU thread can always be bounced via qemu_cpu_kick. Paolo