From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:51484) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tj7Y7-0002hG-As for qemu-devel@nongnu.org; Thu, 13 Dec 2012 07:06:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tj7Y0-0007RL-9O for qemu-devel@nongnu.org; Thu, 13 Dec 2012 07:05:59 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37596) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tj7Y0-0007R2-1E for qemu-devel@nongnu.org; Thu, 13 Dec 2012 07:05:52 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qBDC5ouo011468 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 13 Dec 2012 07:05:51 -0500 Message-ID: <50C9C49C.10400@redhat.com> Date: Thu, 13 Dec 2012 13:05:48 +0100 From: Gerd Hoffmann MIME-Version: 1.0 References: <50C86E8B.5020705@redhat.com> <1355398603-22186-1-git-send-email-alevy@redhat.com> <1355398603-22186-2-git-send-email-alevy@redhat.com> In-Reply-To: <1355398603-22186-2-git-send-email-alevy@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/2] qxl: change rom so that 4096 < size < 8192 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alon Levy Cc: qemu-devel@nongnu.org On 12/13/12 12:36, Alon Levy wrote: > This is a simpler solution to 869981, where migration breaks since qxl's > rom bar size has changed. Instead of ignoring fields in QXLRom, which is what has > actually changed, we remove some of the modes, a mechanism already > accounted for by the guest. To reach exactly two pages and not one, we > remove two out of four orientations, the remaining are normal and right > turn (chosen arbitrarily). Leaving only normal would result in a single > page which would also break migration. > > Added assertions to ensure changes in spice-protocol in the future > causing increase or decrease of page size will result in failure at > startup (could do this compile time also but not sure how). The assertions are not in the patch. > #define QXL_MODE_EX(x_res, y_res) \ > QXL_MODE_16_32(x_res, y_res, 0), \ > - QXL_MODE_16_32(y_res, x_res, 1), \ > - QXL_MODE_16_32(x_res, y_res, 2), \ > - QXL_MODE_16_32(y_res, x_res, 3) > + QXL_MODE_16_32(x_res, y_res, 1) Why do you leave orientation = 1 in? Just to keep the size above 4K? Shouldn't we just hardcode the rom size to 8k instead? Then assert that everything fits into 8k? Or even better add a compile time check? While being at it it might be a good idea to move the mode table to a fixed, large enougth offset (say 0x4096), so it doesn't move around again in case we extend QXLRom one more time. cheers, Gerd