6a9c930bd7
Make the Enter-Secure-Mode (ESM) ultravisor call to switch the VM to secure mode. Pass kernel base address and FDT address so that the Ultravisor is able to verify the integrity of the VM using information from the ESM blob. Add "svm=" command line option to turn on switching to secure mode. Signed-off-by: Ram Pai <linuxram@us.ibm.com> [ andmike: Generate an RTAS os-term hcall when the ESM ucall fails. ] Signed-off-by: Michael Anderson <andmike@linux.ibm.com> [ bauerman: Cleaned up the code a bit. ] 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-5-bauerman@linux.ibm.com
31 lines
643 B
C
31 lines
643 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Ultravisor API.
|
|
*
|
|
* Copyright 2019, IBM Corporation.
|
|
*
|
|
*/
|
|
#ifndef _ASM_POWERPC_ULTRAVISOR_API_H
|
|
#define _ASM_POWERPC_ULTRAVISOR_API_H
|
|
|
|
#include <asm/hvcall.h>
|
|
|
|
/* Return codes */
|
|
#define U_BUSY H_BUSY
|
|
#define U_FUNCTION H_FUNCTION
|
|
#define U_NOT_AVAILABLE H_NOT_AVAILABLE
|
|
#define U_P2 H_P2
|
|
#define U_P3 H_P3
|
|
#define U_P4 H_P4
|
|
#define U_P5 H_P5
|
|
#define U_PARAMETER H_PARAMETER
|
|
#define U_PERMISSION H_PERMISSION
|
|
#define U_SUCCESS H_SUCCESS
|
|
|
|
/* opcodes */
|
|
#define UV_WRITE_PATE 0xF104
|
|
#define UV_RETURN 0xF11C
|
|
#define UV_ESM 0xF110
|
|
|
|
#endif /* _ASM_POWERPC_ULTRAVISOR_API_H */
|