Skip to content
  • Avi Kivity's avatar
    vga: Replace VGA_COMMON with a structure · 4e12cd94
    Avi Kivity authored
    
    
    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: default avatarAvi Kivity <avi@redhat.com>
    Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
    4e12cd94