[PATCH v8 3/4] kvm: arm64: set io memory s2 pte as normalnc for vfio pci device
Marc Zyngier
maz at kernel.org
Fri Feb 23 09:07:28 PST 2024
On Tue, 20 Feb 2024 07:29:25 +0000,
<ankita at nvidia.com> wrote:
>
> From: Ankit Agrawal <ankita at nvidia.com>
>
> To provide VM with the ability to get device IO memory with NormalNC
> property, map device MMIO in KVM for ARM64 at stage2 as NormalNC.
> Having NormalNC S2 default puts guests in control (based on [1],
> "Combining stage 1 and stage 2 memory type attributes") of device
> MMIO regions memory mappings. The rules are summarized below:
> ([(S1) - stage1], [(S2) - stage 2])
>
> S1 | S2 | Result
> NORMAL-WB | NORMAL-NC | NORMAL-NC
> NORMAL-WT | NORMAL-NC | NORMAL-NC
> NORMAL-NC | NORMAL-NC | NORMAL-NC
> DEVICE<attr> | NORMAL-NC | DEVICE<attr>
>
> Still this cannot be generalized to non PCI devices such as GICv2.
> There is insufficient information and uncertainity in the behavior
> of non PCI driver. A driver must indicate support using the
> new flag VM_ALLOW_ANY_UNCACHED.
>
> Adapt KVM to make use of the flag VM_ALLOW_ANY_UNCACHED as indicator to
> activate the S2 setting to NormalNc.
>
> [1] section D8.5.5 of DDI0487J_a_a-profile_architecture_reference_manual.pdf
>
> Suggested-by: Catalin Marinas <catalin.marinas at arm.com>
> Acked-by: Jason Gunthorpe <jgg at nvidia.com>
> Reviewed-by: Catalin Marinas <catalin.marinas at arm.com>
> Signed-off-by: Ankit Agrawal <ankita at nvidia.com>
Since people have asked for various commit message updates, I'll add
my own: for the KVM/arm64 tree, the convention for the subject line is
"KVM: arm64: Something starting with a capital".
Thanks,
M.
--
Without deviation from the norm, progress is not possible.
More information about the linux-arm-kernel
mailing list