Re: [PATCH v5 23/23] KVM: arm64: GICv4.1: Expose HW-based SGIs in debugfs
From: Zenghui Yu <yuzenghui@huawei.com>
Date: 2020-03-20 12:09:27
Also in:
kvm, kvmarm, lkml
From: Zenghui Yu <yuzenghui@huawei.com>
Date: 2020-03-20 12:09:27
Also in:
kvm, kvmarm, lkml
Hi Marc, On 2020/3/20 19:46, Marc Zyngier wrote:
quoted
quoted
Side note: it'd be good to know what the rules are for your own GICv4 implementations, so that we can at least make sure the current code is safe.As far as I know, there will be some clean and invalidate operations when v4.0 VPENDBASER.Valid gets programmed.Interesting. The ideal behaviour would be that the VPT is up-to-date and the caches clean when Valid is cleared (and once Dirty flips to 0).quoted
But not sure about behaviors on VMAPP (unmap), it may be a totally v4.1 stuff. I'll have a talk with our SOC team.The VMAPP stuff is purely v4.1.quoted
But how can the current code be unsafe? Is anywhere in the current code will peek/poke the vpt (whilst GIC continues writing things into it)?No. But on VM termination, the memory will be freed, and will eventually be reallocated. If the GIC can still write to that memory after it has been freed, you end-up with memory corruption... Which is why I'm curious of what ensures that on your implementation.
Ah, I got it. I will check it with HiSilicon people next week and go back to you if the code becomes unsafe due to the incomplete GICv4. Thanks, Zenghui _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel