summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/kvm/include/powerpc/ppc_asm.h
AgeCommit message (Collapse)Author
2026-10-13KVM: PPC: selftests: add support for powerpcNicholas Piggin
Implement KVM selftests support for powerpc (Book3S-64). ucalls are implemented with an unsupported PAPR hcall number which will always cause KVM to exit to userspace. Virtual memory is implemented for the radix MMU, and only a base page size is supported (both 4K and 64K). Guest interrupts are taken in real-mode, so require a page allocated at gRA 0x0. Interrupt entry is complicated because gVA:gRA is not 1:1 mapped (like the kernel is), so the MMU can not just be switched on and off. This patch series also changes the following types as done in other selftests. These changes are squashed in this main patch as discussed here [1]: - Use u64 instead of uint64_t - Use s64 instead of int64_t - Use u32 instead of uint32_t - Use u8 instead of uint8_t - Replace u64 gpa, u64 gva|vaddr with gpa_t and gva_t - Adopt to the new page table allocator APIs - Start the guest at the entry point and not the descriptor in case of elfv1 [1]: https://lore.kernel.org/linuxppc-dev/cover.1781093720.git.ritesh.list@gmail.com/ [Rebased to latest mainline tree, "cc" to clobber list, fix the size calculation in kvm_arch_vm_post_create()] Co-developed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com> Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Link: https://lore.kernel.org/linuxppc-dev/cover.1781093720.git.ritesh.list@gmail.com/ Tested-by: Anushree Mathur <anushree.mathur@linux.ibm.com> Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com> Reviewed-by: Gautam Menghani <gautam@linux.ibm.com> Tested-by: Gautam Menghani <gautam@linux.ibm.com> Acked-by: Madhavan Srinivasan <maddy@linux.ibm.com> Link: https://patch.msgid.link/062570e96982a9a1a82e95c7ed0a3458321fd569.1791280439.git.ritesh.list@gmail.com Signed-off-by: Sean Christopherson <seanjc@google.com>