From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45420) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W8wHI-0001d9-CF for qemu-devel@nongnu.org; Thu, 30 Jan 2014 13:24:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W8wHA-0005vb-MI for qemu-devel@nongnu.org; Thu, 30 Jan 2014 13:23:52 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53790) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W8wHA-0005vH-FO for qemu-devel@nongnu.org; Thu, 30 Jan 2014 13:23:44 -0500 Date: Thu, 30 Jan 2014 18:23:36 +0000 From: "Dr. David Alan Gilbert" Message-ID: <20140130182336.GH2655@work-vm> References: <1391105318-23247-1-git-send-email-owasserm@redhat.com> <1391105318-23247-5-git-send-email-owasserm@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1391105318-23247-5-git-send-email-owasserm@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2 4/6] XBZRLE cache size should not be larger than guest memory size List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Orit Wasserman Cc: peter.maydell@linaro.org, qemu-devel@nongnu.org, anthony@codemonkey.ws, quintela@redhat.com * Orit Wasserman (owasserm@redhat.com) wrote: > Signed-off-by: Orit Wasserman > --- > migration.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/migration.c b/migration.c > index 46a7305..25add6f 100644 > --- a/migration.c > +++ b/migration.c > @@ -479,6 +479,13 @@ void qmp_migrate_set_cache_size(int64_t value, Error **errp) > return; > } > > + /* Cache should not be larger than guest ram size */ Why? (It's admittedly odd, but does it actually break something if it's larger?) Dave > + if (value > ram_bytes_total()) { > + error_set(errp, QERR_INVALID_PARAMETER_VALUE, "cache size", > + "exceeds guest ram size "); > + return; > + } > + > new_size = xbzrle_cache_resize(value); > if (new_size < 0) { > error_set(errp, QERR_INVALID_PARAMETER_VALUE, "cache size", > -- > 1.8.3.1 > -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK