From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:42046) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWU4p-0006sL-BY for qemu-devel@nongnu.org; Tue, 14 Jun 2011 09:54:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QWU4n-0002py-MA for qemu-devel@nongnu.org; Tue, 14 Jun 2011 09:54:43 -0400 Received: from cantor2.suse.de ([195.135.220.15]:40569 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWU4n-0002pq-7c for qemu-devel@nongnu.org; Tue, 14 Jun 2011 09:54:41 -0400 Message-ID: <4DF7681F.6020104@suse.de> Date: Tue, 14 Jun 2011 15:54:39 +0200 From: Alexander Graf MIME-Version: 1.0 References: <1307116614-11775-1-git-send-email-stefano.stabellini@eu.citrix.com> <1307116614-11775-2-git-send-email-stefano.stabellini@eu.citrix.com> In-Reply-To: <1307116614-11775-2-git-send-email-stefano.stabellini@eu.citrix.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] cirrus_vga: reset lfb_addr after a pci config write if the BAR is unmapped List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: stefano.stabellini@eu.citrix.com Cc: anthony.perard@citrix.com, xen-devel@lists.xensource.com, qemu-devel@nongnu.org On 06/03/2011 05:56 PM, stefano.stabellini@eu.citrix.com wrote: > From: Stefano Stabellini > > If the cirrus_vga PCI BAR is unmapped than we should not only reset > map_addr but also lfb_addr, otherwise we'll keep trying to map > the old lfb_addr in map_linear_vram. The patch looks good to me, but I'd love to get an ack from someone who knows the cirrus code before committing it. Alex > Signed-off-by: Stefano Stabellini > --- > hw/cirrus_vga.c | 5 ++++- > 1 files changed, 4 insertions(+), 1 deletions(-) > > diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c > index 722cac7..3c5043e 100644 > --- a/hw/cirrus_vga.c > +++ b/hw/cirrus_vga.c > @@ -3088,8 +3088,11 @@ static void pci_cirrus_write_config(PCIDevice *d, > CirrusVGAState *s =&pvs->cirrus_vga; > > pci_default_write_config(d, address, val, len); > - if (s->vga.map_addr&& d->io_regions[0].addr == PCI_BAR_UNMAPPED) > + if (s->vga.map_addr&& d->io_regions[0].addr == PCI_BAR_UNMAPPED) { > s->vga.map_addr = 0; > + s->vga.lfb_addr = 0; > + s->vga.lfb_end = 0; > + } > cirrus_update_memory_access(s); > } >