Re: [PATCH v4 03/17] arm64: kvm: stop treating register x18 as caller save

From: Marc Zyngier
Date: Mon Nov 04 2019 - 06:04:18 EST


Hi Sami,

On 2019-11-01 23:20, Sami Tolvanen wrote:
From: Ard Biesheuvel <ard.biesheuvel@xxxxxxxxxx>

In preparation of reserving x18, stop treating it as caller save in
the KVM guest entry/exit code. Currently, the code assumes there is
no need to preserve it for the host, given that it would have been
assumed clobbered anyway by the function call to __guest_enter().
Instead, preserve its value and restore it upon return.

Link: https://patchwork.kernel.org/patch/9836891/
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@xxxxxxxxxx>
[Sami: updated commit message, switched from x18 to x29 for the guest
context]
Signed-off-by: Sami Tolvanen <samitolvanen@xxxxxxxxxx>
Reviewed-by: Kees Cook <keescook@xxxxxxxxxxxx>

If you intend for this to be merged via the arm64 tree, please add my

Reviewed-by: Marc Zyngier <marc.zyngier@xxxxxxx>

Thanks,

M.
--
Jazz is not dead. It just smells funny...