From patchwork Thu Dec 13 11:36:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alon Levy X-Patchwork-Id: 205809 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 840892C0098 for ; Thu, 13 Dec 2012 22:37:03 +1100 (EST) Received: from localhost ([::1]:50812 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tj765-0007GL-D4 for incoming@patchwork.ozlabs.org; Thu, 13 Dec 2012 06:37:01 -0500 Received: from eggs.gnu.org ([208.118.235.92]:43884) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tj75u-0007GA-3n for qemu-devel@nongnu.org; Thu, 13 Dec 2012 06:36:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tj75t-0008DM-0c for qemu-devel@nongnu.org; Thu, 13 Dec 2012 06:36:50 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40079) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tj75s-0008DF-Oh for qemu-devel@nongnu.org; Thu, 13 Dec 2012 06:36:48 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qBDBamH6011057 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 13 Dec 2012 06:36:48 -0500 Received: from garlic.redhat.com (vpn1-6-45.ams2.redhat.com [10.36.6.45]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id qBDBaidZ004953; Thu, 13 Dec 2012 06:36:47 -0500 From: Alon Levy To: qemu-devel@nongnu.org Date: Thu, 13 Dec 2012 13:36:43 +0200 Message-Id: <1355398603-22186-2-git-send-email-alevy@redhat.com> In-Reply-To: <1355398603-22186-1-git-send-email-alevy@redhat.com> References: <50C86E8B.5020705@redhat.com> <1355398603-22186-1-git-send-email-alevy@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: kraxel@redhat.com Subject: [Qemu-devel] [PATCH 2/2] qxl: change rom so that 4096 < size < 8192 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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). Signed-off-by: Alon Levy --- hw/qxl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/qxl.c b/hw/qxl.c index 8611ee9..99b354a 100644 --- a/hw/qxl.c +++ b/hw/qxl.c @@ -88,9 +88,7 @@ #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) static QXLMode qxl_modes[] = { QXL_MODE_EX(640, 480),