« Previous | Next » 

Revision 4e12cd94


Added by Avi Kivity over 12 years ago

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

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 <>
Signed-off-by: Anthony Liguori <>


  • added
  • modified
  • copied
  • renamed
  • deleted

View differences