Skip to content
  • David Gibson's avatar
    ad99d04c
    target/ppc: Allow cpu compatiblity checks based on type, not instance · ad99d04c
    David Gibson authored
    
    
    ppc_check_compat() is used in a number of places to check if a cpu object
    supports a certain compatiblity mode, subject to various constraints.
    
    It takes a PowerPCCPU *, however it really only depends on the cpu's class.
    We have upcoming cases where it would be useful to make compatibility
    checks before we fully instantiate the cpu objects.
    
    ppc_type_check_compat() will now make an equivalent check, but based on a
    CPU's QOM typename instead of an instantiated CPU object.
    
    We make use of the new interface in several places in spapr, where we're
    essentially making a global check, rather than one specific to a particular
    cpu.  This avoids some ugly uses of first_cpu to grab a "representative"
    instance.
    
    Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
    Reviewed-by: default avatarGreg Kurz <groug@kaod.org>
    Reviewed-by: default avatarCédric Le Goater <clg@kaod.org>
    ad99d04c
    target/ppc: Allow cpu compatiblity checks based on type, not instance
    David Gibson authored
    
    
    ppc_check_compat() is used in a number of places to check if a cpu object
    supports a certain compatiblity mode, subject to various constraints.
    
    It takes a PowerPCCPU *, however it really only depends on the cpu's class.
    We have upcoming cases where it would be useful to make compatibility
    checks before we fully instantiate the cpu objects.
    
    ppc_type_check_compat() will now make an equivalent check, but based on a
    CPU's QOM typename instead of an instantiated CPU object.
    
    We make use of the new interface in several places in spapr, where we're
    essentially making a global check, rather than one specific to a particular
    cpu.  This avoids some ugly uses of first_cpu to grab a "representative"
    instance.
    
    Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
    Reviewed-by: default avatarGreg Kurz <groug@kaod.org>
    Reviewed-by: default avatarCédric Le Goater <clg@kaod.org>
Loading