qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: "qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>
Cc: "xen-devel@lists.xensource.com Devel"
	<xen-devel@lists.xensource.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: [Qemu-devel] [PATCH 09/11] xen: only track the linear framebuffer
Date: Sun, 19 Jun 2011 05:39:48 +0200	[thread overview]
Message-ID: <1308454790-13750-9-git-send-email-agraf@suse.de> (raw)
In-Reply-To: <1308452228-11055-1-git-send-email-agraf@suse.de>

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

Xen can only do dirty bit tracking for one memory region, so we should
explicitly avoid trying to track anything but the vga vram region.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
---
 xen-all.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/xen-all.c b/xen-all.c
index 75a82c2..fe75ddd 100644
--- a/xen-all.c
+++ b/xen-all.c
@@ -215,6 +215,7 @@ static int xen_add_to_physmap(XenIOState *state,
     int rc = 0;
     XenPhysmap *physmap = NULL;
     target_phys_addr_t pfn, start_gpfn;
+    RAMBlock *block;
 
     if (get_physmapping(state, start_addr, size)) {
         return 0;
@@ -223,6 +224,19 @@ static int xen_add_to_physmap(XenIOState *state,
         return -1;
     }
 
+    /* Xen can only handle a single dirty log region for now and we want
+     * the linear framebuffer to be that region.
+     * Avoid tracking any regions that is not videoram and avoid tracking
+     * the legacy vga region. */
+    QLIST_FOREACH(block, &ram_list.blocks, next) {
+        if (!strcmp(block->idstr, "vga.vram") && block->offset == phys_offset
+                && start_addr > 0xbffff) {
+            goto go_physmap;
+        }
+    }
+    return -1;
+
+go_physmap:
     DPRINTF("mapping vram to %llx - %llx, from %llx\n",
             start_addr, start_addr + size, phys_offset);
 
-- 
1.6.0.2

  parent reply	other threads:[~2011-06-20  9:28 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-19  2:57 [Qemu-devel] [PULL] Xen Patch Queue Alexander Graf
2011-06-19  3:39 ` [Qemu-devel] [PATCH 01/11] xen: Add xc_domain_add_to_physmap to xen_interface Alexander Graf
2011-06-19  3:39 ` [Qemu-devel] [PATCH 02/11] xen: Introduce VGA sync dirty bitmap support Alexander Graf
2011-06-19  3:39 ` [Qemu-devel] [PATCH 03/11] xen: fix qemu_map_cache with size != MCACHE_BUCKET_SIZE Alexander Graf
2011-06-19  3:39 ` [Qemu-devel] [PATCH 04/11] xen: remove qemu_map_cache_unlock Alexander Graf
2011-06-19  3:39 ` [Qemu-devel] [PATCH 05/11] xen: remove xen_map_block and xen_unmap_block Alexander Graf
2011-06-19  3:39 ` [Qemu-devel] [PATCH 06/11] exec.c: refactor cpu_physical_memory_map Alexander Graf
2011-06-23 17:08   ` Peter Maydell
2011-06-23 17:56     ` Stefano Stabellini
2011-06-23 18:20       ` Peter Maydell
2011-06-24 11:08         ` Stefano Stabellini
2011-06-19  3:39 ` [Qemu-devel] [PATCH 07/11] xen: mapcache performance improvements Alexander Graf
2011-06-19  3:39 ` [Qemu-devel] [PATCH 08/11] cirrus_vga: reset lfb_addr after a pci config write if the BAR is unmapped Alexander Graf
2011-06-19  3:39 ` Alexander Graf [this message]
2011-06-19  3:39 ` [Qemu-devel] [PATCH 10/11] xen: fix interrupt routing Alexander Graf
2011-06-19  3:39 ` [Qemu-devel] [PATCH 11/11] xen: Add the Xen platform pci device Alexander Graf
2011-06-22 12:57 ` [Qemu-devel] [PULL] Xen Patch Queue Anthony Liguori

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=1308454790-13750-9-git-send-email-agraf@suse.de \
    --to=agraf@suse.de \
    --cc=qemu-devel@nongnu.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --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).