• Marc Zyngier's avatar
    KVM: arm64: Drop FP_FOREIGN_STATE from the hypervisor code · e9ada6c2
    Marc Zyngier authored
    The vcpu KVM_ARM64_FP_FOREIGN_FPSTATE flag tracks the thread's own
    TIF_FOREIGN_FPSTATE so that we can evaluate just before running
    the vcpu whether it the FP regs contain something that is owned
    by the vcpu or not by updating the rest of the FP flags.
    
    We do this in the hypervisor code in order to make sure we're
    in a context where we are not interruptible. But we already
    have a hook in the run loop to generate this flag. We may as
    well update the FP flags directly and save the pointless flag
    tracking.
    
    Whilst we're at it, rename update_fp_enabled() to guest_owns_fp_regs()
    to indicate what the leftover of this helper actually do.
    Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
    Reviewed-by: default avatarReiji Watanabe <reijiw@google.com>
    Reviewed-by: default avatarMark Brown <broonie@kernel.org>
    e9ada6c2
fpsimd.c 6.3 KB