From aecad329969210d7b7c2c8205a7770a45c941528 Mon Sep 17 00:00:00 2001 From: Elliot Berman Date: Fri, 24 Jan 2025 13:51:35 -0800 Subject: [PATCH] ANDROID: virt: gunyah: Separate the gunyah_hypercall config symbol Gunyah-aware confidential compute guest virtual machines don't need the code to launch virtual machines, but still need to make hypercalls. Split the gunyah_hypercall module into a separate Kconfig symbol which can be selected by the guest module. Bug: 395833312 Change-Id: Ic2ec7248bd7a85d09a4769b8d74090426b2f56b7 Signed-off-by: Elliot Berman --- arch/arm64/Kbuild | 2 +- arch/arm64/gunyah/Makefile | 2 +- drivers/virt/gunyah/Kconfig | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/arm64/Kbuild b/arch/arm64/Kbuild index ddcb496ce66c..fb93eee26ba9 100644 --- a/arch/arm64/Kbuild +++ b/arch/arm64/Kbuild @@ -3,7 +3,7 @@ obj-y += kernel/ mm/ net/ obj-$(CONFIG_KVM) += kvm/ obj-$(CONFIG_XEN) += xen/ obj-$(subst m,y,$(CONFIG_HYPERV)) += hyperv/ -obj-$(CONFIG_GUNYAH) += gunyah/ +obj-$(CONFIG_GUNYAH_HYPERCALLS) += gunyah/ obj-$(CONFIG_CRYPTO) += crypto/ obj-$(CONFIG_MTK_GZVM) += geniezone/ diff --git a/arch/arm64/gunyah/Makefile b/arch/arm64/gunyah/Makefile index 84f1e38cafb1..0a3a39c3482e 100644 --- a/arch/arm64/gunyah/Makefile +++ b/arch/arm64/gunyah/Makefile @@ -1,3 +1,3 @@ # SPDX-License-Identifier: GPL-2.0 -obj-$(CONFIG_GUNYAH) += gunyah_hypercall.o +obj-$(CONFIG_GUNYAH_HYPERCALLS) += gunyah_hypercall.o diff --git a/drivers/virt/gunyah/Kconfig b/drivers/virt/gunyah/Kconfig index 1a3be28d90d8..fdc546145e26 100644 --- a/drivers/virt/gunyah/Kconfig +++ b/drivers/virt/gunyah/Kconfig @@ -1,11 +1,15 @@ # SPDX-License-Identifier: GPL-2.0-only +config GUNYAH_HYPERCALLS + tristate + config GUNYAH tristate "Gunyah Virtualization drivers" depends on ARM64 select GUNYAH_PLATFORM_HOOKS select AUXILIARY_BUS imply GUNYAH_QCOM_PLATFORM if ARCH_QCOM + select GUNYAH_HYPERCALLS 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