public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Move common VGAState attributes to VGA_STATE_COMMON
@ 2008-01-30 20:56 Soren Hansen
  0 siblings, 0 replies; 7+ messages in thread
From: Soren Hansen @ 2008-01-30 20:56 UTC (permalink / raw)
  To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f; +Cc: Soren Hansen

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.

Signed-off-by: Soren Hansen <soren-GeWIH/nMZzLQT0dZR+AlfA@public.gmane.org>
---
 qemu/hw/cirrus_vga.c |    3 ---
 qemu/hw/vga_int.h    |   17 +++++++----------
 2 files changed, 7 insertions(+), 13 deletions(-)

diff --git a/qemu/hw/cirrus_vga.c b/qemu/hw/cirrus_vga.c
index 1915c73..35cee6b 100644
--- a/qemu/hw/cirrus_vga.c
+++ b/qemu/hw/cirrus_vga.c
@@ -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;
diff --git a/qemu/hw/vga_int.h b/qemu/hw/vga_int.h
index 912d977..c620ce9 100644
--- a/qemu/hw/vga_int.h
+++ b/qemu/hw/vga_int.h
@@ -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)
-- 
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/

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

* [PATCH] Move common VGAState attributes to VGA_STATE_COMMON
@ 2008-02-11 17:55 Soren Hansen
  2008-02-11 18:02 ` Izik Eidus
  2008-02-12 12:44 ` Avi Kivity
  0 siblings, 2 replies; 7+ messages in thread
From: Soren Hansen @ 2008-02-11 17:55 UTC (permalink / raw)
  To: kvm-devel


[-- Attachment #1.1: Type: text/plain, Size: 2239 bytes --]

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.

Signed-off-by: Soren Hansen <soren@ubuntu.com>
---
 qemu/hw/cirrus_vga.c |    3 ---
 qemu/hw/vga_int.h    |   17 +++++++----------
 2 files changed, 7 insertions(+), 13 deletions(-)

diff --git a/qemu/hw/cirrus_vga.c b/qemu/hw/cirrus_vga.c
index 1915c73..35cee6b 100644
--- a/qemu/hw/cirrus_vga.c
+++ b/qemu/hw/cirrus_vga.c
@@ -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;
diff --git a/qemu/hw/vga_int.h b/qemu/hw/vga_int.h
index 912d977..c620ce9 100644
--- a/qemu/hw/vga_int.h
+++ b/qemu/hw/vga_int.h
@@ -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)
-- 
1.5.3.8

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 228 bytes --]

-------------------------------------------------------------------------
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/

[-- Attachment #3: Type: text/plain, Size: 158 bytes --]

_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

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

* Re: [PATCH] Move common VGAState attributes to VGA_STATE_COMMON
  2008-02-11 17:55 [PATCH] Move common VGAState attributes to VGA_STATE_COMMON Soren Hansen
@ 2008-02-11 18:02 ` Izik Eidus
  2008-02-12 12:44 ` Avi Kivity
  1 sibling, 0 replies; 7+ messages in thread
From: Izik Eidus @ 2008-02-11 18:02 UTC (permalink / raw)
  To: kvm-devel

Soren Hansen wrote:
> 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.
>
> Signed-off-by: Soren Hansen <soren@ubuntu.com>
> ---
>  qemu/hw/cirrus_vga.c |    3 ---
>  qemu/hw/vga_int.h    |   17 +++++++----------
>  2 files changed, 7 insertions(+), 13 deletions(-)
>
> diff --git a/qemu/hw/cirrus_vga.c b/qemu/hw/cirrus_vga.c
> index 1915c73..35cee6b 100644
> --- a/qemu/hw/cirrus_vga.c
> +++ b/qemu/hw/cirrus_vga.c
> @@ -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;
> diff --git a/qemu/hw/vga_int.h b/qemu/hw/vga_int.h
> index 912d977..c620ce9 100644
> --- a/qemu/hw/vga_int.h
> +++ b/qemu/hw/vga_int.h
> @@ -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)
>   
> ------------------------------------------------------------------------

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)

-- 
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/

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

* Re: [PATCH] Move common VGAState attributes to VGA_STATE_COMMON
  2008-02-11 17:55 [PATCH] Move common VGAState attributes to VGA_STATE_COMMON Soren Hansen
  2008-02-11 18:02 ` Izik Eidus
@ 2008-02-12 12:44 ` Avi Kivity
  2008-02-22 10:12   ` Soren Hansen
  1 sibling, 1 reply; 7+ messages in thread
From: Avi Kivity @ 2008-02-12 12:44 UTC (permalink / raw)
  To: kvm-devel

Soren Hansen wrote:
> 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.
>
> Signed-off-by: Soren Hansen <soren@ubuntu.com>
> ---
>  qemu/hw/cirrus_vga.c |    3 ---
>  qemu/hw/vga_int.h    |   17 +++++++----------
>  2 files changed, 7 insertions(+), 13 deletions(-)
>
> diff --git a/qemu/hw/cirrus_vga.c b/qemu/hw/cirrus_vga.c
> index 1915c73..35cee6b 100644
> --- a/qemu/hw/cirrus_vga.c
> +++ b/qemu/hw/cirrus_vga.c
> @@ -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;
> diff --git a/qemu/hw/vga_int.h b/qemu/hw/vga_int.h
> index 912d977..c620ce9 100644
> --- a/qemu/hw/vga_int.h
> +++ b/qemu/hw/vga_int.h
> @@ -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];
>  

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.

-- 
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/

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

* Re: [PATCH] Move common VGAState attributes to VGA_STATE_COMMON
  2008-02-12 12:44 ` Avi Kivity
@ 2008-02-22 10:12   ` Soren Hansen
  2008-02-22 10:16     ` Chris Wedgwood
  2008-02-24  7:29     ` Avi Kivity
  0 siblings, 2 replies; 7+ messages in thread
From: Soren Hansen @ 2008-02-22 10:12 UTC (permalink / raw)
  To: kvm-devel


[-- Attachment #1.1: Type: text/plain, Size: 1983 bytes --]


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.

Signed-off-by: Soren Hansen <soren@ubuntu.com>
---
 qemu/hw/cirrus_vga.c |    3 ---
 qemu/hw/vga_int.h    |   13 +++++--------
 2 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/qemu/hw/cirrus_vga.c b/qemu/hw/cirrus_vga.c
index 43307d8..4bff503 100644
--- a/qemu/hw/cirrus_vga.c
+++ b/qemu/hw/cirrus_vga.c
@@ -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;
diff --git a/qemu/hw/vga_int.h b/qemu/hw/vga_int.h
index 912d977..c5a3992 100644
--- a/qemu/hw/vga_int.h
+++ b/qemu/hw/vga_int.h
@@ -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)
-- 
1.5.3.8


-- 
Soren Hansen
Virtualisation specialist
Ubuntu Server Team
http://www.ubuntu.com/

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 228 bytes --]

-------------------------------------------------------------------------
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/

[-- Attachment #3: Type: text/plain, Size: 158 bytes --]

_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

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

* Re: [PATCH] Move common VGAState attributes to VGA_STATE_COMMON
  2008-02-22 10:12   ` Soren Hansen
@ 2008-02-22 10:16     ` Chris Wedgwood
  2008-02-24  7:29     ` Avi Kivity
  1 sibling, 0 replies; 7+ messages in thread
From: Chris Wedgwood @ 2008-02-22 10:16 UTC (permalink / raw)
  To: kvm-devel

On Fri, Feb 22, 2008 at 11:12:42AM +0100, Soren Hansen wrote:

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

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/

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

* Re: [PATCH] Move common VGAState attributes to VGA_STATE_COMMON
  2008-02-22 10:12   ` Soren Hansen
  2008-02-22 10:16     ` Chris Wedgwood
@ 2008-02-24  7:29     ` Avi Kivity
  1 sibling, 0 replies; 7+ messages in thread
From: Avi Kivity @ 2008-02-24  7:29 UTC (permalink / raw)
  To: kvm-devel

Soren Hansen wrote:
> 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.
>
>   

Applied, thanks.

-- 
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/

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

end of thread, other threads:[~2008-02-24  7:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-11 17:55 [PATCH] Move common VGAState attributes to VGA_STATE_COMMON Soren Hansen
2008-02-11 18:02 ` Izik Eidus
2008-02-12 12:44 ` Avi Kivity
2008-02-22 10:12   ` Soren Hansen
2008-02-22 10:16     ` Chris Wedgwood
2008-02-24  7:29     ` Avi Kivity
  -- strict thread matches above, loose matches on Subject: below --
2008-01-30 20:56 Soren Hansen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox