# SPDX-License-Identifier: GPL-2.0
#
# Hypervisor Enforced Kernel Integrity (Heki)
#

config HEKI
	bool "Hypervisor Enforced Kernel Integrity"
	select KVM_GENERIC_MEMORY_ATTRIBUTES
	depends on ARCH_SUPPORTS_HEKI && HYPERVISOR_SUPPORTS_HEKI
	depends on !X86_16BIT && !JUMP_LABEL
	help
	  This feature enhances guest virtual machine security by taking
	  advantage of security features provided by the hypervisor for guests.
	  This feature is helpful in maintaining guest virtual machine security
	  even after the guest kernel has been compromised.

config ARCH_SUPPORTS_HEKI
	bool "Architecture support for Heki"
	help
	  An architecture should select this when it can successfully build
	  and run with CONFIG_HEKI. That is, it should provide all of the
	  architecture support required for the HEKI feature.

config HYPERVISOR_SUPPORTS_HEKI
	bool "Hypervisor support for Heki"
	help
	  A hypervisor should select this when it can successfully build
	  and run with CONFIG_HEKI. That is, it should provide all of the
	  hypervisor support required for the Heki feature.

config HEKI_TEST
	bool "Tests for Heki" if !KUNIT_ALL_TESTS
	depends on HEKI_GUEST && KUNIT=y
	default KUNIT_ALL_TESTS
	help
	  Run Heki tests at runtime according to the heki_test=N boot
	  parameter, with N identifying the test to run (between 1 and 4).

	  Before launching the init process, the system might not respond
	  because of unhandled kernel page fault.  This will be fixed in a
	  next patch series.
