[GIT PULL] LoongArch KVM changes for v6.7
LoongArch KVM changes for v6.7
Add LoongArch's KVM support. Loongson 3A5000/3A6000 supports hardware
assisted virtualization. With cpu virtualization, there are separate
hw-supported user mode and kernel mode in guest mode. With memory
virtualization, there are two-level hw mmu table for guest mode and host
mode. Also there is separate hw cpu timer with consant frequency in
guest mode, so that vm can migrate between hosts with different freq.
Currently, we are able to boot LoongArch Linux guests.
Few key aspects of KVM LoongArch added by this series are:
- Enable kvm hardware features when kvm module is loaded.
- Implement VM and vcpu related ioctl interface such as vcpu create,
vcpu run etc. GET_ONE_REG/SET_ONE_REG ioctl commands are use to
get general registers one by one.
- Hardware access about MMU, timer and csr are emulated in kernel.
- Hardwares such as mmio and iocsr device are emulated in user space
such as IPI, irqchips, pci devices etc.