This series is based on linux-next, tag: next-20230512. GenieZone is MediaTek proprietary hypervisor solution, and it is running in EL2 stand alone as a type-I hypervisor. It is a pure EL2 implementation which implies it does not rely any specific host VM, and this behavior improves GenieZone's security as it limits its interface. To enable guest VMs running, a driver (gzvm) is provided for VMM (virtual machine monitor) to operate. Currently, the gzvm driver supports only crosvm. This series supports ioctl interfaces for userspace VMM(eg., crosvm) to operate guest VMs lifecycle, irqchip for virtual interrupt handling, asynchronous notifcation mechanism for VMM. Changes in v3: - Refactor: separate arch/arm64/geniezone/gzvm_arch.c into vm.c/vcpu.c/vgic.c - Remove redundant functions - Fix reviewer's comments Changes in v2: https://lore.kernel.org/all/20230428103622.18291-1-yi-de.wu@xxxxxxxxxxxx/ - Refactor: move to drivers/virt/geniezone - Refactor: decouple arch-dependent and arch-independent - Check pending signal before entering guest context - Fix reviewer's comments v1: https://lore.kernel.org/all/20230413090735.4182-1-yi-de.wu@xxxxxxxxxxxx/ Yi-De Wu (7): docs: geniezone: Introduce GenieZone hypervisor dt-bindings: hypervisor: Add MediaTek GenieZone hypervisor virt: geniezone: Introduce GenieZone hypervisor support virt: geniezone: Add vcpu support virt: geniezone: Add irqchip support for virtual interrupt injection virt: geniezone: Add irqfd support virt: geniezone: Add ioeventfd support .../hypervisor/mediatek,geniezone-hyp.yaml | 31 + Documentation/virt/geniezone/introduction.rst | 34 ++ MAINTAINERS | 13 + arch/arm64/Kbuild | 1 + arch/arm64/geniezone/Makefile | 9 + arch/arm64/geniezone/gzvm_arch_common.h | 95 ++++ arch/arm64/geniezone/vcpu.c | 84 +++ arch/arm64/geniezone/vgic.c | 91 +++ arch/arm64/geniezone/vm.c | 174 ++++++ arch/arm64/include/uapi/asm/gzvm_arch.h | 47 ++ drivers/virt/Kconfig | 2 +- drivers/virt/geniezone/Kconfig | 17 + drivers/virt/geniezone/Makefile | 11 + drivers/virt/geniezone/gzvm_common.h | 12 + drivers/virt/geniezone/gzvm_ioeventfd.c | 263 +++++++++ drivers/virt/geniezone/gzvm_irqchip.c | 13 + drivers/virt/geniezone/gzvm_irqfd.c | 537 ++++++++++++++++++ drivers/virt/geniezone/gzvm_main.c | 151 +++++ drivers/virt/geniezone/gzvm_vcpu.c | 260 +++++++++ drivers/virt/geniezone/gzvm_vm.c | 448 +++++++++++++++ include/linux/gzvm_drv.h | 154 +++++ include/uapi/asm-generic/Kbuild | 1 + include/uapi/asm-generic/gzvm_arch.h | 10 + include/uapi/linux/gzvm.h | 270 +++++++++ 24 files changed, 2727 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/hypervisor/mediatek, geniezone-hyp.yaml create mode 100644 Documentation/virt/geniezone/introduction.rst create mode 100644 arch/arm64/geniezone/Makefile create mode 100644 arch/arm64/geniezone/gzvm_arch_common.h create mode 100644 arch/arm64/geniezone/vcpu.c create mode 100644 arch/arm64/geniezone/vgic.c create mode 100644 arch/arm64/geniezone/vm.c create mode 100644 arch/arm64/include/uapi/asm/gzvm_arch.h create mode 100644 drivers/virt/geniezone/Kconfig create mode 100644 drivers/virt/geniezone/Makefile create mode 100644 drivers/virt/geniezone/gzvm_common.h create mode 100644 drivers/virt/geniezone/gzvm_ioeventfd.c create mode 100644 drivers/virt/geniezone/gzvm_irqchip.c create mode 100644 drivers/virt/geniezone/gzvm_irqfd.c create mode 100644 drivers/virt/geniezone/gzvm_main.c create mode 100644 drivers/virt/geniezone/gzvm_vcpu.c create mode 100644 drivers/virt/geniezone/gzvm_vm.c create mode 100644 include/linux/gzvm_drv.h create mode 100644 include/uapi/asm-generic/gzvm_arch.h create mode 100644 include/uapi/linux/gzvm.h -- 2.18.0