qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: <stefano.stabellini@eu.citrix.com>
To: qemu-devel@nongnu.org
Cc: anthony.perard@citrix.com, xen-devel@lists.xensource.com,
	agraf@suse.de,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: [Qemu-devel] [PATCH] cirrus_vga: reset lfb_addr after a pci config write if the BAR is unmapped
Date: Fri, 3 Jun 2011 16:56:54 +0100	[thread overview]
Message-ID: <1307116614-11775-2-git-send-email-stefano.stabellini@eu.citrix.com> (raw)
In-Reply-To: <1307116614-11775-1-git-send-email-stefano.stabellini@eu.citrix.com>

From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

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.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
---
 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);
 }
 
-- 
1.7.2.3

  reply	other threads:[~2011-06-03 15:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-03 15:56 [Qemu-devel] [PATCH] xen: avoid tracking the region 0xa0000 - 0xbffff stefano.stabellini
2011-06-03 15:56 ` stefano.stabellini [this message]
2011-06-14 13:54   ` [Qemu-devel] [PATCH] cirrus_vga: reset lfb_addr after a pci config write if the BAR is unmapped Alexander Graf
2011-06-14 16:25     ` Jan Kiszka
     [not found] ` <D4463EE3-B9CE-45ED-9371-F2D3E3507898@suse.de>
2011-06-14 11:04   ` [Qemu-devel] [PATCH] xen: avoid tracking the region 0xa0000 - 0xbffff Jan Kiszka
2011-06-14 11:50     ` Stefano Stabellini
2011-06-14 11:59       ` Jan Kiszka
2011-06-14 16:47     ` [Qemu-devel] [Xen-devel] " Avi Kivity
2011-06-14 11:48   ` [Qemu-devel] " Stefano Stabellini
2011-06-14 11:52     ` Alexander Graf
2011-06-14 15:24       ` Stefano Stabellini
2011-06-14 15:24         ` Alexander Graf
2011-06-15  8:09         ` Alexander Graf
2011-06-15 16:27           ` Stefano Stabellini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1307116614-11775-2-git-send-email-stefano.stabellini@eu.citrix.com \
    --to=stefano.stabellini@eu.citrix.com \
    --cc=agraf@suse.de \
    --cc=anthony.perard@citrix.com \
    --cc=qemu-devel@nongnu.org \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).