vga: Fix type of map_addr/end.
PATCH 1/1 vga: Fix type of map_addr/end.
These addresses have been passed through pci_to_cpu_addr, and thus need to be full target_phys_addr_t.
--- hw/vga_int.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
Jan's recent patch series reminded me that I found a related problem in my alpha-softmmu port this past weekend. Note that the slight re-ordering of the members avoids extra padding in the structure due to alignment.
hw/vga_int.h +2 -2
@@ -109,9 +109,9 @@ typedef struct VGACommonState {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 */ +target_phys_addr_t map_addr; +target_phys_addr_t map_end;uint32_t latch;uint8_t sr_index;uint8_t sr[256 ];
Signature · 1 line
1.7.5.2
Quoted 2 lines · Richard Henderson
These addresses have been passed through
pci_to_cpu_addr, and thus need to be fulltarget_phys_addr_t.
Basically correct, but you also need to change the types of lfb_addr/end, no?
Quoted 11 lines
Signed-off-by Richard Henderson <[email protected]>Cc Jan Kiszka <[email protected]>--- hw/vga_int.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)Jan's recent patch series reminded me that I found a related problem in my alpha-softmmu port this past weekend. Note that the slight re-ordering of the members avoids extra padding in the structure due to alignment.
Yeah, and I just noticed a harmless mistyping in my patches while thinking about your type changes.
Jan
Quoted 18 lines
hw/vga_int.h +2
-2@@ -109,9 +109,9 @@ typedef struct VGACommonState {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 */ +target_phys_addr_t map_addr; +target_phys_addr_t map_end;uint32_t latch;uint8_t sr_index;uint8_t sr[256 ];
Signature · 2 lines
Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux
Quoted 6 lines · Jan Kiszka
Quoted 2 lines · Richard Henderson
These addresses have been passed through
pci_to_cpu_addr, and thus need to be fulltarget_phys_addr_t.Basically correct, but you also need to change the types of lfb_addr/end, no?
Ah, yes, I see that path now. Will re-send.
r~