Move common VGAState attributes to VGA_STATE_COMMON
PATCH 1/1 Move common VGAState attributes to VGA_STATE_COMMON
I was told to resend this, so here goes:
vmware_vga.c uses functions in vga.c to do some things. They need to agree on which parts of their state struct is common and which aren't, otherwise they'll overwrite parts of each other's state. This patch makes it so.
--- qemu/hw/cirrus_vga.c | 3 --- qemu/hw/vga_int.h | 17 +++++++---------- 2 files changed, 7 insertions(+), 13 deletions(-)
qemu/hw/cirrus_vga.c +0 -3
@@ -240,9 +240,6 @@ typedef struct CirrusVGAState {int cirrus_mmio_io_addr;unsigned long cirrus_lfb_addr;unsigned long cirrus_lfb_end; -int aliases_enabled; -uint32_t aliased_bank_base[2 ]; -uint32_t aliased_bank_limit[2 ];uint32_t cirrus_addr_mask;uint32_t linear_mmio_mask;uint8_t cirrus_shadow_gr0;
qemu/hw/vga_int.h +7 -10
@@ -145,20 +145,17 @@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 */ \ -unsigned long map_addr; \ -unsigned long map_end; +uint32_t last_ch_attr[CH_ATTR_SIZE ];/* XXX: make it dynamic */ \ +unsigned long map_addr; \ +unsigned long map_end; \ +int32_t aliases_enabled; \ +int32_t pad1; \ +uint32_t aliased_bank_base[2 ]; \ +uint32_t aliased_bank_limit[2 ];typedef struct VGAState { VGA_STATE_COMMON - - int32_t aliases_enabled; -int32_t pad1; -uint32_t aliased_bank_base[2 ]; -uint32_t aliased_bank_limit[2 ]; - - }VGAState ;static inline int c6_to_8 (int v)
Signature · 1 line
1.5.3.8
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
kvm-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel
Quoted 51 lines · Soren Hansen
I was told to resend this, so here goes:
vmware_vga.cuses functions invga.cto do some things. They need to agree on which parts of their state struct is common and which aren't, otherwise they'll overwrite parts of each other's state. This patch makes it so.Signed-off-by Soren Hansen <[email protected]>--- qemu/hw/cirrus_vga.c | 3 --- qemu/hw/vga_int.h | 17 +++++++---------- 2 files changed, 7 insertions(+), 13 deletions(-)qemu/hw/cirrus_vga.c +0
-3@@ -240,9 +240,6 @@ typedef struct CirrusVGAState {int cirrus_mmio_io_addr;unsigned long cirrus_lfb_addr;unsigned long cirrus_lfb_end; -int aliases_enabled; -uint32_t aliased_bank_base[2 ]; -uint32_t aliased_bank_limit[2 ];uint32_t cirrus_addr_mask;uint32_t linear_mmio_mask;uint8_t cirrus_shadow_gr0;qemu/hw/vga_int.h +7
-5@@ -145,20 +145,17 @@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 */ \ -unsigned long map_addr; \ -unsigned long map_end; +uint32_t last_ch_attr[CH_ATTR_SIZE ];/* XXX: make it dynamic */ \ +unsigned long map_addr; \ +unsigned long map_end; \ +int32_t aliases_enabled; \ +int32_t pad1; \ +uint32_t aliased_bank_base[2 ]; \ +uint32_t aliased_bank_limit[2 ]; typedef struct VGAState { VGA_STATE_COMMON - - int32_t aliases_enabled;
qemu/hw/vga_int.h
Quoted 10 lines
qemu/hw/vga_int.h +0
-6-int32_t pad1; -uint32_t aliased_bank_base[2 ]; -uint32_t aliased_bank_limit[2 ]; - - } VGAState;static inline int c6_to_8 (int v) ------------------------------------------------------------------------
it does solve the problem, but the question is does this varibles are really VGA_COMMON varibles?
(well it look like alot of junk went to VGA_COMMON anyway)
Signature · 7 lines
woof. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Quoted 36 lines · Soren Hansen
I was told to resend this, so here goes:
vmware_vga.cuses functions invga.cto do some things. They need to agree on which parts of their state struct is common and which aren't, otherwise they'll overwrite parts of each other's state. This patch makes it so.Signed-off-by Soren Hansen <[email protected]>--- qemu/hw/cirrus_vga.c | 3 --- qemu/hw/vga_int.h | 17 +++++++---------- 2 files changed, 7 insertions(+), 13 deletions(-)qemu/hw/cirrus_vga.c +0
-3@@ -240,9 +240,6 @@ typedef struct CirrusVGAState {int cirrus_mmio_io_addr;unsigned long cirrus_lfb_addr;unsigned long cirrus_lfb_end; -int aliases_enabled; -uint32_t aliased_bank_base[2 ]; -uint32_t aliased_bank_limit[2 ];uint32_t cirrus_addr_mask;uint32_t linear_mmio_mask;uint8_t cirrus_shadow_gr0;qemu/hw/vga_int.h +0
-1@@ -145,20 +145,17 @@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 */ \
qemu/hw/vga_int.h line 155
Quoted 10 lines
qemu/hw/vga_int.h +7
-2-unsigned long map_addr; \ -unsigned long map_end; +uint32_t last_ch_attr[CH_ATTR_SIZE ];/* XXX: make it dynamic */ \ +unsigned long map_addr; \ +unsigned long map_end; \ +int32_t aliases_enabled; \ +int32_t pad1; \ +uint32_t aliased_bank_base[2 ]; \ +uint32_t aliased_bank_limit[2 ];
The changes to last_ch_attr, map_addr, etc. are gratuitous and will cause merge conflicts in the future. Please change only the relevant lines.
Signature · 7 lines
error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
vmware_vga.c uses functions in vga.c to do some things. They need to agree on which parts of their state struct is common and which aren't, otherwise they'll overwrite parts of each other's state. This patch makes it so.
--- qemu/hw/cirrus_vga.c | 3 --- qemu/hw/vga_int.h | 13 +++++-------- 2 files changed, 5 insertions(+), 11 deletions(-)
qemu/hw/cirrus_vga.c +0 -3
@@ -240,9 +240,6 @@ typedef struct CirrusVGAState {int cirrus_mmio_io_addr;unsigned long cirrus_lfb_addr;unsigned long cirrus_lfb_end; -int aliases_enabled; -uint32_t aliased_bank_base[2 ]; -uint32_t aliased_bank_limit[2 ];uint32_t cirrus_addr_mask;uint32_t linear_mmio_mask;uint8_t cirrus_shadow_gr0;
qemu/hw/vga_int.h +5 -8
@@ -147,18 +147,15 @@uint32_t last_palette[256 ]; \uint32_t last_ch_attr[CH_ATTR_SIZE ];/* XXX: make it dynamic */ \unsigned long map_addr; \ -unsigned long map_end; +unsigned long map_end; \ +int32_t aliases_enabled; \ +int32_t pad1; \ +uint32_t aliased_bank_base[2 ]; \ +uint32_t aliased_bank_limit[2 ];typedef struct VGAState { VGA_STATE_COMMON - - int32_t aliases_enabled; -int32_t pad1; -uint32_t aliased_bank_base[2 ]; -uint32_t aliased_bank_limit[2 ]; - - }VGAState ;static inline int c6_to_8 (int v)
Signature · 8 lines
1.5.3.8 -- Soren Hansen Virtualisation specialist Ubuntu Server Team http://www.ubuntu.com/
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
kvm-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel
Quoted 4 lines · Soren Hansen
vmware_vga.cuses functions invga.cto do some things. They need to agree on which parts of their state struct is common and which aren't, otherwise they'll overwrite parts of each other's state. This patch makes it so.
I tried this an hour or so ago (whenever you last mentioned this). Actually I used that patch from:
http://people.ubuntu.com/~soren/0001-Move-common-VGAState-attributes-to-VGA_STATE_COMMON.patch
This does not suffice to get X working under linux for me, though it did get a bit further in that the vga window did resize (but then nothing).
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Avi Kivity
AppliedQuoted 6 lines · Soren Hansen
vmware_vga.cuses functions invga.cto do some things. They need to agree on which parts of their state struct is common and which aren't, otherwise they'll overwrite parts of each other's state. This patch makes it so.
Applied, thanks.
Signature · 7 lines
error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/