From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:43493) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGRkx-0008ML-1N for qemu-devel@nongnu.org; Wed, 19 Oct 2011 04:44:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RGRkv-0007RL-Lp for qemu-devel@nongnu.org; Wed, 19 Oct 2011 04:44:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:17439) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGRWY-00046I-IC for qemu-devel@nongnu.org; Wed, 19 Oct 2011 04:29:18 -0400 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 p9J8TGtb015599 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 19 Oct 2011 04:29:16 -0400 Message-ID: <4E9E8A49.9010508@redhat.com> Date: Wed, 19 Oct 2011 10:28:57 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <1318951567-12418-1-git-send-email-alevy@redhat.com> In-Reply-To: <1318951567-12418-1-git-send-email-alevy@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/2] qxl: create slots on post_load in any state List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alon Levy Cc: yhalperi@redhat.com, qemu-devel@nongnu.org On 10/18/11 17:26, Alon Levy wrote: > If we migrate when the device is not in a native state the guest > still believes the slots are created, and will cause operations > that reference the slots, causing a "panic: virtual address out of range" > on the first of them. Easy to see by migrating in vga mode (with > a driver loaded, for instance windows cmd window in full screen mode) > and then exiting vga mode back to native mode will cause said panic. > > Fixed by doing the slot recreation unconditionally at post_load, and > using the delta value. Next patch makes sure we actually migrate that > delta. I don't think we have to save the delta value. The delta is used only in compat mode. In compat mode the guest doesn't create memory slots, instead qxl does that (in qxl_set_mode). I think you can just skip the slot re-creation in compat mode and let qxl_set_mode (which is called later in post_load) handle it. cheers, Gerd