From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:41957) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UaSIZ-0005WN-UI for qemu-devel@nongnu.org; Thu, 09 May 2013 10:58:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UaSIY-0002Hj-O5 for qemu-devel@nongnu.org; Thu, 09 May 2013 10:58:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42011) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UaSIY-0002Hf-GL for qemu-devel@nongnu.org; Thu, 09 May 2013 10:58:22 -0400 Message-ID: <518BB984.10200@redhat.com> Date: Thu, 09 May 2013 16:58:12 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1368060022-16911-1-git-send-email-qemulist@gmail.com> <20130509084418.GB32074@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/2] Vring: vring's listener's priority should higher than kvm List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: liu ping fan Cc: Peter Maydell , Anthony Liguori , "Michael S. Tsirkin" , Jan Kiszka , qemu-devel@nongnu.org, Stefan Hajnoczi Il 09/05/2013 10:54, liu ping fan ha scritto: > On Thu, May 9, 2013 at 4:44 PM, Michael S. Tsirkin wrote: >> On Thu, May 09, 2013 at 08:40:21AM +0800, Liu Ping Fan wrote: >>> From: Liu Ping Fan >>> >>> Hosts threads which handle vring should have high MemoryListener priority >>> than kvm. For currently code, take the following scenario: >>> kvm_region_add() run earlier before vhost_region_add(), then in guest, >>> vring's desc[i] can refer to addressX in the new region known by guest. >>> But vhost does not know this new region yet, and the vring handler will >>> fail. >>> >>> Signed-off-by: Liu Ping Fan >> >> Is this seen in testing, or are you describing a theorecitical >> scenario? Please make this clear in the commit log. >> > A theorecitical scenario. I think vcpu thread and vhost are async, > so we need this method to sync. But why should this matter for hostmem? It doesn't communicate in any way with the hypervisor. Paolo