powerpc/pseries: Introduce option to build secure virtual machines
authorThiago Jung Bauermann <bauerman@linux.ibm.com>
Tue, 20 Aug 2019 02:13:12 +0000 (23:13 -0300)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 29 Aug 2019 23:53:28 +0000 (09:53 +1000)
Introduce CONFIG_PPC_SVM to control support for secure guests and include
Ultravisor-related helpers when it is selected

Signed-off-by: Thiago Jung Bauermann <bauerman@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20190820021326.6884-3-bauerman@linux.ibm.com
arch/powerpc/include/asm/asm-prototypes.h
arch/powerpc/kernel/Makefile
arch/powerpc/platforms/pseries/Kconfig

index e698f48cbc6d2ad1de0b00461968e76e1408058e..49196d35e3bbf5eaec297e0a6e83a2b8fa199cdb 100644 (file)
@@ -36,7 +36,7 @@ void __trace_hcall_entry(unsigned long opcode, unsigned long *args);
 void __trace_hcall_exit(long opcode, long retval, unsigned long *retbuf);
 
 /* Ultravisor */
-#ifdef CONFIG_PPC_POWERNV
+#if defined(CONFIG_PPC_POWERNV) || defined(CONFIG_PPC_SVM)
 long ucall_norets(unsigned long opcode, ...);
 #else
 static inline long ucall_norets(unsigned long opcode, ...)
index 934e64b2889443d0f9e8ecd82e16f85be2de9502..c6ae0e7914bcc9eaa4916b63b240b026929ba9fd 100644 (file)
@@ -156,7 +156,9 @@ endif
 
 obj-$(CONFIG_EPAPR_PARAVIRT)   += epapr_paravirt.o epapr_hcalls.o
 obj-$(CONFIG_KVM_GUEST)                += kvm.o kvm_emul.o
-obj-$(CONFIG_PPC_POWERNV)      += ucall.o
+ifneq ($(CONFIG_PPC_POWERNV)$(CONFIG_PPC_SVM),)
+obj-y                          += ucall.o
+endif
 
 # Disable GCOV, KCOV & sanitizers in odd or sensitive code
 GCOV_PROFILE_prom_init.o := n
index f7b484f55553bc1645ebfeee99a362a4eb105649..d09deb05bb6627e19c6732fc857d4cf06761767b 100644 (file)
@@ -145,3 +145,14 @@ config PAPR_SCM
        tristate "Support for the PAPR Storage Class Memory interface"
        help
          Enable access to hypervisor provided storage class memory.
+
+config PPC_SVM
+       bool "Secure virtual machine (SVM) support for POWER"
+       depends on PPC_PSERIES
+       help
+        There are certain POWER platforms which support secure guests using
+        the Protected Execution Facility, with the help of an Ultravisor
+        executing below the hypervisor layer. This enables support for
+        those guests.
+
+        If unsure, say "N".