• Ard Biesheuvel's avatar
    arm64: KVM: Describe data or unified caches as having 1 set and 1 way · 793acf87
    Ard Biesheuvel authored
    On SMP ARM systems, cache maintenance by set/way should only ever be
    done in the context of onlining or offlining CPUs, which is typically
    done by bare metal firmware and never in a virtual machine. For this
    reason, we trap set/way cache maintenance operations and replace them
    with conditional flushing of the entire guest address space.
    
    Due to this trapping, the set/way arguments passed into the set/way
    ops are completely ignored, and thus irrelevant. This also means that
    the set/way geometry is equally irrelevant, and we can simply report
    it as 1 set and 1 way, so that legacy 32-bit ARM system software (i.e.,
    the kind that only receives odd fixes) doesn't take a performance hit
    due to the trapping when iterating over the cachelines.
    Acked-by: default avatarChristoffer Dall <christoffer.dall@arm.com>
    Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
    Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
    793acf87
kvm_emulate.h 11.3 KB