• D
    spapr: Handle VMX/VSX presence as an spapr capability flag · 29386642
    David Gibson 提交于
    We currently have some conditionals in the spapr device tree code to decide
    whether or not to advertise the availability of the VMX (aka Altivec) and
    VSX vector extensions to the guest, based on whether the guest cpu has
    those features.
    
    This can lead to confusion and subtle failures on migration, since it makes
    a guest visible change based only on host capabilities.  We now have a
    better mechanism for this, in spapr capabilities flags, which explicitly
    depend on user options rather than host capabilities.
    
    Rework the advertisement of VSX and VMX based on a new VSX capability.  We
    no longer bother with a conditional for VMX support, because every CPU
    that's ever been supported by the pseries machine type supports VMX.
    
    NOTE: Some userspace distributions (e.g. RHEL7.4) already rely on
    availability of VSX in libc, so using cap-vsx=off may lead to a fatal
    SIGILL in init.
    Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
    Reviewed-by: NGreg Kurz <groug@kaod.org>
    29386642
spapr_caps.c 10.1 KB