• Marc Zyngier's avatar
    ARM: KVM: perform save/restore of PAR · 6a077e4a
    Marc Zyngier authored
    Not saving PAR is an unfortunate oversight. If the guest performs
    an AT* operation and gets scheduled out before reading the result
    of the translation from PAR, it could become corrupted by another
    guest or the host.
    
    Saving this register is made slightly more complicated as KVM also
    uses it on the permission fault handling path, leading to an ugly
    "stash and restore" sequence. Fortunately, this is already a slow
    path so we don't really care. Also, Linux doesn't do any AT*
    operation, so Linux guests are not impacted by this bug.
    
      [ Slightly tweaked to use an even register as first operand to ldrd
        and strd operations in interrupts_head.S - Christoffer ]
    Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
    Signed-off-by: default avatarChristoffer Dall <christoffer.dall@linaro.org>
    6a077e4a
coproc.c 28.8 KB