• D
    spapr: Introduce DRC subclasses · 2d335818
    David Gibson 提交于
    Currently we only have a single QOM type for all DRCs, but lots of
    places where we switch behaviour based on the DRC's PAPR defined type.
    This is a poor use of our existing type system.
    
    So, instead create QOM subclasses for each PAPR defined DRC type.  We
    also introduce intermediate subclasses for physical and logical DRCs,
    a division which will be useful later on.
    
    Instead of being stored in the DRC object itself, the PAPR type is now
    stored in the class structure.  There are still many places where we
    switch directly on the PAPR type value, but this at least provides the
    basis to start to remove those.
    Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
    Reviewed-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
    Acked-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
    2d335818
spapr_drc.c 43.1 KB