Re: [PATCH v4 1/4] KVM: arm64: Include kvm_mmu.h from vgic.h

From: Oliver Upton
Date: Fri Jan 27 2023 - 19:14:59 EST


On Sat, Jan 28, 2023 at 07:51:47AM +0800, Gavin Shan wrote:
> We need a unified helper in 'kvm/vgic/vgic.h' to write guest memory. In
> the helper, the check of no-running-vcpu context for dirty ring will be
> applied. kvm_write_guest_lock(), defined in 'include/asm/kvm_mmu.h', is
> going to be dereferenced by the unified helper.
>
> Include 'include/asm/kvm_mmu.h' to 'kvm/vgic/vgic.h' to avoid including
> the former header file when the later one is needed. With the change,
> the duplicate inclusions of 'include/asm/kvm_mmu.h' are removed.
>
> No functional change intended.
>
> Suggested-by: Oliver Upton <oliver.upton@xxxxxxxxx>

No, I did not suggest for you to do this. I had suggested you just
include asm/kvm_mmu.h from the vgic header, not to go and remove it from
all the files that include vgic.h.

Who cares if kvm_mmu.h gets included twice? Include guards exist for this
exact reason.

--
Thanks,
Oliver