From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:40398) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQEXa-0001MZ-DB for qemu-devel@nongnu.org; Thu, 11 Apr 2013 06:15:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UQEXS-0006hr-RY for qemu-devel@nongnu.org; Thu, 11 Apr 2013 06:15:38 -0400 Received: from mail-ea0-x235.google.com ([2a00:1450:4013:c01::235]:55214) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQEXS-0006hl-Kh for qemu-devel@nongnu.org; Thu, 11 Apr 2013 06:15:30 -0400 Received: by mail-ea0-f181.google.com with SMTP id z10so640322ead.26 for ; Thu, 11 Apr 2013 03:15:30 -0700 (PDT) Date: Thu, 11 Apr 2013 12:15:27 +0200 From: Stefan Hajnoczi Message-ID: <20130411101527.GD9165@stefanha-thinkpad.redhat.com> References: <1364804434-7980-1-git-send-email-qemulist@gmail.com> <1364804434-7980-4-git-send-email-qemulist@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1364804434-7980-4-git-send-email-qemulist@gmail.com> Subject: Re: [Qemu-devel] [PATCH 3/5] vring: use hostmem's RAM safe api List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Liu Ping Fan Cc: Peter Maydell , Anthony Liguori , Jan Kiszka , Marcelo Tosatti , qemu-devel@nongnu.org, Vasilis Liaskovitis , Paolo Bonzini On Mon, Apr 01, 2013 at 04:20:32PM +0800, Liu Ping Fan wrote: > @@ -51,7 +50,7 @@ bool vring_setup(Vring *vring, VirtIODevice *vdev, int n) > > void vring_teardown(Vring *vring) > { > - hostmem_finalize(&vring->hostmem); > + memory_region_unref(vring->vring_mr); > } dataplane keeps a reference to the vring. This prevents memory hot unplug while the device is up. If this is a problem we'll have to reduce the lifespan of the vring mapping. Stefan