vga: Replace VGA_COMMON with a structure
authorAvi Kivity <avi@redhat.com>
Sun, 3 May 2009 19:25:16 +0000 (22:25 +0300)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 8 May 2009 21:11:38 +0000 (16:11 -0500)
commit4e4d529f723c1fa0f6f60be931cf26b0b0fe9b80
tree1b3d29a0a137dac44efe97ac1e89e2d4ca8676c3
parent3f9d0e6a77d7c111fba2abbc091b4678feac5345
vga: Replace VGA_COMMON with a structure

All VGA devices share a common field subset; currently they do so by
a macro which defines the common fields inline their state structures,
relying on the the common state being placed at offset 0 in the structure.
This makes refactoring the code difficult and requires a lot of error prone
casts.

Replace the macro by a new VGACommonState structure, and the casts by
regular field access and container_of() for upcasts.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/cirrus_vga.c
hw/cirrus_vga_rop.h
hw/cirrus_vga_rop2.h
hw/vga_int.h
hw/vmware_vga.c