arm64: KVM: implement lazy world switch for debug registers
authorMarc Zyngier <marc.zyngier@arm.com>
Wed, 7 May 2014 12:44:49 +0000 (13:44 +0100)
committerChristoffer Dall <christoffer.dall@linaro.org>
Thu, 2 Oct 2014 15:19:04 +0000 (17:19 +0200)
commit44af263503e0e31b1f88ce86df73e467f18e3198
tree5ce45f67b20aab55b6d321f30dba4a185b2ef924
parentc85f50a20b43754698af82b27279ca87cb04bd3a
arm64: KVM: implement lazy world switch for debug registers

Implement switching of the debug registers. While the number
of registers is massive, CPUs usually don't implement them all
(A57 has 6 breakpoints and 4 watchpoints, which gives us a total
of 22 registers "only").

Also, we only save/restore them when MDSCR_EL1 has debug enabled,
or when we've flagged the debug registers as dirty. It means that
most of the time, we only save/restore MDSCR_EL1.

Reviewed-by: Anup Patel <anup.patel@linaro.org>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
(cherry picked from commit b0e626b380872b663918230fafdac128c34fea56)
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
arch/arm64/kernel/asm-offsets.c
arch/arm64/kvm/hyp.S