Patchwork [v2] vga: Fix type of lfb/map_addr/end.

login
register
mail settings
Submitter Richard Henderson
Date June 14, 2011, 7:53 p.m.
Message ID <1308081188-19695-1-git-send-email-rth@twiddle.net>
Download mbox | patch
Permalink /patch/100427/
State New
Headers show

Comments

Richard Henderson - June 14, 2011, 7:53 p.m.
These addresses have been passed through pci_to_cpu_addr,
and thus need to be full target_phys_addr_t.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Cc: Jan Kiszka <jan.kiszka@siemens.com>
---

 V1->V2:
	lfb_addr/end also widened to guest address width.

 hw/vga_int.h |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
Jan Kiszka - June 15, 2011, 7:27 a.m.
On 2011-06-14 21:53, Richard Henderson wrote:
> These addresses have been passed through pci_to_cpu_addr,
> and thus need to be full target_phys_addr_t.
> 
> Signed-off-by: Richard Henderson <rth@twiddle.net>
> Cc: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> 
>  V1->V2:
> 	lfb_addr/end also widened to guest address width.
> 
>  hw/vga_int.h |   10 +++++-----
>  1 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/hw/vga_int.h b/hw/vga_int.h
> index d2811bd..eee91a8 100644
> --- a/hw/vga_int.h
> +++ b/hw/vga_int.h
> @@ -106,13 +106,13 @@ typedef void (* vga_update_retrace_info_fn)(struct VGACommonState *s);
>  typedef struct VGACommonState {
>      uint8_t *vram_ptr;
>      ram_addr_t vram_offset;
> +    target_phys_addr_t lfb_addr;
> +    target_phys_addr_t lfb_end;
> +    target_phys_addr_t map_addr;
> +    target_phys_addr_t map_end;
>      uint32_t vram_size;
> -    uint32_t lfb_addr;
> -    uint32_t lfb_end;
> -    uint32_t map_addr;
> -    uint32_t map_end;
> -    uint32_t lfb_vram_mapped; /* whether 0xa0000 is mapped as ram */
>      uint32_t latch;
> +    uint32_t lfb_vram_mapped; /* whether 0xa0000 is mapped as ram */
>      uint8_t sr_index;
>      uint8_t sr[256];
>      uint8_t gr_index;

Acked-by: Jan Kiszka <jan.kiszka@siemens.com>

But one of us will have to rebase at the end of the day.

Jan
Anthony Liguori - July 23, 2011, 4:50 p.m.
On 06/14/2011 02:53 PM, Richard Henderson wrote:
> These addresses have been passed through pci_to_cpu_addr,
> and thus need to be full target_phys_addr_t.
>
> Signed-off-by: Richard Henderson<rth@twiddle.net>
> Cc: Jan Kiszka<jan.kiszka@siemens.com>

Applied.  Thanks.

Regards,

Anthony Liguori

> ---
>
>   V1->V2:
> 	lfb_addr/end also widened to guest address width.
>
>   hw/vga_int.h |   10 +++++-----
>   1 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/hw/vga_int.h b/hw/vga_int.h
> index d2811bd..eee91a8 100644
> --- a/hw/vga_int.h
> +++ b/hw/vga_int.h
> @@ -106,13 +106,13 @@ typedef void (* vga_update_retrace_info_fn)(struct VGACommonState *s);
>   typedef struct VGACommonState {
>       uint8_t *vram_ptr;
>       ram_addr_t vram_offset;
> +    target_phys_addr_t lfb_addr;
> +    target_phys_addr_t lfb_end;
> +    target_phys_addr_t map_addr;
> +    target_phys_addr_t map_end;
>       uint32_t vram_size;
> -    uint32_t lfb_addr;
> -    uint32_t lfb_end;
> -    uint32_t map_addr;
> -    uint32_t map_end;
> -    uint32_t lfb_vram_mapped; /* whether 0xa0000 is mapped as ram */
>       uint32_t latch;
> +    uint32_t lfb_vram_mapped; /* whether 0xa0000 is mapped as ram */
>       uint8_t sr_index;
>       uint8_t sr[256];
>       uint8_t gr_index;

Patch

diff --git a/hw/vga_int.h b/hw/vga_int.h
index d2811bd..eee91a8 100644
--- a/hw/vga_int.h
+++ b/hw/vga_int.h
@@ -106,13 +106,13 @@  typedef void (* vga_update_retrace_info_fn)(struct VGACommonState *s);
 typedef struct VGACommonState {
     uint8_t *vram_ptr;
     ram_addr_t vram_offset;
+    target_phys_addr_t lfb_addr;
+    target_phys_addr_t lfb_end;
+    target_phys_addr_t map_addr;
+    target_phys_addr_t map_end;
     uint32_t vram_size;
-    uint32_t lfb_addr;
-    uint32_t lfb_end;
-    uint32_t map_addr;
-    uint32_t map_end;
-    uint32_t lfb_vram_mapped; /* whether 0xa0000 is mapped as ram */
     uint32_t latch;
+    uint32_t lfb_vram_mapped; /* whether 0xa0000 is mapped as ram */
     uint8_t sr_index;
     uint8_t sr[256];
     uint8_t gr_index;