# SPDX-License-Identifier: GPL-2.0-only

config GUNYAH
	tristate "Gunyah Virtualization drivers"
	depends on ARM64
	depends on MAILBOX
	select GUNYAH_PLATFORM_HOOKS
	imply GUNYAH_QCOM_PLATFORM if ARCH_QCOM
	help
	  The Gunyah drivers are the helper interfaces that run in a guest VM
	  such as basic inter-VM IPC and signaling mechanisms, and higher level
	  services such as memory/device sharing, IRQ sharing, and so on.

	  Say Y/M here to enable the drivers needed to interact in a Gunyah
	  virtual environment.

config GUNYAH_PLATFORM_HOOKS
	tristate

config GUNYAH_QCOM_PLATFORM
	tristate "Support for Gunyah on Qualcomm platforms"
	depends on GUNYAH
	select GUNYAH_PLATFORM_HOOKS
	select QCOM_SCM
	help
	  Enable support for interacting with Gunyah on Qualcomm
	  platforms. Interaction with Qualcomm firmware requires
	  extra platform-specific support.

	  Say Y/M here to use Gunyah on Qualcomm platforms.

config GUNYAH_VCPU
	tristate "Runnable Gunyah vCPUs"
	depends on GUNYAH
	help
	  Enable kernel support for host-scheduled vCPUs running under Gunyah.
	  When selecting this option, userspace virtual machine managers (VMM)
	  can schedule the guest VM's vCPUs instead of using Gunyah's scheduler.
	  VMMs can also handle stage 2 faults of the vCPUs.

	  Say Y/M here if unsure and you want to support Gunyah VMMs.

config GUNYAH_IRQFD
	tristate "Gunyah irqfd interface"
	depends on GUNYAH
	help
	  Enable kernel support for creating irqfds which can raise an interrupt
	  on Gunyah virtual machine.

	  Say Y/M here if unsure and you want to support Gunyah VMMs.

config GUNYAH_IOEVENTFD
	tristate "Gunyah ioeventfd interface"
	depends on GUNYAH
	help
	  Enable kernel support for creating ioeventfds which can alert userspace
	  when a Gunyah virtual machine accesses a memory address.

	  Say Y/M here if unsure and you want to support Gunyah VMMs.

config GH_CTRL
    tristate "Create Gunyah entries under /sys/hypervisor"
    depends on SYSFS
    select SYS_HYPERVISOR
    help
    The driver provides a facility for controlling gunyah
    hypervisor debug features through sysfs interface
    under /sys/hypervisor/gunyah. One such debug feature
    provides a timer offset between hypervisor and sched clock.
	If you say N, all options in this submenu will be skipped and disabled.

menuconfig GUNYAH_DRIVERS
	bool "Gunyah Virtualization drivers"
	depends on ARM64
	help
	  The Gunyah drivers are the helper interfaces that runs on the
	  virtual machines that provides support such as memory/device
	  sharing, IRQ sharing, IPC/signalling mechanisms, and so on.
	  Say Y here to enable the drivers needed to work on Gunyah
	  virtualization environment.
	  If you say N, all options in this submenu will be skipped and disabled.

if GUNYAH_DRIVERS
config GH_VIRT_WATCHDOG
	tristate "Gunyah Virtual Watchdog Driver"
	depends on QCOM_WDT_CORE
	help
	  This enables the Qualcomm Technologies, Inc. watchdog module for
	  the Gunyah hypervisor. It provides an interface to perform watchdog
	  actions such as setting the bark/bite time and also petting the
	  watchdog in the hypervisor.
endif
