From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:33250) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UaMF8-0002G6-Sk for qemu-devel@nongnu.org; Thu, 09 May 2013 04:30:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UaMF7-0003Td-Qu for qemu-devel@nongnu.org; Thu, 09 May 2013 04:30:26 -0400 Received: from mail-wg0-x229.google.com ([2a00:1450:400c:c00::229]:60392) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UaMF7-0003TU-K6 for qemu-devel@nongnu.org; Thu, 09 May 2013 04:30:25 -0400 Received: by mail-wg0-f41.google.com with SMTP id y10so6004330wgg.4 for ; Thu, 09 May 2013 01:30:25 -0700 (PDT) Date: Thu, 9 May 2013 10:30:17 +0200 From: Stefan Hajnoczi Message-ID: <20130509083017.GH1074@stefanha-thinkpad.redhat.com> References: <1368060022-16911-1-git-send-email-qemulist@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1368060022-16911-1-git-send-email-qemulist@gmail.com> 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 , Paolo Bonzini 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. Is there a concrete scenario where this happens? I can think of situations like the ioeventfd being readable before vhost/hostmem is populated. But I don't see how that's related to the priority of kvm_region_add(). Stefan