qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 00/13] vga: dirty log cleanup, more linear mapping
@ 2011-06-14 16:53 Jan Kiszka
  2011-06-14 16:53 ` [Qemu-devel] [PATCH 01/13] spice: Use cpu_register_physical_memory_log for dirty log enabling Jan Kiszka
                   ` (13 more replies)
  0 siblings, 14 replies; 28+ messages in thread
From: Jan Kiszka @ 2011-06-14 16:53 UTC (permalink / raw)
  To: Anthony Liguori, qemu-devel
  Cc: Anthony PERARD, Andrzej Zaborowski, Michael S. Tsirkin,
	Avi Kivity, Gerd Hoffmann

A few optimizations and cleanups I came across when trying to speed up
slow graphical grub unter non-cirrus vga. This series
 - eliminates log_start/stop CPUPhysMemoryClient callbacks
 - accelerates chain 4 vga mode under KVM
 - fixes reset of vmware-vga
 - cleans up vmware-vga a bit

At least patch 8 is a candiate for 0.15 and stable.

CC: Andrzej Zaborowski <balrog@zabor.org>
CC: Anthony PERARD <anthony.perard@citrix.com>
CC: Avi Kivity <avi@redhat.com>
CC: Gerd Hoffmann <kraxel@redhat.com>
CC: Michael S. Tsirkin <mst@redhat.com>

Jan Kiszka (13):
  spice: Use cpu_register_physical_memory_log for dirty log enabling
  vga-pci: Use cpu_register_physical_memory_log for dirty log enabling
  cirrus-vga: Drop redundant vga_dirty_log_start
  vmware-vga: Disable verbose mode
  vmware-vga: Remove dead DIRECT_VRAM mode
  vmware-vga: Eliminate vga_dirty_log_restart
  vmware_vga: Do not enable dirty logging when in SVGA mode
  vmware-vga: Register reset service
  vmware-vga: Use cpu_register_physical_memory_log for dirty log
    enabling
  Drop dirty log start/stop infrastructure
  vga: Refactor lfb_vram_mapped to vga_mem_mapped
  vga: Move vga_sync_dirty_bitmap
  vga: Use linear mapping + dirty logging in chain 4 memory access mode

 cpu-all.h       |    6 --
 cpu-common.h    |    4 -
 exec.c          |   30 ---------
 hw/cirrus_vga.c |   15 ++---
 hw/qxl.c        |    9 +--
 hw/vga-pci.c    |    4 +-
 hw/vga.c        |  153 ++++++++++++++++++++++++-------------------
 hw/vga_int.h    |    8 +--
 hw/vhost.c      |    2 -
 hw/vmware_vga.c |  195 +++++++++++++-----------------------------------------
 kvm-all.c       |   47 -------------
 11 files changed, 147 insertions(+), 326 deletions(-)

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [Qemu-devel] [PATCH 01/13] spice: Use cpu_register_physical_memory_log for dirty log enabling
  2011-06-14 16:53 [Qemu-devel] [PATCH 00/13] vga: dirty log cleanup, more linear mapping Jan Kiszka
@ 2011-06-14 16:53 ` Jan Kiszka
  2011-06-15  6:42   ` Gerd Hoffmann
  2011-06-14 16:53 ` [Qemu-devel] [PATCH 02/13] vga-pci: " Jan Kiszka
                   ` (12 subsequent siblings)
  13 siblings, 1 reply; 28+ messages in thread
From: Jan Kiszka @ 2011-06-14 16:53 UTC (permalink / raw)
  To: Anthony Liguori, qemu-devel; +Cc: Gerd Hoffmann

Drop outdated dirty log disable/enable around PCI remapping and register
the BAR for dirty logging via cpu_register_physical_memory_log. That
allows to remove all vga_dirty_log_start/stop references from qxl.

Note: The addtional vga_dirty_log_start for the primary interface looked
stray. qxl_write_config enabled logging for all interfaces anyway.

CC: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 hw/qxl.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/hw/qxl.c b/hw/qxl.c
index 1906e84..eba1ff9 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -619,12 +619,10 @@ static void qxl_write_config(PCIDevice *d, uint32_t address,
     PCIQXLDevice *qxl = DO_UPCAST(PCIQXLDevice, pci, d);
     VGACommonState *vga = &qxl->vga;
 
-    vga_dirty_log_stop(vga);
     pci_default_write_config(d, address, val, len);
     if (vga->map_addr && qxl->pci.io_regions[0].addr == -1) {
         vga->map_addr = 0;
     }
-    vga_dirty_log_start(vga);
 }
 
 static void qxl_check_state(PCIQXLDevice *d)
@@ -1037,12 +1035,11 @@ static void qxl_map(PCIDevice *pci, int region_num,
         qxl->io_base = addr;
         break;
     case QXL_RAM_RANGE_INDEX:
-        cpu_register_physical_memory(addr, size, qxl->vga.vram_offset | IO_MEM_RAM);
+        cpu_register_physical_memory_log(addr, size,
+                                         qxl->vga.vram_offset | IO_MEM_RAM,
+                                         0, true);
         qxl->vga.map_addr = addr;
         qxl->vga.map_end = addr + size;
-        if (qxl->id == 0) {
-            vga_dirty_log_start(&qxl->vga);
-        }
         break;
     case QXL_ROM_RANGE_INDEX:
         cpu_register_physical_memory(addr, size, qxl->rom_offset | IO_MEM_ROM);
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [Qemu-devel] [PATCH 02/13] vga-pci: Use cpu_register_physical_memory_log for dirty log enabling
  2011-06-14 16:53 [Qemu-devel] [PATCH 00/13] vga: dirty log cleanup, more linear mapping Jan Kiszka
  2011-06-14 16:53 ` [Qemu-devel] [PATCH 01/13] spice: Use cpu_register_physical_memory_log for dirty log enabling Jan Kiszka
@ 2011-06-14 16:53 ` Jan Kiszka
  2011-06-14 16:53 ` [Qemu-devel] [PATCH 03/13] cirrus-vga: Drop redundant vga_dirty_log_start Jan Kiszka
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 28+ messages in thread
From: Jan Kiszka @ 2011-06-14 16:53 UTC (permalink / raw)
  To: Anthony Liguori, qemu-devel

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 hw/vga-pci.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/vga-pci.c b/hw/vga-pci.c
index ce9ec45..d7d904a 100644
--- a/hw/vga-pci.c
+++ b/hw/vga-pci.c
@@ -53,10 +53,10 @@ static void vga_map(PCIDevice *pci_dev, int region_num,
     PCIVGAState *d = (PCIVGAState *)pci_dev;
     VGACommonState *s = &d->vga;
 
-    cpu_register_physical_memory(addr, s->vram_size, s->vram_offset);
+    cpu_register_physical_memory_log(addr, s->vram_size, s->vram_offset, 0,
+                                     true);
     s->map_addr = addr;
     s->map_end = addr + s->vram_size;
-    vga_dirty_log_start(s);
 }
 
 static void pci_vga_write_config(PCIDevice *d,
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [Qemu-devel] [PATCH 03/13] cirrus-vga: Drop redundant vga_dirty_log_start
  2011-06-14 16:53 [Qemu-devel] [PATCH 00/13] vga: dirty log cleanup, more linear mapping Jan Kiszka
  2011-06-14 16:53 ` [Qemu-devel] [PATCH 01/13] spice: Use cpu_register_physical_memory_log for dirty log enabling Jan Kiszka
  2011-06-14 16:53 ` [Qemu-devel] [PATCH 02/13] vga-pci: " Jan Kiszka
@ 2011-06-14 16:53 ` Jan Kiszka
  2011-06-14 16:53 ` [Qemu-devel] [PATCH 04/13] vmware-vga: Disable verbose mode Jan Kiszka
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 28+ messages in thread
From: Jan Kiszka @ 2011-06-14 16:53 UTC (permalink / raw)
  To: Anthony Liguori, qemu-devel

map_linear_vram requests logging via cpu_register_physical_memory_log
now, and cirrus_pci_lfb_map does not leave anything to log behind.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 hw/cirrus_vga.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c
index 722cac7..98a9b8e 100644
--- a/hw/cirrus_vga.c
+++ b/hw/cirrus_vga.c
@@ -2519,8 +2519,6 @@ static void map_linear_vram(CirrusVGAState *s)
         cpu_register_physical_memory(isa_mem_base + 0xa0000, 0x20000,
                                      s->vga.vga_io_memory);
     }
-
-    vga_dirty_log_start(&s->vga);
 }
 
 static void unmap_linear_vram(CirrusVGAState *s)
@@ -3077,8 +3075,6 @@ static void cirrus_pci_lfb_map(PCIDevice *d, int region_num,
     /* account for overflow */
     if (s->vga.lfb_end < addr + VGA_RAM_SIZE)
         s->vga.lfb_end = addr + VGA_RAM_SIZE;
-
-    vga_dirty_log_start(&s->vga);
 }
 
 static void pci_cirrus_write_config(PCIDevice *d,
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [Qemu-devel] [PATCH 04/13] vmware-vga: Disable verbose mode
  2011-06-14 16:53 [Qemu-devel] [PATCH 00/13] vga: dirty log cleanup, more linear mapping Jan Kiszka
                   ` (2 preceding siblings ...)
  2011-06-14 16:53 ` [Qemu-devel] [PATCH 03/13] cirrus-vga: Drop redundant vga_dirty_log_start Jan Kiszka
@ 2011-06-14 16:53 ` Jan Kiszka
  2011-06-14 16:53 ` [Qemu-devel] [PATCH 05/13] vmware-vga: Remove dead DIRECT_VRAM mode Jan Kiszka
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 28+ messages in thread
From: Jan Kiszka @ 2011-06-14 16:53 UTC (permalink / raw)
  To: Anthony Liguori, qemu-devel; +Cc: Andrzej Zaborowski

Elimiates 'vmsvga_value_write: guest runs Linux.' messages from the
console.

CC: Andrzej Zaborowski <balrog@zabor.org>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 hw/vmware_vga.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/vmware_vga.c b/hw/vmware_vga.c
index 4656767..76fe015 100644
--- a/hw/vmware_vga.c
+++ b/hw/vmware_vga.c
@@ -27,7 +27,7 @@
 #include "pci.h"
 #include "vmware_vga.h"
 
-#define VERBOSE
+#undef VERBOSE
 #undef DIRECT_VRAM
 #define HW_RECT_ACCEL
 #define HW_FILL_ACCEL
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [Qemu-devel] [PATCH 05/13] vmware-vga: Remove dead DIRECT_VRAM mode
  2011-06-14 16:53 [Qemu-devel] [PATCH 00/13] vga: dirty log cleanup, more linear mapping Jan Kiszka
                   ` (3 preceding siblings ...)
  2011-06-14 16:53 ` [Qemu-devel] [PATCH 04/13] vmware-vga: Disable verbose mode Jan Kiszka
@ 2011-06-14 16:53 ` Jan Kiszka
  2011-06-14 16:53 ` [Qemu-devel] [PATCH 06/13] vmware-vga: Eliminate vga_dirty_log_restart Jan Kiszka
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 28+ messages in thread
From: Jan Kiszka @ 2011-06-14 16:53 UTC (permalink / raw)
  To: Anthony Liguori, qemu-devel; +Cc: Andrzej Zaborowski

The code was disabled since day 1 of vmware-vga, and now it does not
even build anymore. Time for a cleanup.

CC: Andrzej Zaborowski <balrog@zabor.org>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 hw/vmware_vga.c |  168 ++++++++++--------------------------------------------
 1 files changed, 31 insertions(+), 137 deletions(-)

diff --git a/hw/vmware_vga.c b/hw/vmware_vga.c
index 76fe015..1dfa875 100644
--- a/hw/vmware_vga.c
+++ b/hw/vmware_vga.c
@@ -28,7 +28,6 @@
 #include "vmware_vga.h"
 
 #undef VERBOSE
-#undef DIRECT_VRAM
 #define HW_RECT_ACCEL
 #define HW_FILL_ACCEL
 #define HW_MOUSE_ACCEL
@@ -294,7 +293,6 @@ enum {
 static inline void vmsvga_update_rect(struct vmsvga_state_s *s,
                 int x, int y, int w, int h)
 {
-#ifndef DIRECT_VRAM
     int line;
     int bypl;
     int width;
@@ -325,23 +323,17 @@ static inline void vmsvga_update_rect(struct vmsvga_state_s *s,
 
     for (; line > 0; line --, src += bypl, dst += bypl)
         memcpy(dst, src, width);
-#endif
 
     dpy_update(s->vga.ds, x, y, w, h);
 }
 
 static inline void vmsvga_update_screen(struct vmsvga_state_s *s)
 {
-#ifndef DIRECT_VRAM
-    memcpy(ds_get_data(s->vga.ds), s->vga.vram_ptr, s->bypp * s->width * s->height);
-#endif
-
+    memcpy(ds_get_data(s->vga.ds), s->vga.vram_ptr,
+           s->bypp * s->width * s->height);
     dpy_update(s->vga.ds, 0, 0, s->width, s->height);
 }
 
-#ifdef DIRECT_VRAM
-# define vmsvga_update_rect_delayed	vmsvga_update_rect
-#else
 static inline void vmsvga_update_rect_delayed(struct vmsvga_state_s *s,
                 int x, int y, int w, int h)
 {
@@ -352,7 +344,6 @@ static inline void vmsvga_update_rect_delayed(struct vmsvga_state_s *s,
     rect->w = w;
     rect->h = h;
 }
-#endif
 
 static inline void vmsvga_update_rect_flush(struct vmsvga_state_s *s)
 {
@@ -374,32 +365,23 @@ static inline void vmsvga_update_rect_flush(struct vmsvga_state_s *s)
 static inline void vmsvga_copy_rect(struct vmsvga_state_s *s,
                 int x0, int y0, int x1, int y1, int w, int h)
 {
-# ifdef DIRECT_VRAM
-    uint8_t *vram = ds_get_data(s->ds);
-# else
     uint8_t *vram = s->vga.vram_ptr;
-# endif
     int bypl = s->bypp * s->width;
     int width = s->bypp * w;
     int line = h;
     uint8_t *ptr[2];
 
-# ifdef DIRECT_VRAM
-    if (s->ds->dpy_copy)
-        qemu_console_copy(s->ds, x0, y0, x1, y1, w, h);
-    else
-# endif
-    {
-        if (y1 > y0) {
-            ptr[0] = vram + s->bypp * x0 + bypl * (y0 + h - 1);
-            ptr[1] = vram + s->bypp * x1 + bypl * (y1 + h - 1);
-            for (; line > 0; line --, ptr[0] -= bypl, ptr[1] -= bypl)
-                memmove(ptr[1], ptr[0], width);
-        } else {
-            ptr[0] = vram + s->bypp * x0 + bypl * y0;
-            ptr[1] = vram + s->bypp * x1 + bypl * y1;
-            for (; line > 0; line --, ptr[0] += bypl, ptr[1] += bypl)
-                memmove(ptr[1], ptr[0], width);
+    if (y1 > y0) {
+        ptr[0] = vram + s->bypp * x0 + bypl * (y0 + h - 1);
+        ptr[1] = vram + s->bypp * x1 + bypl * (y1 + h - 1);
+        for (; line > 0; line --, ptr[0] -= bypl, ptr[1] -= bypl) {
+            memmove(ptr[1], ptr[0], width);
+        }
+    } else {
+        ptr[0] = vram + s->bypp * x0 + bypl * y0;
+        ptr[1] = vram + s->bypp * x1 + bypl * y1;
+        for (; line > 0; line --, ptr[0] += bypl, ptr[1] += bypl) {
+            memmove(ptr[1], ptr[0], width);
         }
     }
 
@@ -411,11 +393,7 @@ static inline void vmsvga_copy_rect(struct vmsvga_state_s *s,
 static inline void vmsvga_fill_rect(struct vmsvga_state_s *s,
                 uint32_t c, int x, int y, int w, int h)
 {
-# ifdef DIRECT_VRAM
-    uint8_t *vram = ds_get_data(s->ds);
-# else
     uint8_t *vram = s->vga.vram_ptr;
-# endif
     int bypp = s->bypp;
     int bypl = bypp * s->width;
     int width = bypp * w;
@@ -426,31 +404,25 @@ static inline void vmsvga_fill_rect(struct vmsvga_state_s *s,
     uint8_t *src;
     uint8_t col[4];
 
-# ifdef DIRECT_VRAM
-    if (s->ds->dpy_fill)
-        s->ds->dpy_fill(s->ds, x, y, w, h, c);
-    else
-# endif
-    {
-        col[0] = c;
-        col[1] = c >> 8;
-        col[2] = c >> 16;
-        col[3] = c >> 24;
-
-        if (line --) {
-            dst = fst;
-            src = col;
-            for (column = width; column > 0; column --) {
-                *(dst ++) = *(src ++);
-                if (src - col == bypp)
-                    src = col;
-            }
-            dst = fst;
-            for (; line > 0; line --) {
-                dst += bypl;
-                memcpy(dst, fst, width);
+    col[0] = c;
+    col[1] = c >> 8;
+    col[2] = c >> 16;
+    col[3] = c >> 24;
+
+    if (line--) {
+        dst = fst;
+        src = col;
+        for (column = width; column > 0; column--) {
+            *(dst++) = *(src++);
+            if (src - col == bypp) {
+                src = col;
             }
         }
+        dst = fst;
+        for (; line > 0; line--) {
+            dst += bypl;
+            memcpy(dst, fst, width);
+        }
     }
 
     vmsvga_update_rect_delayed(s, x, y, w, h);
@@ -1076,77 +1048,6 @@ static void vmsvga_text_update(void *opaque, console_ch_t *chardata)
         s->vga.text_update(&s->vga, chardata);
 }
 
-#ifdef DIRECT_VRAM
-static uint32_t vmsvga_vram_readb(void *opaque, target_phys_addr_t addr)
-{
-    struct vmsvga_state_s *s = opaque;
-    if (addr < s->fb_size)
-        return *(uint8_t *) (ds_get_data(s->ds) + addr);
-    else
-        return *(uint8_t *) (s->vram_ptr + addr);
-}
-
-static uint32_t vmsvga_vram_readw(void *opaque, target_phys_addr_t addr)
-{
-    struct vmsvga_state_s *s = opaque;
-    if (addr < s->fb_size)
-        return *(uint16_t *) (ds_get_data(s->ds) + addr);
-    else
-        return *(uint16_t *) (s->vram_ptr + addr);
-}
-
-static uint32_t vmsvga_vram_readl(void *opaque, target_phys_addr_t addr)
-{
-    struct vmsvga_state_s *s = opaque;
-    if (addr < s->fb_size)
-        return *(uint32_t *) (ds_get_data(s->ds) + addr);
-    else
-        return *(uint32_t *) (s->vram_ptr + addr);
-}
-
-static void vmsvga_vram_writeb(void *opaque, target_phys_addr_t addr,
-                uint32_t value)
-{
-    struct vmsvga_state_s *s = opaque;
-    if (addr < s->fb_size)
-        *(uint8_t *) (ds_get_data(s->ds) + addr) = value;
-    else
-        *(uint8_t *) (s->vram_ptr + addr) = value;
-}
-
-static void vmsvga_vram_writew(void *opaque, target_phys_addr_t addr,
-                uint32_t value)
-{
-    struct vmsvga_state_s *s = opaque;
-    if (addr < s->fb_size)
-        *(uint16_t *) (ds_get_data(s->ds) + addr) = value;
-    else
-        *(uint16_t *) (s->vram_ptr + addr) = value;
-}
-
-static void vmsvga_vram_writel(void *opaque, target_phys_addr_t addr,
-                uint32_t value)
-{
-    struct vmsvga_state_s *s = opaque;
-    if (addr < s->fb_size)
-        *(uint32_t *) (ds_get_data(s->ds) + addr) = value;
-    else
-        *(uint32_t *) (s->vram_ptr + addr) = value;
-}
-
-static CPUReadMemoryFunc * const vmsvga_vram_read[] = {
-    vmsvga_vram_readb,
-    vmsvga_vram_readw,
-    vmsvga_vram_readl,
-};
-
-static CPUWriteMemoryFunc * const vmsvga_vram_write[] = {
-    vmsvga_vram_writeb,
-    vmsvga_vram_writew,
-    vmsvga_vram_writel,
-};
-#endif
-
 static int vmsvga_post_load(void *opaque, int version_id)
 {
     struct vmsvga_state_s *s = opaque;
@@ -1245,17 +1146,10 @@ static void pci_vmsvga_map_mem(PCIDevice *pci_dev, int region_num,
 {
     struct pci_vmsvga_state_s *d = (struct pci_vmsvga_state_s *) pci_dev;
     struct vmsvga_state_s *s = &d->chip;
-    ram_addr_t iomemtype;
 
     s->vram_base = addr;
-#ifdef DIRECT_VRAM
-    iomemtype = cpu_register_io_memory(vmsvga_vram_read,
-                    vmsvga_vram_write, s, DEVICE_NATIVE_ENDIAN);
-#else
-    iomemtype = s->vga.vram_offset | IO_MEM_RAM;
-#endif
     cpu_register_physical_memory(s->vram_base, s->vga.vram_size,
-                    iomemtype);
+                                 s->vga.vram_offset | IO_MEM_RAM);
 
     s->vga.map_addr = addr;
     s->vga.map_end = addr + s->vga.vram_size;
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [Qemu-devel] [PATCH 06/13] vmware-vga: Eliminate vga_dirty_log_restart
  2011-06-14 16:53 [Qemu-devel] [PATCH 00/13] vga: dirty log cleanup, more linear mapping Jan Kiszka
                   ` (4 preceding siblings ...)
  2011-06-14 16:53 ` [Qemu-devel] [PATCH 05/13] vmware-vga: Remove dead DIRECT_VRAM mode Jan Kiszka
@ 2011-06-14 16:53 ` Jan Kiszka
  2011-06-15 23:48   ` andrzej zaborowski
  2011-06-14 16:53 ` [Qemu-devel] [PATCH 07/13] vmware_vga: Do not enable dirty logging when in SVGA mode Jan Kiszka
                   ` (7 subsequent siblings)
  13 siblings, 1 reply; 28+ messages in thread
From: Jan Kiszka @ 2011-06-14 16:53 UTC (permalink / raw)
  To: Anthony Liguori, qemu-devel; +Cc: Andrzej Zaborowski

Convert the last user of vga_dirty_log_restart to
cpu_register_physical_memory_log and drop the service.

CC: Andrzej Zaborowski <balrog@zabor.org>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 hw/vga.c        |    6 ------
 hw/vga_int.h    |    1 -
 hw/vmware_vga.c |    5 ++---
 3 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/hw/vga.c b/hw/vga.c
index 124295a..814d0d3 100644
--- a/hw/vga.c
+++ b/hw/vga.c
@@ -1606,12 +1606,6 @@ void vga_dirty_log_stop(VGACommonState *s)
 #endif
 }
 
-void vga_dirty_log_restart(VGACommonState *s)
-{
-    vga_dirty_log_stop(s);
-    vga_dirty_log_start(s);
-}
-
 /*
  * graphic modes
  */
diff --git a/hw/vga_int.h b/hw/vga_int.h
index d2811bd..5cd9a6e 100644
--- a/hw/vga_int.h
+++ b/hw/vga_int.h
@@ -196,7 +196,6 @@ void vga_common_reset(VGACommonState *s);
 
 void vga_dirty_log_start(VGACommonState *s);
 void vga_dirty_log_stop(VGACommonState *s);
-void vga_dirty_log_restart(VGACommonState *s);
 
 extern const VMStateDescription vmstate_vga_common;
 uint32_t vga_ioport_read(void *opaque, uint32_t addr);
diff --git a/hw/vmware_vga.c b/hw/vmware_vga.c
index 1dfa875..82e2a1c 100644
--- a/hw/vmware_vga.c
+++ b/hw/vmware_vga.c
@@ -1148,12 +1148,11 @@ static void pci_vmsvga_map_mem(PCIDevice *pci_dev, int region_num,
     struct vmsvga_state_s *s = &d->chip;
 
     s->vram_base = addr;
-    cpu_register_physical_memory(s->vram_base, s->vga.vram_size,
-                                 s->vga.vram_offset | IO_MEM_RAM);
+    cpu_register_physical_memory_log(s->vram_base, s->vga.vram_size,
+                                     s->vga.vram_offset | IO_MEM_RAM, 0, true);
 
     s->vga.map_addr = addr;
     s->vga.map_end = addr + s->vga.vram_size;
-    vga_dirty_log_restart(&s->vga);
 }
 
 static void pci_vmsvga_map_fifo(PCIDevice *pci_dev, int region_num,
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [Qemu-devel] [PATCH 07/13] vmware_vga: Do not enable dirty logging when in SVGA mode
  2011-06-14 16:53 [Qemu-devel] [PATCH 00/13] vga: dirty log cleanup, more linear mapping Jan Kiszka
                   ` (5 preceding siblings ...)
  2011-06-14 16:53 ` [Qemu-devel] [PATCH 06/13] vmware-vga: Eliminate vga_dirty_log_restart Jan Kiszka
@ 2011-06-14 16:53 ` Jan Kiszka
  2011-06-16  0:06   ` andrzej zaborowski
  2011-06-14 16:53 ` [Qemu-devel] [PATCH 08/13] vmware-vga: Register reset service Jan Kiszka
                   ` (6 subsequent siblings)
  13 siblings, 1 reply; 28+ messages in thread
From: Jan Kiszka @ 2011-06-14 16:53 UTC (permalink / raw)
  To: Anthony Liguori, qemu-devel; +Cc: Andrzej Zaborowski

Just like on SVGA_REG_ENABLE changes, keep dirty logging off on PCI BAR
remappings when SVGA mode is on.

CC: Andrzej Zaborowski <balrog@zabor.org>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 hw/vmware_vga.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/hw/vmware_vga.c b/hw/vmware_vga.c
index 82e2a1c..93b8811 100644
--- a/hw/vmware_vga.c
+++ b/hw/vmware_vga.c
@@ -1149,7 +1149,8 @@ static void pci_vmsvga_map_mem(PCIDevice *pci_dev, int region_num,
 
     s->vram_base = addr;
     cpu_register_physical_memory_log(s->vram_base, s->vga.vram_size,
-                                     s->vga.vram_offset | IO_MEM_RAM, 0, true);
+                                     s->vga.vram_offset | IO_MEM_RAM, 0,
+                                     !s->enable);
 
     s->vga.map_addr = addr;
     s->vga.map_end = addr + s->vga.vram_size;
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [Qemu-devel] [PATCH 08/13] vmware-vga: Register reset service
  2011-06-14 16:53 [Qemu-devel] [PATCH 00/13] vga: dirty log cleanup, more linear mapping Jan Kiszka
                   ` (6 preceding siblings ...)
  2011-06-14 16:53 ` [Qemu-devel] [PATCH 07/13] vmware_vga: Do not enable dirty logging when in SVGA mode Jan Kiszka
@ 2011-06-14 16:53 ` Jan Kiszka
  2011-06-15 23:55   ` andrzej zaborowski
  2011-06-14 16:53 ` [Qemu-devel] [PATCH 09/13] vmware-vga: Use cpu_register_physical_memory_log for dirty log enabling Jan Kiszka
                   ` (5 subsequent siblings)
  13 siblings, 1 reply; 28+ messages in thread
From: Jan Kiszka @ 2011-06-14 16:53 UTC (permalink / raw)
  To: Anthony Liguori, qemu-devel; +Cc: Andrzej Zaborowski

Fixes cold reset in vmware graphic modes.

CC: Andrzej Zaborowski <balrog@zabor.org>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 hw/vmware_vga.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/hw/vmware_vga.c b/hw/vmware_vga.c
index 93b8811..c20f154 100644
--- a/hw/vmware_vga.c
+++ b/hw/vmware_vga.c
@@ -966,8 +966,12 @@ static void vmsvga_update_display(void *opaque)
     }
 }
 
-static void vmsvga_reset(struct vmsvga_state_s *s)
+static void vmsvga_reset(DeviceState *dev)
 {
+    struct pci_vmsvga_state_s *pci =
+        DO_UPCAST(struct pci_vmsvga_state_s, card.qdev, dev);
+    struct vmsvga_state_s *s = &pci->chip;
+
     s->index = 0;
     s->enable = 0;
     s->config = 0;
@@ -1117,8 +1121,6 @@ static void vmsvga_init(struct vmsvga_state_s *s, int vga_ram_size)
     vga_common_init(&s->vga, vga_ram_size);
     vga_init(&s->vga);
     vmstate_register(NULL, 0, &vmstate_vga_common, &s->vga);
-
-    vmsvga_reset(s);
 }
 
 static void pci_vmsvga_map_ioport(PCIDevice *pci_dev, int region_num,
@@ -1207,6 +1209,7 @@ static PCIDeviceInfo vmsvga_info = {
     .qdev.name    = "vmware-svga",
     .qdev.size    = sizeof(struct pci_vmsvga_state_s),
     .qdev.vmsd    = &vmstate_vmware_vga,
+    .qdev.reset   = vmsvga_reset,
     .no_hotplug   = 1,
     .init         = pci_vmsvga_initfn,
     .romfile      = "vgabios-vmware.bin",
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [Qemu-devel] [PATCH 09/13] vmware-vga: Use cpu_register_physical_memory_log for dirty log enabling
  2011-06-14 16:53 [Qemu-devel] [PATCH 00/13] vga: dirty log cleanup, more linear mapping Jan Kiszka
                   ` (7 preceding siblings ...)
  2011-06-14 16:53 ` [Qemu-devel] [PATCH 08/13] vmware-vga: Register reset service Jan Kiszka
@ 2011-06-14 16:53 ` Jan Kiszka
  2011-06-16  0:06   ` andrzej zaborowski
  2011-06-14 16:53 ` [Qemu-devel] [PATCH 10/13] Drop dirty log start/stop infrastructure Jan Kiszka
                   ` (4 subsequent siblings)
  13 siblings, 1 reply; 28+ messages in thread
From: Jan Kiszka @ 2011-06-14 16:53 UTC (permalink / raw)
  To: Anthony Liguori, qemu-devel; +Cc: Andrzej Zaborowski

This eliminates the last user of vga_dirty_log_start/start.

CC: Andrzej Zaborowski <balrog@zabor.org>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 hw/vmware_vga.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/hw/vmware_vga.c b/hw/vmware_vga.c
index c20f154..7cb0c28 100644
--- a/hw/vmware_vga.c
+++ b/hw/vmware_vga.c
@@ -828,9 +828,13 @@ static void vmsvga_value_write(void *opaque, uint32_t address, uint32_t value)
         s->vga.invalidate(&s->vga);
         if (s->enable) {
             s->fb_size = ((s->depth + 7) >> 3) * s->new_width * s->new_height;
-            vga_dirty_log_stop(&s->vga);
-        } else {
-            vga_dirty_log_start(&s->vga);
+            cpu_register_physical_memory_log(s->vram_base, s->vga.vram_size,
+                                             s->vga.vram_offset | IO_MEM_RAM,
+                                             0, false);
+        } else if (s->vram_base) {
+            cpu_register_physical_memory_log(s->vram_base, s->vga.vram_size,
+                                             s->vga.vram_offset | IO_MEM_RAM,
+                                             0, true);
         }
         break;
 
@@ -1011,8 +1015,6 @@ static void vmsvga_reset(DeviceState *dev)
         break;
     }
     s->syncing = 0;
-
-    vga_dirty_log_start(&s->vga);
 }
 
 static void vmsvga_invalidate_display(void *opaque)
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [Qemu-devel] [PATCH 10/13] Drop dirty log start/stop infrastructure
  2011-06-14 16:53 [Qemu-devel] [PATCH 00/13] vga: dirty log cleanup, more linear mapping Jan Kiszka
                   ` (8 preceding siblings ...)
  2011-06-14 16:53 ` [Qemu-devel] [PATCH 09/13] vmware-vga: Use cpu_register_physical_memory_log for dirty log enabling Jan Kiszka
@ 2011-06-14 16:53 ` Jan Kiszka
  2011-06-23 11:09   ` [Qemu-devel] [PATCH v2 " Jan Kiszka
  2011-06-14 16:53 ` [Qemu-devel] [PATCH 11/13] vga: Refactor lfb_vram_mapped to vga_mem_mapped Jan Kiszka
                   ` (3 subsequent siblings)
  13 siblings, 1 reply; 28+ messages in thread
From: Jan Kiszka @ 2011-06-14 16:53 UTC (permalink / raw)
  To: Anthony Liguori, qemu-devel
  Cc: Anthony PERARD, Avi Kivity, Michael S. Tsirkin

No more users of vga_dirty_log_start/start, thus also no use anymore for
the log_start/stop CPUPhysMemoryClient callbacks. Drop the whole
infrastructure.

CC: Anthony PERARD <anthony.perard@citrix.com>
CC: Michael S. Tsirkin <mst@redhat.com>
CC: Avi Kivity <avi@redhat.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

Avi, does this match your plans for a new memory API? Or would be end up
reintroducing such callbacks after the refactoring?
---
 cpu-all.h    |    6 ------
 cpu-common.h |    4 ----
 exec.c       |   30 ------------------------------
 hw/vga.c     |   36 ------------------------------------
 hw/vga_int.h |    3 ---
 hw/vhost.c   |    2 --
 kvm-all.c    |   47 -----------------------------------------------
 7 files changed, 0 insertions(+), 128 deletions(-)

diff --git a/cpu-all.h b/cpu-all.h
index 880f570..ac81a07 100644
--- a/cpu-all.h
+++ b/cpu-all.h
@@ -1015,12 +1015,6 @@ int cpu_physical_memory_get_dirty_tracking(void);
 int cpu_physical_sync_dirty_bitmap(target_phys_addr_t start_addr,
                                    target_phys_addr_t end_addr);
 
-int cpu_physical_log_start(target_phys_addr_t start_addr,
-                           ram_addr_t size);
-
-int cpu_physical_log_stop(target_phys_addr_t start_addr,
-                          ram_addr_t size);
-
 void dump_exec_info(FILE *f, fprintf_function cpu_fprintf);
 #endif /* !CONFIG_USER_ONLY */
 
diff --git a/cpu-common.h b/cpu-common.h
index 9f59172..c90c463 100644
--- a/cpu-common.h
+++ b/cpu-common.h
@@ -111,10 +111,6 @@ struct CPUPhysMemoryClient {
                              target_phys_addr_t end_addr);
     int (*migration_log)(struct CPUPhysMemoryClient *client,
                          int enable);
-    int (*log_start)(struct CPUPhysMemoryClient *client,
-                     target_phys_addr_t phys_addr, ram_addr_t size);
-    int (*log_stop)(struct CPUPhysMemoryClient *client,
-                    target_phys_addr_t phys_addr, ram_addr_t size);
     QLIST_ENTRY(CPUPhysMemoryClient) list;
 };
 
diff --git a/exec.c b/exec.c
index 09928a3..cd2c5b6 100644
--- a/exec.c
+++ b/exec.c
@@ -2099,36 +2099,6 @@ int cpu_physical_sync_dirty_bitmap(target_phys_addr_t start_addr,
     return ret;
 }
 
-int cpu_physical_log_start(target_phys_addr_t start_addr,
-                           ram_addr_t size)
-{
-    CPUPhysMemoryClient *client;
-    QLIST_FOREACH(client, &memory_client_list, list) {
-        if (client->log_start) {
-            int r = client->log_start(client, start_addr, size);
-            if (r < 0) {
-                return r;
-            }
-        }
-    }
-    return 0;
-}
-
-int cpu_physical_log_stop(target_phys_addr_t start_addr,
-                          ram_addr_t size)
-{
-    CPUPhysMemoryClient *client;
-    QLIST_FOREACH(client, &memory_client_list, list) {
-        if (client->log_stop) {
-            int r = client->log_stop(client, start_addr, size);
-            if (r < 0) {
-                return r;
-            }
-        }
-    }
-    return 0;
-}
-
 static inline void tlb_update_dirty(CPUTLBEntry *tlb_entry)
 {
     ram_addr_t ram_addr;
diff --git a/hw/vga.c b/hw/vga.c
index 814d0d3..1290317 100644
--- a/hw/vga.c
+++ b/hw/vga.c
@@ -1570,42 +1570,6 @@ static void vga_sync_dirty_bitmap(VGACommonState *s)
 
 }
 
-void vga_dirty_log_start(VGACommonState *s)
-{
-    if (s->map_addr) {
-        cpu_physical_log_start(s->map_addr, s->map_end - s->map_addr);
-    }
-
-    if (s->lfb_vram_mapped) {
-        cpu_physical_log_start(isa_mem_base + 0xa0000, 0x8000);
-        cpu_physical_log_start(isa_mem_base + 0xa8000, 0x8000);
-    }
-
-#ifdef CONFIG_BOCHS_VBE
-    if (s->vbe_mapped) {
-        cpu_physical_log_start(VBE_DISPI_LFB_PHYSICAL_ADDRESS, s->vram_size);
-    }
-#endif
-}
-
-void vga_dirty_log_stop(VGACommonState *s)
-{
-    if (s->map_addr) {
-        cpu_physical_log_stop(s->map_addr, s->map_end - s->map_addr);
-    }
-
-    if (s->lfb_vram_mapped) {
-        cpu_physical_log_stop(isa_mem_base + 0xa0000, 0x8000);
-        cpu_physical_log_stop(isa_mem_base + 0xa8000, 0x8000);
-    }
-
-#ifdef CONFIG_BOCHS_VBE
-    if (s->vbe_mapped) {
-        cpu_physical_log_stop(VBE_DISPI_LFB_PHYSICAL_ADDRESS, s->vram_size);
-    }
-#endif
-}
-
 /*
  * graphic modes
  */
diff --git a/hw/vga_int.h b/hw/vga_int.h
index 5cd9a6e..73328c2 100644
--- a/hw/vga_int.h
+++ b/hw/vga_int.h
@@ -194,9 +194,6 @@ void vga_init(VGACommonState *s);
 int vga_init_io(VGACommonState *s);
 void vga_common_reset(VGACommonState *s);
 
-void vga_dirty_log_start(VGACommonState *s);
-void vga_dirty_log_stop(VGACommonState *s);
-
 extern const VMStateDescription vmstate_vga_common;
 uint32_t vga_ioport_read(void *opaque, uint32_t addr);
 void vga_ioport_write(void *opaque, uint32_t addr, uint32_t val);
diff --git a/hw/vhost.c b/hw/vhost.c
index 80f771e..b7e6284 100644
--- a/hw/vhost.c
+++ b/hw/vhost.c
@@ -668,8 +668,6 @@ int vhost_dev_init(struct vhost_dev *hdev, int devfd, bool force)
     hdev->client.set_memory = vhost_client_set_memory;
     hdev->client.sync_dirty_bitmap = vhost_client_sync_dirty_bitmap;
     hdev->client.migration_log = vhost_client_migration_log;
-    hdev->client.log_start = NULL;
-    hdev->client.log_stop = NULL;
     hdev->mem = qemu_mallocz(offsetof(struct vhost_memory, regions));
     hdev->log = NULL;
     hdev->log_size = 0;
diff --git a/kvm-all.c b/kvm-all.c
index 106eb3a..c412999 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -100,24 +100,6 @@ static KVMSlot *kvm_alloc_slot(KVMState *s)
     abort();
 }
 
-static KVMSlot *kvm_lookup_matching_slot(KVMState *s,
-                                         target_phys_addr_t start_addr,
-                                         target_phys_addr_t end_addr)
-{
-    int i;
-
-    for (i = 0; i < ARRAY_SIZE(s->slots); i++) {
-        KVMSlot *mem = &s->slots[i];
-
-        if (start_addr == mem->start_addr &&
-            end_addr == mem->start_addr + mem->memory_size) {
-            return mem;
-        }
-    }
-
-    return NULL;
-}
-
 /*
  * Find overlapping slot with lowest start address
  */
@@ -274,33 +256,6 @@ static int kvm_slot_dirty_pages_log_change(KVMSlot *mem, bool log_dirty)
     return kvm_set_user_memory_region(s, mem);
 }
 
-static int kvm_dirty_pages_log_change(target_phys_addr_t phys_addr,
-                                      ram_addr_t size, bool log_dirty)
-{
-    KVMState *s = kvm_state;
-    KVMSlot *mem = kvm_lookup_matching_slot(s, phys_addr, phys_addr + size);
-
-    if (mem == NULL)  {
-        fprintf(stderr, "BUG: %s: invalid parameters " TARGET_FMT_plx "-"
-                TARGET_FMT_plx "\n", __func__, phys_addr,
-                (target_phys_addr_t)(phys_addr + size - 1));
-        return -EINVAL;
-    }
-    return kvm_slot_dirty_pages_log_change(mem, log_dirty);
-}
-
-static int kvm_log_start(CPUPhysMemoryClient *client,
-                         target_phys_addr_t phys_addr, ram_addr_t size)
-{
-    return kvm_dirty_pages_log_change(phys_addr, size, true);
-}
-
-static int kvm_log_stop(CPUPhysMemoryClient *client,
-                        target_phys_addr_t phys_addr, ram_addr_t size)
-{
-    return kvm_dirty_pages_log_change(phys_addr, size, false);
-}
-
 static int kvm_set_migration_log(int enable)
 {
     KVMState *s = kvm_state;
@@ -679,8 +634,6 @@ static CPUPhysMemoryClient kvm_cpu_phys_memory_client = {
     .set_memory = kvm_client_set_memory,
     .sync_dirty_bitmap = kvm_client_sync_dirty_bitmap,
     .migration_log = kvm_client_migration_log,
-    .log_start = kvm_log_start,
-    .log_stop = kvm_log_stop,
 };
 
 static void kvm_handle_interrupt(CPUState *env, int mask)
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [Qemu-devel] [PATCH 11/13] vga: Refactor lfb_vram_mapped to vga_mem_mapped
  2011-06-14 16:53 [Qemu-devel] [PATCH 00/13] vga: dirty log cleanup, more linear mapping Jan Kiszka
                   ` (9 preceding siblings ...)
  2011-06-14 16:53 ` [Qemu-devel] [PATCH 10/13] Drop dirty log start/stop infrastructure Jan Kiszka
@ 2011-06-14 16:53 ` Jan Kiszka
  2011-06-14 16:53 ` [Qemu-devel] [PATCH 12/13] vga: Move vga_sync_dirty_bitmap Jan Kiszka
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 28+ messages in thread
From: Jan Kiszka @ 2011-06-14 16:53 UTC (permalink / raw)
  To: Anthony Liguori, qemu-devel

Make it clearer that this flag indicates wether the legacy VGA memory
region is mapped as RAM. And change its type to bool.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 hw/cirrus_vga.c |   10 ++++------
 hw/vga.c        |    4 ++--
 hw/vga_int.h    |    2 +-
 3 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c
index 98a9b8e..54a730d 100644
--- a/hw/cirrus_vga.c
+++ b/hw/cirrus_vga.c
@@ -1179,7 +1179,7 @@ static void cirrus_update_bank_ptr(CirrusVGAState * s, unsigned bank_index)
     if (limit > 0) {
         /* Thinking about changing bank base? First, drop the dirty bitmap information
          * on the current location, otherwise we lose this pointer forever */
-        if (s->vga.lfb_vram_mapped) {
+        if (s->vga.vga_mem_mapped) {
             target_phys_addr_t base_addr = isa_mem_base + 0xa0000 + bank_index * 0x8000;
             cpu_physical_sync_dirty_bitmap(base_addr, base_addr + 0x8000);
         }
@@ -2497,8 +2497,6 @@ static void map_linear_vram(CirrusVGAState *s)
     if (!s->vga.map_addr)
         return;
 
-    s->vga.lfb_vram_mapped = 0;
-
     if (!(s->cirrus_srcptr != s->cirrus_srcptr_end)
         && !((s->vga.sr[0x07] & 0x01) == 0)
         && !((s->vga.gr[0x0B] & 0x14) == 0x14)
@@ -2513,11 +2511,11 @@ static void map_linear_vram(CirrusVGAState *s)
 					  s->cirrus_bank_base[1]) |
 					 IO_MEM_RAM, 0, true);
 
-        s->vga.lfb_vram_mapped = 1;
-    }
-    else {
+        s->vga.vga_mem_mapped = true;
+    } else {
         cpu_register_physical_memory(isa_mem_base + 0xa0000, 0x20000,
                                      s->vga.vga_io_memory);
+        s->vga.vga_mem_mapped = false;
     }
 }
 
diff --git a/hw/vga.c b/hw/vga.c
index 1290317..ee0c68e 100644
--- a/hw/vga.c
+++ b/hw/vga.c
@@ -1556,7 +1556,7 @@ static void vga_sync_dirty_bitmap(VGACommonState *s)
     if (s->map_addr)
         cpu_physical_sync_dirty_bitmap(s->map_addr, s->map_end);
 
-    if (s->lfb_vram_mapped) {
+    if (s->vga_mem_mapped) {
         cpu_physical_sync_dirty_bitmap(isa_mem_base + 0xa0000, 0xa8000);
         cpu_physical_sync_dirty_bitmap(isa_mem_base + 0xa8000, 0xb0000);
     }
@@ -1868,7 +1868,7 @@ void vga_common_reset(VGACommonState *s)
     s->lfb_end = 0;
     s->map_addr = 0;
     s->map_end = 0;
-    s->lfb_vram_mapped = 0;
+    s->vga_mem_mapped = false;
     s->sr_index = 0;
     memset(s->sr, '\0', sizeof(s->sr));
     s->gr_index = 0;
diff --git a/hw/vga_int.h b/hw/vga_int.h
index 73328c2..a6ea93c 100644
--- a/hw/vga_int.h
+++ b/hw/vga_int.h
@@ -111,7 +111,7 @@ typedef struct VGACommonState {
     uint32_t lfb_end;
     uint32_t map_addr;
     uint32_t map_end;
-    uint32_t lfb_vram_mapped; /* whether 0xa0000 is mapped as ram */
+    bool vga_mem_mapped; /* whether 0xa0000..0xbffff is mapped as RAM */
     uint32_t latch;
     uint8_t sr_index;
     uint8_t sr[256];
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [Qemu-devel] [PATCH 12/13] vga: Move vga_sync_dirty_bitmap
  2011-06-14 16:53 [Qemu-devel] [PATCH 00/13] vga: dirty log cleanup, more linear mapping Jan Kiszka
                   ` (10 preceding siblings ...)
  2011-06-14 16:53 ` [Qemu-devel] [PATCH 11/13] vga: Refactor lfb_vram_mapped to vga_mem_mapped Jan Kiszka
@ 2011-06-14 16:53 ` Jan Kiszka
  2011-06-14 16:53 ` [Qemu-devel] [PATCH 13/13] vga: Use linear mapping + dirty logging in chain 4 memory access mode Jan Kiszka
  2011-06-23 11:11 ` [Qemu-devel] [PATCH 00/13] vga: dirty log cleanup, more linear mapping Avi Kivity
  13 siblings, 0 replies; 28+ messages in thread
From: Jan Kiszka @ 2011-06-14 16:53 UTC (permalink / raw)
  To: Anthony Liguori, qemu-devel

We will need it earlier in the code.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 hw/vga.c |   37 ++++++++++++++++++-------------------
 1 files changed, 18 insertions(+), 19 deletions(-)

diff --git a/hw/vga.c b/hw/vga.c
index ee0c68e..4208151 100644
--- a/hw/vga.c
+++ b/hw/vga.c
@@ -152,6 +152,24 @@ static void vga_screen_dump(void *opaque, const char *filename);
 static char *screen_dump_filename;
 static DisplayChangeListener *screen_dump_dcl;
 
+static void vga_sync_dirty_bitmap(VGACommonState *s)
+{
+    if (s->map_addr) {
+        cpu_physical_sync_dirty_bitmap(s->map_addr, s->map_end);
+    }
+    if (s->vga_mem_mapped) {
+        cpu_physical_sync_dirty_bitmap(isa_mem_base + 0xa0000, 0xa8000);
+        cpu_physical_sync_dirty_bitmap(isa_mem_base + 0xa8000, 0xb0000);
+    }
+#ifdef CONFIG_BOCHS_VBE
+    if (s->vbe_mapped) {
+        cpu_physical_sync_dirty_bitmap(VBE_DISPI_LFB_PHYSICAL_ADDRESS,
+                                       VBE_DISPI_LFB_PHYSICAL_ADDRESS +
+                                       s->vram_size);
+    }
+#endif
+}
+
 static void vga_dumb_update_retrace_info(VGACommonState *s)
 {
     (void) s;
@@ -1551,25 +1569,6 @@ void vga_invalidate_scanlines(VGACommonState *s, int y1, int y2)
     }
 }
 
-static void vga_sync_dirty_bitmap(VGACommonState *s)
-{
-    if (s->map_addr)
-        cpu_physical_sync_dirty_bitmap(s->map_addr, s->map_end);
-
-    if (s->vga_mem_mapped) {
-        cpu_physical_sync_dirty_bitmap(isa_mem_base + 0xa0000, 0xa8000);
-        cpu_physical_sync_dirty_bitmap(isa_mem_base + 0xa8000, 0xb0000);
-    }
-
-#ifdef CONFIG_BOCHS_VBE
-    if (s->vbe_mapped) {
-        cpu_physical_sync_dirty_bitmap(VBE_DISPI_LFB_PHYSICAL_ADDRESS,
-                                       VBE_DISPI_LFB_PHYSICAL_ADDRESS + s->vram_size);
-    }
-#endif
-
-}
-
 /*
  * graphic modes
  */
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [Qemu-devel] [PATCH 13/13] vga: Use linear mapping + dirty logging in chain 4 memory access mode
  2011-06-14 16:53 [Qemu-devel] [PATCH 00/13] vga: dirty log cleanup, more linear mapping Jan Kiszka
                   ` (11 preceding siblings ...)
  2011-06-14 16:53 ` [Qemu-devel] [PATCH 12/13] vga: Move vga_sync_dirty_bitmap Jan Kiszka
@ 2011-06-14 16:53 ` Jan Kiszka
  2011-06-23 11:11 ` [Qemu-devel] [PATCH 00/13] vga: dirty log cleanup, more linear mapping Avi Kivity
  13 siblings, 0 replies; 28+ messages in thread
From: Jan Kiszka @ 2011-06-14 16:53 UTC (permalink / raw)
  To: Anthony Liguori, qemu-devel; +Cc: Gerd Hoffmann

Most VGA memory access modes require MMIO handling as they demand weird
logic to get a byte from or into the video RAM. However, there is one
exception: chain 4 mode with all memory planes enabled for writing. This
mode actually allows lineary mapping, which can then be combined with
dirty logging to accelerate KVM.

This patch accelerates specifically VBE accesses like they are used by
grub in graphical mode. Not only the standard VGA adapter benefits from
this, also vmware and spice in VGA mode.

CC: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 hw/cirrus_vga.c |    1 +
 hw/vga.c        |   74 +++++++++++++++++++++++++++++++++++++++++++++++++++---
 hw/vga_int.h    |    2 +
 3 files changed, 72 insertions(+), 5 deletions(-)

diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c
index 54a730d..babb816 100644
--- a/hw/cirrus_vga.c
+++ b/hw/cirrus_vga.c
@@ -2516,6 +2516,7 @@ static void map_linear_vram(CirrusVGAState *s)
         cpu_register_physical_memory(isa_mem_base + 0xa0000, 0x20000,
                                      s->vga.vga_io_memory);
         s->vga.vga_mem_mapped = false;
+        s->vga.vga_memory_map_mode = 1;
     }
 }
 
diff --git a/hw/vga.c b/hw/vga.c
index 4208151..6eef149 100644
--- a/hw/vga.c
+++ b/hw/vga.c
@@ -159,7 +159,13 @@ static void vga_sync_dirty_bitmap(VGACommonState *s)
     }
     if (s->vga_mem_mapped) {
         cpu_physical_sync_dirty_bitmap(isa_mem_base + 0xa0000, 0xa8000);
-        cpu_physical_sync_dirty_bitmap(isa_mem_base + 0xa8000, 0xb0000);
+        if (s->vga_memory_map_mode <= 1) {
+            cpu_physical_sync_dirty_bitmap(isa_mem_base + 0xa8000, 0xb0000);
+            if (s->vga_memory_map_mode == 0) {
+                cpu_physical_sync_dirty_bitmap(isa_mem_base + 0xb0000,
+                                               0xc0000);
+            }
+        }
     }
 #ifdef CONFIG_BOCHS_VBE
     if (s->vbe_mapped) {
@@ -170,6 +176,61 @@ static void vga_sync_dirty_bitmap(VGACommonState *s)
 #endif
 }
 
+static void vga_update_memory_access(VGACommonState *s)
+{
+    target_phys_addr_t offset, io_size;
+    uint8_t memory_map_mode;
+
+    if ((s->sr[0x02] & 0xf) == 0xf && s->sr[0x04] & 0x08) {
+        memory_map_mode = (s->gr[6] >> 2) & 3;
+        if (s->vga_mem_mapped && memory_map_mode == s->vga_memory_map_mode &&
+            s->bank_offset == s->vga_bank_offs_mapped) {
+            return;
+        }
+        vga_sync_dirty_bitmap(s);
+        s->vga_mem_mapped = true;
+        s->vga_memory_map_mode = memory_map_mode;
+        s->vga_bank_offs_mapped = s->bank_offset;
+
+        if (memory_map_mode <= 1) {
+            if (memory_map_mode == 0) {
+                offset = 0;
+                cpu_register_physical_memory_log(isa_mem_base + 0xb0000,
+                                                 0x10000,
+                                                 (s->vram_offset + 0x10000) |
+                                                 IO_MEM_RAM, 0, true);
+                io_size = 0;
+            } else {
+                offset = s->bank_offset;
+                io_size = 0x10000;
+            }
+            cpu_register_physical_memory_log(isa_mem_base + 0xa0000, 0x8000,
+                                             (s->vram_offset + offset) |
+                                             IO_MEM_RAM, 0, true);
+            offset += 0x8000;
+            cpu_register_physical_memory_log(isa_mem_base + 0xa8000, 0x8000,
+                                             (s->vram_offset + offset) |
+                                             IO_MEM_RAM, 0, true);
+        } else {
+            offset = (memory_map_mode == 2) ? 0xb0000 : 0xb8000;
+            cpu_register_physical_memory_log(isa_mem_base + 0xa0000, 0x8000,
+                                             (s->vram_offset + offset) |
+                                             IO_MEM_RAM, 0, true);
+            io_size = 0x18000;
+        }
+        if (io_size > 0) {
+            cpu_register_physical_memory(isa_mem_base + 0xc0000 - io_size,
+                                         io_size, s->vga_io_memory);
+        }
+    } else if (s->vga_mem_mapped) {
+        vga_sync_dirty_bitmap(s);
+        s->vga_mem_mapped = false;
+        s->plane_updated = 0xf;
+        cpu_register_physical_memory(isa_mem_base + 0xa0000, 0x20000,
+                                     s->vga_io_memory);
+    }
+}
+
 static void vga_dumb_update_retrace_info(VGACommonState *s)
 {
     (void) s;
@@ -463,6 +524,7 @@ void vga_ioport_write(void *opaque, uint32_t addr, uint32_t val)
 #endif
         s->sr[s->sr_index] = val & sr_mask[s->sr_index];
         if (s->sr_index == 1) s->update_retrace_info(s);
+        vga_update_memory_access(s);
         break;
     case 0x3c7:
         s->dac_read_index = val;
@@ -490,6 +552,7 @@ void vga_ioport_write(void *opaque, uint32_t addr, uint32_t val)
         printf("vga: write GR%x = 0x%02x\n", s->gr_index, val);
 #endif
         s->gr[s->gr_index] = val & gr_mask[s->gr_index];
+        vga_update_memory_access(s);
         break;
     case 0x3b4:
     case 0x3d4:
@@ -623,6 +686,7 @@ static void vbe_ioport_write_data(void *opaque, uint32_t addr, uint32_t val)
             }
             s->vbe_regs[s->vbe_index] = val;
             s->bank_offset = (val << 16);
+            vga_update_memory_access(s);
             break;
         case VBE_DISPI_INDEX_ENABLE:
             if ((val & VBE_DISPI_ENABLED) &&
@@ -682,6 +746,7 @@ static void vbe_ioport_write_data(void *opaque, uint32_t addr, uint32_t val)
             }
             s->dac_8bit = (val & VBE_DISPI_8BIT_DAC) > 0;
             s->vbe_regs[s->vbe_index] = val;
+            vga_update_memory_access(s);
             break;
         case VBE_DISPI_INDEX_VIRT_WIDTH:
             {
@@ -1924,6 +1989,7 @@ void vga_common_reset(VGACommonState *s)
         memset(&s->retrace_info, 0, sizeof (s->retrace_info));
         break;
     }
+    vga_update_memory_access(s);
 }
 
 static void vga_reset(void *opaque)
@@ -2255,15 +2321,13 @@ int vga_init_io(VGACommonState *s)
 
 void vga_init(VGACommonState *s)
 {
-    int vga_io_memory;
-
     qemu_register_reset(vga_reset, s);
 
     s->bank_offset = 0;
 
-    vga_io_memory = vga_init_io(s);
+    s->vga_io_memory = vga_init_io(s);
     cpu_register_physical_memory(isa_mem_base + 0x000a0000, 0x20000,
-                                 vga_io_memory);
+                                 s->vga_io_memory);
     qemu_register_coalesced_mmio(isa_mem_base + 0x000a0000, 0x20000);
 }
 
diff --git a/hw/vga_int.h b/hw/vga_int.h
index a6ea93c..dd8a283 100644
--- a/hw/vga_int.h
+++ b/hw/vga_int.h
@@ -112,6 +112,8 @@ typedef struct VGACommonState {
     uint32_t map_addr;
     uint32_t map_end;
     bool vga_mem_mapped; /* whether 0xa0000..0xbffff is mapped as RAM */
+    int vga_memory_map_mode;
+    int32_t vga_bank_offs_mapped;
     uint32_t latch;
     uint8_t sr_index;
     uint8_t sr[256];
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* Re: [Qemu-devel] [PATCH 01/13] spice: Use cpu_register_physical_memory_log for dirty log enabling
  2011-06-14 16:53 ` [Qemu-devel] [PATCH 01/13] spice: Use cpu_register_physical_memory_log for dirty log enabling Jan Kiszka
@ 2011-06-15  6:42   ` Gerd Hoffmann
  2011-06-15  7:23     ` [Qemu-devel] [PATCH v2 " Jan Kiszka
  0 siblings, 1 reply; 28+ messages in thread
From: Gerd Hoffmann @ 2011-06-15  6:42 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Anthony Liguori, qemu-devel

   Hi,

> Note: The addtional vga_dirty_log_start for the primary interface looked
> stray. qxl_write_config enabled logging for all interfaces anyway.

No.  qxl_write_config is hooked for the primary only.

>       case QXL_RAM_RANGE_INDEX:
> -        cpu_register_physical_memory(addr, size, qxl->vga.vram_offset | IO_MEM_RAM);
> +        cpu_register_physical_memory_log(addr, size,
> +                                         qxl->vga.vram_offset | IO_MEM_RAM,
> +                                         0, true);

if (qxl->id == 0) {
     cpu_register_physical_memory_log(...)
} else {
     cpu_register_physical_memory()
}

Only the primary is vga compatible and thus needs dirty logging.

cheers,
   Gerd

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [Qemu-devel] [PATCH v2 01/13] spice: Use cpu_register_physical_memory_log for dirty log enabling
  2011-06-15  6:42   ` Gerd Hoffmann
@ 2011-06-15  7:23     ` Jan Kiszka
  2011-06-15  8:50       ` Gerd Hoffmann
  0 siblings, 1 reply; 28+ messages in thread
From: Jan Kiszka @ 2011-06-15  7:23 UTC (permalink / raw)
  To: Anthony Liguori, qemu-devel; +Cc: Gerd Hoffmann

Drop outdated dirty log disable/enable around PCI remapping and register
the BAR for dirty logging via cpu_register_physical_memory_log. That
allows to remove all vga_dirty_log_start/stop references from qxl.

CC: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

Changes in v2:
 - don't enable logging for secondary adapter

 hw/qxl.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/hw/qxl.c b/hw/qxl.c
index 1906e84..01149ae 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -619,12 +619,10 @@ static void qxl_write_config(PCIDevice *d, uint32_t address,
     PCIQXLDevice *qxl = DO_UPCAST(PCIQXLDevice, pci, d);
     VGACommonState *vga = &qxl->vga;
 
-    vga_dirty_log_stop(vga);
     pci_default_write_config(d, address, val, len);
     if (vga->map_addr && qxl->pci.io_regions[0].addr == -1) {
         vga->map_addr = 0;
     }
-    vga_dirty_log_start(vga);
 }
 
 static void qxl_check_state(PCIQXLDevice *d)
@@ -1037,12 +1035,11 @@ static void qxl_map(PCIDevice *pci, int region_num,
         qxl->io_base = addr;
         break;
     case QXL_RAM_RANGE_INDEX:
-        cpu_register_physical_memory(addr, size, qxl->vga.vram_offset | IO_MEM_RAM);
+        cpu_register_physical_memory_log(addr, size,
+                                         qxl->vga.vram_offset | IO_MEM_RAM,
+                                         0, qxl->id == 0);
         qxl->vga.map_addr = addr;
         qxl->vga.map_end = addr + size;
-        if (qxl->id == 0) {
-            vga_dirty_log_start(&qxl->vga);
-        }
         break;
     case QXL_ROM_RANGE_INDEX:
         cpu_register_physical_memory(addr, size, qxl->rom_offset | IO_MEM_ROM);
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* Re: [Qemu-devel] [PATCH v2 01/13] spice: Use cpu_register_physical_memory_log for dirty log enabling
  2011-06-15  7:23     ` [Qemu-devel] [PATCH v2 " Jan Kiszka
@ 2011-06-15  8:50       ` Gerd Hoffmann
  0 siblings, 0 replies; 28+ messages in thread
From: Gerd Hoffmann @ 2011-06-15  8:50 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Anthony Liguori, qemu-devel

On 06/15/11 09:23, Jan Kiszka wrote:
> Drop outdated dirty log disable/enable around PCI remapping and register
> the BAR for dirty logging via cpu_register_physical_memory_log. That
> allows to remove all vga_dirty_log_start/stop references from qxl.

Acked-by: Gerd Hoffmann <kraxel@redhat.com>

cheers,
   Gerd

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [Qemu-devel] [PATCH 06/13] vmware-vga: Eliminate vga_dirty_log_restart
  2011-06-14 16:53 ` [Qemu-devel] [PATCH 06/13] vmware-vga: Eliminate vga_dirty_log_restart Jan Kiszka
@ 2011-06-15 23:48   ` andrzej zaborowski
  0 siblings, 0 replies; 28+ messages in thread
From: andrzej zaborowski @ 2011-06-15 23:48 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Anthony Liguori, qemu-devel

On 14 June 2011 18:53, Jan Kiszka <jan.kiszka@siemens.com> wrote:
> Convert the last user of vga_dirty_log_restart to
> cpu_register_physical_memory_log and drop the service.
>
> CC: Andrzej Zaborowski <balrog@zabor.org>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Andrzej Zaborowski <balrogg@gmail.com>
> ---
>  hw/vga.c        |    6 ------
>  hw/vga_int.h    |    1 -
>  hw/vmware_vga.c |    5 ++---
>  3 files changed, 2 insertions(+), 10 deletions(-)
>
> diff --git a/hw/vga.c b/hw/vga.c
> index 124295a..814d0d3 100644
> --- a/hw/vga.c
> +++ b/hw/vga.c
> @@ -1606,12 +1606,6 @@ void vga_dirty_log_stop(VGACommonState *s)
>  #endif
>  }
>
> -void vga_dirty_log_restart(VGACommonState *s)
> -{
> -    vga_dirty_log_stop(s);
> -    vga_dirty_log_start(s);
> -}
> -
>  /*
>  * graphic modes
>  */
> diff --git a/hw/vga_int.h b/hw/vga_int.h
> index d2811bd..5cd9a6e 100644
> --- a/hw/vga_int.h
> +++ b/hw/vga_int.h
> @@ -196,7 +196,6 @@ void vga_common_reset(VGACommonState *s);
>
>  void vga_dirty_log_start(VGACommonState *s);
>  void vga_dirty_log_stop(VGACommonState *s);
> -void vga_dirty_log_restart(VGACommonState *s);
>
>  extern const VMStateDescription vmstate_vga_common;
>  uint32_t vga_ioport_read(void *opaque, uint32_t addr);
> diff --git a/hw/vmware_vga.c b/hw/vmware_vga.c
> index 1dfa875..82e2a1c 100644
> --- a/hw/vmware_vga.c
> +++ b/hw/vmware_vga.c
> @@ -1148,12 +1148,11 @@ static void pci_vmsvga_map_mem(PCIDevice *pci_dev, int region_num,
>     struct vmsvga_state_s *s = &d->chip;
>
>     s->vram_base = addr;
> -    cpu_register_physical_memory(s->vram_base, s->vga.vram_size,
> -                                 s->vga.vram_offset | IO_MEM_RAM);
> +    cpu_register_physical_memory_log(s->vram_base, s->vga.vram_size,
> +                                     s->vga.vram_offset | IO_MEM_RAM, 0, true);
>
>     s->vga.map_addr = addr;
>     s->vga.map_end = addr + s->vga.vram_size;
> -    vga_dirty_log_restart(&s->vga);
>  }
>
>  static void pci_vmsvga_map_fifo(PCIDevice *pci_dev, int region_num,
> --
> 1.7.1
>
>
>

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [Qemu-devel] [PATCH 08/13] vmware-vga: Register reset service
  2011-06-14 16:53 ` [Qemu-devel] [PATCH 08/13] vmware-vga: Register reset service Jan Kiszka
@ 2011-06-15 23:55   ` andrzej zaborowski
  0 siblings, 0 replies; 28+ messages in thread
From: andrzej zaborowski @ 2011-06-15 23:55 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Anthony Liguori, qemu-devel

On 14 June 2011 18:53, Jan Kiszka <jan.kiszka@siemens.com> wrote:
> Fixes cold reset in vmware graphic modes.
>
> CC: Andrzej Zaborowski <balrog@zabor.org>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Andrzej Zaborowski <balrogg@gmail.com>
> ---
>  hw/vmware_vga.c |    9 ++++++---
>  1 files changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/hw/vmware_vga.c b/hw/vmware_vga.c
> index 93b8811..c20f154 100644
> --- a/hw/vmware_vga.c
> +++ b/hw/vmware_vga.c
> @@ -966,8 +966,12 @@ static void vmsvga_update_display(void *opaque)
>     }
>  }
>
> -static void vmsvga_reset(struct vmsvga_state_s *s)
> +static void vmsvga_reset(DeviceState *dev)
>  {
> +    struct pci_vmsvga_state_s *pci =
> +        DO_UPCAST(struct pci_vmsvga_state_s, card.qdev, dev);
> +    struct vmsvga_state_s *s = &pci->chip;
> +
>     s->index = 0;
>     s->enable = 0;
>     s->config = 0;
> @@ -1117,8 +1121,6 @@ static void vmsvga_init(struct vmsvga_state_s *s, int vga_ram_size)
>     vga_common_init(&s->vga, vga_ram_size);
>     vga_init(&s->vga);
>     vmstate_register(NULL, 0, &vmstate_vga_common, &s->vga);
> -
> -    vmsvga_reset(s);
>  }
>
>  static void pci_vmsvga_map_ioport(PCIDevice *pci_dev, int region_num,
> @@ -1207,6 +1209,7 @@ static PCIDeviceInfo vmsvga_info = {
>     .qdev.name    = "vmware-svga",
>     .qdev.size    = sizeof(struct pci_vmsvga_state_s),
>     .qdev.vmsd    = &vmstate_vmware_vga,
> +    .qdev.reset   = vmsvga_reset,
>     .no_hotplug   = 1,
>     .init         = pci_vmsvga_initfn,
>     .romfile      = "vgabios-vmware.bin",
> --
> 1.7.1
>
>
>

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [Qemu-devel] [PATCH 07/13] vmware_vga: Do not enable dirty logging when in SVGA mode
  2011-06-14 16:53 ` [Qemu-devel] [PATCH 07/13] vmware_vga: Do not enable dirty logging when in SVGA mode Jan Kiszka
@ 2011-06-16  0:06   ` andrzej zaborowski
  0 siblings, 0 replies; 28+ messages in thread
From: andrzej zaborowski @ 2011-06-16  0:06 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Anthony Liguori, qemu-devel

On 14 June 2011 18:53, Jan Kiszka <jan.kiszka@siemens.com> wrote:
> Just like on SVGA_REG_ENABLE changes, keep dirty logging off on PCI BAR
> remappings when SVGA mode is on.
>
> CC: Andrzej Zaborowski <balrog@zabor.org>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Andrzej Zaborowski <balrogg@gmail.com>
> ---
>  hw/vmware_vga.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/hw/vmware_vga.c b/hw/vmware_vga.c
> index 82e2a1c..93b8811 100644
> --- a/hw/vmware_vga.c
> +++ b/hw/vmware_vga.c
> @@ -1149,7 +1149,8 @@ static void pci_vmsvga_map_mem(PCIDevice *pci_dev, int region_num,
>
>     s->vram_base = addr;
>     cpu_register_physical_memory_log(s->vram_base, s->vga.vram_size,
> -                                     s->vga.vram_offset | IO_MEM_RAM, 0, true);
> +                                     s->vga.vram_offset | IO_MEM_RAM, 0,
> +                                     !s->enable);
>
>     s->vga.map_addr = addr;
>     s->vga.map_end = addr + s->vga.vram_size;
> --
> 1.7.1
>
>
>

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [Qemu-devel] [PATCH 09/13] vmware-vga: Use cpu_register_physical_memory_log for dirty log enabling
  2011-06-14 16:53 ` [Qemu-devel] [PATCH 09/13] vmware-vga: Use cpu_register_physical_memory_log for dirty log enabling Jan Kiszka
@ 2011-06-16  0:06   ` andrzej zaborowski
  0 siblings, 0 replies; 28+ messages in thread
From: andrzej zaborowski @ 2011-06-16  0:06 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Anthony Liguori, qemu-devel

On 14 June 2011 18:53, Jan Kiszka <jan.kiszka@siemens.com> wrote:
> This eliminates the last user of vga_dirty_log_start/start.
>
> CC: Andrzej Zaborowski <balrog@zabor.org>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Andrzej Zaborowski <balrogg@gmail.com>
> ---
>  hw/vmware_vga.c |   12 +++++++-----
>  1 files changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/hw/vmware_vga.c b/hw/vmware_vga.c
> index c20f154..7cb0c28 100644
> --- a/hw/vmware_vga.c
> +++ b/hw/vmware_vga.c
> @@ -828,9 +828,13 @@ static void vmsvga_value_write(void *opaque, uint32_t address, uint32_t value)
>         s->vga.invalidate(&s->vga);
>         if (s->enable) {
>             s->fb_size = ((s->depth + 7) >> 3) * s->new_width * s->new_height;
> -            vga_dirty_log_stop(&s->vga);
> -        } else {
> -            vga_dirty_log_start(&s->vga);
> +            cpu_register_physical_memory_log(s->vram_base, s->vga.vram_size,
> +                                             s->vga.vram_offset | IO_MEM_RAM,
> +                                             0, false);
> +        } else if (s->vram_base) {
> +            cpu_register_physical_memory_log(s->vram_base, s->vga.vram_size,
> +                                             s->vga.vram_offset | IO_MEM_RAM,
> +                                             0, true);
>         }
>         break;
>
> @@ -1011,8 +1015,6 @@ static void vmsvga_reset(DeviceState *dev)
>         break;
>     }
>     s->syncing = 0;
> -
> -    vga_dirty_log_start(&s->vga);
>  }
>
>  static void vmsvga_invalidate_display(void *opaque)
> --
> 1.7.1
>
>
>

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [Qemu-devel] [PATCH v2 10/13] Drop dirty log start/stop infrastructure
  2011-06-14 16:53 ` [Qemu-devel] [PATCH 10/13] Drop dirty log start/stop infrastructure Jan Kiszka
@ 2011-06-23 11:09   ` Jan Kiszka
  2011-06-23 11:53     ` Avi Kivity
  0 siblings, 1 reply; 28+ messages in thread
From: Jan Kiszka @ 2011-06-23 11:09 UTC (permalink / raw)
  To: Anthony Liguori, qemu-devel
  Cc: Anthony PERARD, Avi Kivity, Michael S. Tsirkin

From: Jan Kiszka <jan.kiszka@siemens.com>

No more users of vga_dirty_log_start/start, thus also no use anymore for
the log_start/stop CPUPhysMemoryClient callbacks. Drop the whole
infrastructure.

CC: Anthony PERARD <anthony.perard@citrix.com>
CC: Michael S. Tsirkin <mst@redhat.com>
CC: Avi Kivity <avi@redhat.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

Changes in v2:
 - rebased over master, removing the freshly added Xen hooks

Avi, does this match your plans for a new memory API? Or would be end up
reintroducing such callbacks after the refactoring?
---
 cpu-all.h    |    6 ------
 cpu-common.h |    4 ----
 exec.c       |   30 ------------------------------
 hw/vga.c     |   36 ------------------------------------
 hw/vga_int.h |    3 ---
 hw/vhost.c   |    2 --
 kvm-all.c    |   47 -----------------------------------------------
 xen-all.c    |   18 ------------------
 8 files changed, 0 insertions(+), 146 deletions(-)

diff --git a/cpu-all.h b/cpu-all.h
index 880f570..ac81a07 100644
--- a/cpu-all.h
+++ b/cpu-all.h
@@ -1015,12 +1015,6 @@ int cpu_physical_memory_get_dirty_tracking(void);
 int cpu_physical_sync_dirty_bitmap(target_phys_addr_t start_addr,
                                    target_phys_addr_t end_addr);
 
-int cpu_physical_log_start(target_phys_addr_t start_addr,
-                           ram_addr_t size);
-
-int cpu_physical_log_stop(target_phys_addr_t start_addr,
-                          ram_addr_t size);
-
 void dump_exec_info(FILE *f, fprintf_function cpu_fprintf);
 #endif /* !CONFIG_USER_ONLY */
 
diff --git a/cpu-common.h b/cpu-common.h
index b027e43..07379c5 100644
--- a/cpu-common.h
+++ b/cpu-common.h
@@ -112,10 +112,6 @@ struct CPUPhysMemoryClient {
                              target_phys_addr_t end_addr);
     int (*migration_log)(struct CPUPhysMemoryClient *client,
                          int enable);
-    int (*log_start)(struct CPUPhysMemoryClient *client,
-                     target_phys_addr_t phys_addr, ram_addr_t size);
-    int (*log_stop)(struct CPUPhysMemoryClient *client,
-                    target_phys_addr_t phys_addr, ram_addr_t size);
     QLIST_ENTRY(CPUPhysMemoryClient) list;
 };
 
diff --git a/exec.c b/exec.c
index b03b5be..56b95ab 100644
--- a/exec.c
+++ b/exec.c
@@ -2127,36 +2127,6 @@ int cpu_physical_sync_dirty_bitmap(target_phys_addr_t start_addr,
     return ret;
 }
 
-int cpu_physical_log_start(target_phys_addr_t start_addr,
-                           ram_addr_t size)
-{
-    CPUPhysMemoryClient *client;
-    QLIST_FOREACH(client, &memory_client_list, list) {
-        if (client->log_start) {
-            int r = client->log_start(client, start_addr, size);
-            if (r < 0) {
-                return r;
-            }
-        }
-    }
-    return 0;
-}
-
-int cpu_physical_log_stop(target_phys_addr_t start_addr,
-                          ram_addr_t size)
-{
-    CPUPhysMemoryClient *client;
-    QLIST_FOREACH(client, &memory_client_list, list) {
-        if (client->log_stop) {
-            int r = client->log_stop(client, start_addr, size);
-            if (r < 0) {
-                return r;
-            }
-        }
-    }
-    return 0;
-}
-
 static inline void tlb_update_dirty(CPUTLBEntry *tlb_entry)
 {
     ram_addr_t ram_addr;
diff --git a/hw/vga.c b/hw/vga.c
index fdfa3c4..a74f581 100644
--- a/hw/vga.c
+++ b/hw/vga.c
@@ -1570,42 +1570,6 @@ static void vga_sync_dirty_bitmap(VGACommonState *s)
 
 }
 
-void vga_dirty_log_start(VGACommonState *s)
-{
-    if (s->map_addr) {
-        cpu_physical_log_start(s->map_addr, s->map_end - s->map_addr);
-    }
-
-    if (s->lfb_vram_mapped) {
-        cpu_physical_log_start(isa_mem_base + 0xa0000, 0x8000);
-        cpu_physical_log_start(isa_mem_base + 0xa8000, 0x8000);
-    }
-
-#ifdef CONFIG_BOCHS_VBE
-    if (s->vbe_mapped) {
-        cpu_physical_log_start(VBE_DISPI_LFB_PHYSICAL_ADDRESS, s->vram_size);
-    }
-#endif
-}
-
-void vga_dirty_log_stop(VGACommonState *s)
-{
-    if (s->map_addr) {
-        cpu_physical_log_stop(s->map_addr, s->map_end - s->map_addr);
-    }
-
-    if (s->lfb_vram_mapped) {
-        cpu_physical_log_stop(isa_mem_base + 0xa0000, 0x8000);
-        cpu_physical_log_stop(isa_mem_base + 0xa8000, 0x8000);
-    }
-
-#ifdef CONFIG_BOCHS_VBE
-    if (s->vbe_mapped) {
-        cpu_physical_log_stop(VBE_DISPI_LFB_PHYSICAL_ADDRESS, s->vram_size);
-    }
-#endif
-}
-
 /*
  * graphic modes
  */
diff --git a/hw/vga_int.h b/hw/vga_int.h
index 5cd9a6e..73328c2 100644
--- a/hw/vga_int.h
+++ b/hw/vga_int.h
@@ -194,9 +194,6 @@ void vga_init(VGACommonState *s);
 int vga_init_io(VGACommonState *s);
 void vga_common_reset(VGACommonState *s);
 
-void vga_dirty_log_start(VGACommonState *s);
-void vga_dirty_log_stop(VGACommonState *s);
-
 extern const VMStateDescription vmstate_vga_common;
 uint32_t vga_ioport_read(void *opaque, uint32_t addr);
 void vga_ioport_write(void *opaque, uint32_t addr, uint32_t val);
diff --git a/hw/vhost.c b/hw/vhost.c
index 80f771e..b7e6284 100644
--- a/hw/vhost.c
+++ b/hw/vhost.c
@@ -668,8 +668,6 @@ int vhost_dev_init(struct vhost_dev *hdev, int devfd, bool force)
     hdev->client.set_memory = vhost_client_set_memory;
     hdev->client.sync_dirty_bitmap = vhost_client_sync_dirty_bitmap;
     hdev->client.migration_log = vhost_client_migration_log;
-    hdev->client.log_start = NULL;
-    hdev->client.log_stop = NULL;
     hdev->mem = qemu_mallocz(offsetof(struct vhost_memory, regions));
     hdev->log = NULL;
     hdev->log_size = 0;
diff --git a/kvm-all.c b/kvm-all.c
index cbc2532..c95a64d 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -100,24 +100,6 @@ static KVMSlot *kvm_alloc_slot(KVMState *s)
     abort();
 }
 
-static KVMSlot *kvm_lookup_matching_slot(KVMState *s,
-                                         target_phys_addr_t start_addr,
-                                         target_phys_addr_t end_addr)
-{
-    int i;
-
-    for (i = 0; i < ARRAY_SIZE(s->slots); i++) {
-        KVMSlot *mem = &s->slots[i];
-
-        if (start_addr == mem->start_addr &&
-            end_addr == mem->start_addr + mem->memory_size) {
-            return mem;
-        }
-    }
-
-    return NULL;
-}
-
 /*
  * Find overlapping slot with lowest start address
  */
@@ -274,33 +256,6 @@ static int kvm_slot_dirty_pages_log_change(KVMSlot *mem, bool log_dirty)
     return kvm_set_user_memory_region(s, mem);
 }
 
-static int kvm_dirty_pages_log_change(target_phys_addr_t phys_addr,
-                                      ram_addr_t size, bool log_dirty)
-{
-    KVMState *s = kvm_state;
-    KVMSlot *mem = kvm_lookup_matching_slot(s, phys_addr, phys_addr + size);
-
-    if (mem == NULL)  {
-        fprintf(stderr, "BUG: %s: invalid parameters " TARGET_FMT_plx "-"
-                TARGET_FMT_plx "\n", __func__, phys_addr,
-                (target_phys_addr_t)(phys_addr + size - 1));
-        return -EINVAL;
-    }
-    return kvm_slot_dirty_pages_log_change(mem, log_dirty);
-}
-
-static int kvm_log_start(CPUPhysMemoryClient *client,
-                         target_phys_addr_t phys_addr, ram_addr_t size)
-{
-    return kvm_dirty_pages_log_change(phys_addr, size, true);
-}
-
-static int kvm_log_stop(CPUPhysMemoryClient *client,
-                        target_phys_addr_t phys_addr, ram_addr_t size)
-{
-    return kvm_dirty_pages_log_change(phys_addr, size, false);
-}
-
 static int kvm_set_migration_log(int enable)
 {
     KVMState *s = kvm_state;
@@ -679,8 +634,6 @@ static CPUPhysMemoryClient kvm_cpu_phys_memory_client = {
     .set_memory = kvm_client_set_memory,
     .sync_dirty_bitmap = kvm_client_sync_dirty_bitmap,
     .migration_log = kvm_client_migration_log,
-    .log_start = kvm_log_start,
-    .log_stop = kvm_log_stop,
 };
 
 static void kvm_handle_interrupt(CPUState *env, int mask)
diff --git a/xen-all.c b/xen-all.c
index fcb106f..3c87b36 100644
--- a/xen-all.c
+++ b/xen-all.c
@@ -416,22 +416,6 @@ static int xen_sync_dirty_bitmap(XenIOState *state,
     return 0;
 }
 
-static int xen_log_start(CPUPhysMemoryClient *client, target_phys_addr_t phys_addr, ram_addr_t size)
-{
-    XenIOState *state = container_of(client, XenIOState, client);
-
-    return xen_sync_dirty_bitmap(state, phys_addr, size);
-}
-
-static int xen_log_stop(CPUPhysMemoryClient *client, target_phys_addr_t phys_addr, ram_addr_t size)
-{
-    XenIOState *state = container_of(client, XenIOState, client);
-
-    state->log_for_dirtybit = NULL;
-    /* Disable dirty bit tracking */
-    return xc_hvm_track_dirty_vram(xen_xc, xen_domid, 0, 0, NULL);
-}
-
 static int xen_client_sync_dirty_bitmap(struct CPUPhysMemoryClient *client,
                                         target_phys_addr_t start_addr,
                                         target_phys_addr_t end_addr)
@@ -451,8 +435,6 @@ static CPUPhysMemoryClient xen_cpu_phys_memory_client = {
     .set_memory = xen_client_set_memory,
     .sync_dirty_bitmap = xen_client_sync_dirty_bitmap,
     .migration_log = xen_client_migration_log,
-    .log_start = xen_log_start,
-    .log_stop = xen_log_stop,
 };
 
 /* VCPU Operations, MMIO, IO ring ... */

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* Re: [Qemu-devel] [PATCH 00/13] vga: dirty log cleanup, more linear mapping
  2011-06-14 16:53 [Qemu-devel] [PATCH 00/13] vga: dirty log cleanup, more linear mapping Jan Kiszka
                   ` (12 preceding siblings ...)
  2011-06-14 16:53 ` [Qemu-devel] [PATCH 13/13] vga: Use linear mapping + dirty logging in chain 4 memory access mode Jan Kiszka
@ 2011-06-23 11:11 ` Avi Kivity
  2011-06-23 11:39   ` Jan Kiszka
  13 siblings, 1 reply; 28+ messages in thread
From: Avi Kivity @ 2011-06-23 11:11 UTC (permalink / raw)
  To: Jan Kiszka
  Cc: Anthony Liguori, Andrzej Zaborowski, Michael S. Tsirkin,
	qemu-devel, Gerd Hoffmann, Anthony PERARD

On 06/14/2011 07:53 PM, Jan Kiszka wrote:
> A few optimizations and cleanups I came across when trying to speed up
> slow graphical grub unter non-cirrus vga. This series
>   - eliminates log_start/stop CPUPhysMemoryClient callbacks
>   - accelerates chain 4 vga mode under KVM
>   - fixes reset of vmware-vga
>   - cleans up vmware-vga a bit
>
> At least patch 8 is a candiate for 0.15 and stable.

Yikes, most is all going away with the memory API (except the extra 
acceleration).

-- 
error compiling committee.c: too many arguments to function

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [Qemu-devel] [PATCH 00/13] vga: dirty log cleanup, more linear mapping
  2011-06-23 11:11 ` [Qemu-devel] [PATCH 00/13] vga: dirty log cleanup, more linear mapping Avi Kivity
@ 2011-06-23 11:39   ` Jan Kiszka
  2011-06-23 11:44     ` Avi Kivity
  0 siblings, 1 reply; 28+ messages in thread
From: Jan Kiszka @ 2011-06-23 11:39 UTC (permalink / raw)
  To: Avi Kivity
  Cc: Anthony Liguori, Andrzej Zaborowski, Michael S. Tsirkin,
	qemu-devel, Gerd Hoffmann, Anthony PERARD

[-- Attachment #1: Type: text/plain, Size: 597 bytes --]

On 2011-06-23 13:11, Avi Kivity wrote:
> On 06/14/2011 07:53 PM, Jan Kiszka wrote:
>> A few optimizations and cleanups I came across when trying to speed up
>> slow graphical grub unter non-cirrus vga. This series
>>   - eliminates log_start/stop CPUPhysMemoryClient callbacks
>>   - accelerates chain 4 vga mode under KVM
>>   - fixes reset of vmware-vga
>>   - cleans up vmware-vga a bit
>>
>> At least patch 8 is a candiate for 0.15 and stable.
> 
> Yikes, most is all going away with the memory API (except the extra
> acceleration).

Can't follow yet. What goes away?

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [Qemu-devel] [PATCH 00/13] vga: dirty log cleanup, more linear mapping
  2011-06-23 11:39   ` Jan Kiszka
@ 2011-06-23 11:44     ` Avi Kivity
  2011-06-23 11:52       ` Jan Kiszka
  0 siblings, 1 reply; 28+ messages in thread
From: Avi Kivity @ 2011-06-23 11:44 UTC (permalink / raw)
  To: Jan Kiszka
  Cc: Anthony Liguori, Andrzej Zaborowski, Michael S. Tsirkin,
	qemu-devel, Gerd Hoffmann, Anthony PERARD

On 06/23/2011 02:39 PM, Jan Kiszka wrote:
> On 2011-06-23 13:11, Avi Kivity wrote:
> >  On 06/14/2011 07:53 PM, Jan Kiszka wrote:
> >>  A few optimizations and cleanups I came across when trying to speed up
> >>  slow graphical grub unter non-cirrus vga. This series
> >>    - eliminates log_start/stop CPUPhysMemoryClient callbacks
> >>    - accelerates chain 4 vga mode under KVM
> >>    - fixes reset of vmware-vga
> >>    - cleans up vmware-vga a bit
> >>
> >>  At least patch 8 is a candiate for 0.15 and stable.
> >
> >  Yikes, most is all going away with the memory API (except the extra
> >  acceleration).
>
> Can't follow yet. What goes away?

All the games with starting and stopping the log.  Now you start the log 
on the vram memory region and all the aliases, maps/unmaps, and mode 
changes are handled automatically.

But I didn't get the patches yet, so no idea how much overlap.

-- 
error compiling committee.c: too many arguments to function

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [Qemu-devel] [PATCH 00/13] vga: dirty log cleanup, more linear mapping
  2011-06-23 11:44     ` Avi Kivity
@ 2011-06-23 11:52       ` Jan Kiszka
  2011-06-23 11:54         ` Avi Kivity
  0 siblings, 1 reply; 28+ messages in thread
From: Jan Kiszka @ 2011-06-23 11:52 UTC (permalink / raw)
  To: Avi Kivity
  Cc: Anthony PERARD, Anthony Liguori, Gerd Hoffmann, qemu-devel,
	Michael S. Tsirkin

[-- Attachment #1: Type: text/plain, Size: 1454 bytes --]

On 2011-06-23 13:44, Avi Kivity wrote:
> On 06/23/2011 02:39 PM, Jan Kiszka wrote:
>> On 2011-06-23 13:11, Avi Kivity wrote:
>> >  On 06/14/2011 07:53 PM, Jan Kiszka wrote:
>> >>  A few optimizations and cleanups I came across when trying to
>> speed up
>> >>  slow graphical grub unter non-cirrus vga. This series
>> >>    - eliminates log_start/stop CPUPhysMemoryClient callbacks
>> >>    - accelerates chain 4 vga mode under KVM
>> >>    - fixes reset of vmware-vga
>> >>    - cleans up vmware-vga a bit
>> >>
>> >>  At least patch 8 is a candiate for 0.15 and stable.
>> >
>> >  Yikes, most is all going away with the memory API (except the extra
>> >  acceleration).
>>
>> Can't follow yet. What goes away?
> 
> All the games with starting and stopping the log.

That's what this series does as well (among other things).

That the new API will look different for the devices is clear, also that
it may differ on the listener side. But if your API will not need any
kind of explicit start/stop callbacks for memory clients, then we are
moving in the right direction.

>  Now you start the log
> on the vram memory region and all the aliases, maps/unmaps, and mode
> changes are handled automatically.
> 
> But I didn't get the patches yet, so no idea how much overlap.

The patches were already sent last week, see [1] for the full history.

Jan

[1] http://thread.gmane.org/gmane.comp.emulators.qemu/106150


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [Qemu-devel] [PATCH v2 10/13] Drop dirty log start/stop infrastructure
  2011-06-23 11:09   ` [Qemu-devel] [PATCH v2 " Jan Kiszka
@ 2011-06-23 11:53     ` Avi Kivity
  0 siblings, 0 replies; 28+ messages in thread
From: Avi Kivity @ 2011-06-23 11:53 UTC (permalink / raw)
  To: Jan Kiszka
  Cc: Anthony PERARD, Anthony Liguori, qemu-devel, Michael S. Tsirkin

On 06/23/2011 02:09 PM, Jan Kiszka wrote:
> From: Jan Kiszka<jan.kiszka@siemens.com>
>
> No more users of vga_dirty_log_start/start, thus also no use anymore for
> the log_start/stop CPUPhysMemoryClient callbacks. Drop the whole
> infrastructure.
>
> CC: Anthony PERARD<anthony.perard@citrix.com>
> CC: Michael S. Tsirkin<mst@redhat.com>
> CC: Avi Kivity<avi@redhat.com>
> Signed-off-by: Jan Kiszka<jan.kiszka@siemens.com>
> ---
>
> Changes in v2:
>   - rebased over master, removing the freshly added Xen hooks
>
> Avi, does this match your plans for a new memory API? Or would be end up
> reintroducing such callbacks after the refactoring?

I think we should be fine.

-- 
error compiling committee.c: too many arguments to function

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [Qemu-devel] [PATCH 00/13] vga: dirty log cleanup, more linear mapping
  2011-06-23 11:52       ` Jan Kiszka
@ 2011-06-23 11:54         ` Avi Kivity
  0 siblings, 0 replies; 28+ messages in thread
From: Avi Kivity @ 2011-06-23 11:54 UTC (permalink / raw)
  To: Jan Kiszka
  Cc: Anthony PERARD, Anthony Liguori, Gerd Hoffmann, qemu-devel,
	Michael S. Tsirkin

On 06/23/2011 02:52 PM, Jan Kiszka wrote:
> On 2011-06-23 13:44, Avi Kivity wrote:
> >  On 06/23/2011 02:39 PM, Jan Kiszka wrote:
> >>  On 2011-06-23 13:11, Avi Kivity wrote:
> >>  >   On 06/14/2011 07:53 PM, Jan Kiszka wrote:
> >>  >>   A few optimizations and cleanups I came across when trying to
> >>  speed up
> >>  >>   slow graphical grub unter non-cirrus vga. This series
> >>  >>     - eliminates log_start/stop CPUPhysMemoryClient callbacks
> >>  >>     - accelerates chain 4 vga mode under KVM
> >>  >>     - fixes reset of vmware-vga
> >>  >>     - cleans up vmware-vga a bit
> >>  >>
> >>  >>   At least patch 8 is a candiate for 0.15 and stable.
> >>  >
> >>  >   Yikes, most is all going away with the memory API (except the extra
> >>  >   acceleration).
> >>
> >>  Can't follow yet. What goes away?
> >
> >  All the games with starting and stopping the log.
>
> That's what this series does as well (among other things).
>
> That the new API will look different for the devices is clear, also that
> it may differ on the listener side. But if your API will not need any
> kind of explicit start/stop callbacks for memory clients, then we are
> moving in the right direction.

Yes, looking at them, they certainly match what I'm doing.  Will be fun 
rebasing over them.

> >   Now you start the log
> >  on the vram memory region and all the aliases, maps/unmaps, and mode
> >  changes are handled automatically.
> >
> >  But I didn't get the patches yet, so no idea how much overlap.
>
> The patches were already sent last week, see [1] for the full history.
>
> Jan
>
> [1] http://thread.gmane.org/gmane.comp.emulators.qemu/106150
>

Yeah, I missed them, even though you copied me.

-- 
error compiling committee.c: too many arguments to function

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2011-06-23 11:54 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-14 16:53 [Qemu-devel] [PATCH 00/13] vga: dirty log cleanup, more linear mapping Jan Kiszka
2011-06-14 16:53 ` [Qemu-devel] [PATCH 01/13] spice: Use cpu_register_physical_memory_log for dirty log enabling Jan Kiszka
2011-06-15  6:42   ` Gerd Hoffmann
2011-06-15  7:23     ` [Qemu-devel] [PATCH v2 " Jan Kiszka
2011-06-15  8:50       ` Gerd Hoffmann
2011-06-14 16:53 ` [Qemu-devel] [PATCH 02/13] vga-pci: " Jan Kiszka
2011-06-14 16:53 ` [Qemu-devel] [PATCH 03/13] cirrus-vga: Drop redundant vga_dirty_log_start Jan Kiszka
2011-06-14 16:53 ` [Qemu-devel] [PATCH 04/13] vmware-vga: Disable verbose mode Jan Kiszka
2011-06-14 16:53 ` [Qemu-devel] [PATCH 05/13] vmware-vga: Remove dead DIRECT_VRAM mode Jan Kiszka
2011-06-14 16:53 ` [Qemu-devel] [PATCH 06/13] vmware-vga: Eliminate vga_dirty_log_restart Jan Kiszka
2011-06-15 23:48   ` andrzej zaborowski
2011-06-14 16:53 ` [Qemu-devel] [PATCH 07/13] vmware_vga: Do not enable dirty logging when in SVGA mode Jan Kiszka
2011-06-16  0:06   ` andrzej zaborowski
2011-06-14 16:53 ` [Qemu-devel] [PATCH 08/13] vmware-vga: Register reset service Jan Kiszka
2011-06-15 23:55   ` andrzej zaborowski
2011-06-14 16:53 ` [Qemu-devel] [PATCH 09/13] vmware-vga: Use cpu_register_physical_memory_log for dirty log enabling Jan Kiszka
2011-06-16  0:06   ` andrzej zaborowski
2011-06-14 16:53 ` [Qemu-devel] [PATCH 10/13] Drop dirty log start/stop infrastructure Jan Kiszka
2011-06-23 11:09   ` [Qemu-devel] [PATCH v2 " Jan Kiszka
2011-06-23 11:53     ` Avi Kivity
2011-06-14 16:53 ` [Qemu-devel] [PATCH 11/13] vga: Refactor lfb_vram_mapped to vga_mem_mapped Jan Kiszka
2011-06-14 16:53 ` [Qemu-devel] [PATCH 12/13] vga: Move vga_sync_dirty_bitmap Jan Kiszka
2011-06-14 16:53 ` [Qemu-devel] [PATCH 13/13] vga: Use linear mapping + dirty logging in chain 4 memory access mode Jan Kiszka
2011-06-23 11:11 ` [Qemu-devel] [PATCH 00/13] vga: dirty log cleanup, more linear mapping Avi Kivity
2011-06-23 11:39   ` Jan Kiszka
2011-06-23 11:44     ` Avi Kivity
2011-06-23 11:52       ` Jan Kiszka
2011-06-23 11:54         ` Avi Kivity

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).