aboutsummaryrefslogtreecommitdiff
path: root/xen-all.c
diff options
context:
space:
mode:
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>2011-06-15 17:29:27 +0100
committerAlexander Graf <agraf@suse.de>2011-06-19 04:42:41 +0200
commitebed85058b6e89a5202112e9aa2abab3aa3804c3 (patch)
treed0fcee4bd83b968ddc79daf045921c87bca5af03 /xen-all.c
parent45dcd36e1ebbb3c085bdd157bffaf9276ffd8c46 (diff)
downloadqemu-ebed85058b6e89a5202112e9aa2abab3aa3804c3.zip
qemu-ebed85058b6e89a5202112e9aa2abab3aa3804c3.tar.gz
qemu-ebed85058b6e89a5202112e9aa2abab3aa3804c3.tar.bz2
xen: only track the linear framebuffer
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>
Diffstat (limited to 'xen-all.c')
-rw-r--r--xen-all.c14
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);