repository: /home/avi/kvm
branch: (no branch)
commit 838920b9b90c936528d908fb65bb1d348157a9f8
Author: Avi Kivity <[EMAIL PROTECTED]>
Date:   Sun Oct 28 15:23:57 2007 +0200

    kvm: qemu: move vga memory map addresses aliases to common code

diff --git a/qemu/hw/cirrus_vga.c b/qemu/hw/cirrus_vga.c
index 1693ed5..f8ce598 100644
--- a/qemu/hw/cirrus_vga.c
+++ b/qemu/hw/cirrus_vga.c
@@ -277,10 +277,6 @@ typedef struct CirrusVGAState {
     int last_hw_cursor_y_end;
     int real_vram_size; /* XXX: suppress that */
     CPUWriteMemoryFunc **cirrus_linear_write;
-#ifdef USE_KVM
-    unsigned long map_addr;
-    unsigned long map_end;
-#endif
 } CirrusVGAState;
 
 typedef struct PCICirrusVGAState {
diff --git a/qemu/hw/vga_int.h b/qemu/hw/vga_int.h
index b10bcd5..f08700e 100644
--- a/qemu/hw/vga_int.h
+++ b/qemu/hw/vga_int.h
@@ -79,6 +79,14 @@
 #define CH_ATTR_SIZE (160 * 100)
 #define VGA_MAX_HEIGHT 2048
 
+#ifdef USE_KVM
+#define VGA_KVM_STATE                          \
+    unsigned long map_addr;                    \
+    unsigned long map_end;
+#else
+#define VGA_KVM_STATE
+#endif
+
 #define VGA_STATE_COMMON                                                \
     uint8_t *vram_ptr;                                                  \
     unsigned long vram_offset;                                          \
@@ -145,7 +153,8 @@
     void (*cursor_draw_line)(struct VGAState *s, uint8_t *d, int y);    \
     /* tell for each page if it has been updated since the last time */ \
     uint32_t last_palette[256];                                         \
-    uint32_t last_ch_attr[CH_ATTR_SIZE]; /* XXX: make it dynamic */
+    uint32_t last_ch_attr[CH_ATTR_SIZE]; /* XXX: make it dynamic */    \
+    VGA_KVM_STATE
 
 
 typedef struct VGAState {
@@ -156,9 +165,6 @@ typedef struct VGAState {
     int32_t  pad1;
     uint32_t aliased_bank_base[2];
     uint32_t aliased_bank_limit[2];
-
-    unsigned long map_addr;
-    unsigned long map_end;
 #endif
 
 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
kvm-commits mailing list
kvm-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-commits

Reply via email to