• Bertrand Marquis's avatar
    xen/arm: Advertise workaround 1 if we apply 3 · af570d1c
    Bertrand Marquis authored
    
    
    SMCC_WORKAROUND_3 is handling both Spectre v2 and spectre BHB.
    So when a guest is asking if we support workaround 1, tell yes if we
    apply workaround 3 on exception entry as it handles it.
    
    This will allow guests not supporting Spectre BHB but impacted by
    spectre v2 to still handle it correctly.
    The modified behaviour is coherent with what the Linux kernel does in
    KVM for guests.
    
    While there use ARM_SMCCC_SUCCESS instead of 0 for the return code value
    for workaround detection to be coherent with Workaround 2 handling.
    Signed-off-by: default avatarBertrand Marquis <bertrand.marquis@arm.com>
    Acked-by: default avatarJulien Grall <jgrall@amazon.com>
    af570d1c
vsmc.c 9.76 KB