[PATCH v6 01/12] KVM: arm64: Move __get_fault_info() and co into their own include file

Will Deacon will at kernel.org
Thu Sep 30 06:04:38 PDT 2021


On Wed, Sep 22, 2021 at 01:46:53PM +0100, Fuad Tabba wrote:
> From: Marc Zyngier <maz at kernel.org>
> 
> In order to avoid including the whole of the switching helpers
> in unrelated files, move the __get_fault_info() and related helpers
> into their own include file.
> 
> Signed-off-by: Marc Zyngier <maz at kernel.org>
> Signed-off-by: Fuad Tabba <tabba at google.com>
> ---
>  arch/arm64/kvm/hyp/include/hyp/fault.h  | 75 +++++++++++++++++++++++++
>  arch/arm64/kvm/hyp/include/hyp/switch.h | 61 +-------------------
>  arch/arm64/kvm/hyp/nvhe/mem_protect.c   |  2 +-
>  3 files changed, 77 insertions(+), 61 deletions(-)
>  create mode 100644 arch/arm64/kvm/hyp/include/hyp/fault.h
> 
> diff --git a/arch/arm64/kvm/hyp/include/hyp/fault.h b/arch/arm64/kvm/hyp/include/hyp/fault.h
> new file mode 100644
> index 000000000000..1b8a2dcd712f
> --- /dev/null
> +++ b/arch/arm64/kvm/hyp/include/hyp/fault.h
> @@ -0,0 +1,75 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * Copyright (C) 2015 - ARM Ltd
> + * Author: Marc Zyngier <marc.zyngier at arm.com>

May as well fix the broken email address? ^^

> + */
> +
> +#ifndef __ARM64_KVM_HYP_FAULT_H__
> +#define __ARM64_KVM_HYP_FAULT_H__
> +
> +#include <asm/kvm_asm.h>
> +#include <asm/kvm_emulate.h>
> +#include <asm/kvm_hyp.h>
> +#include <asm/kvm_mmu.h>

Strictly speaking, I think you're probably missing a bunch of includes here
(e.g. asm/sysreg.h, asm/kvm_arm.h, asm/cpufeature.h, ...)

Nits aside:

Acked-by: Will Deacon <will at kernel.org>

Will



More information about the linux-arm-kernel mailing list