162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * Ultravisor API.
462306a36Sopenharmony_ci *
562306a36Sopenharmony_ci * Copyright 2019, IBM Corporation.
662306a36Sopenharmony_ci *
762306a36Sopenharmony_ci */
862306a36Sopenharmony_ci#ifndef _ASM_POWERPC_ULTRAVISOR_API_H
962306a36Sopenharmony_ci#define _ASM_POWERPC_ULTRAVISOR_API_H
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ci#include <asm/hvcall.h>
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ci/* Return codes */
1462306a36Sopenharmony_ci#define U_BUSY			H_BUSY
1562306a36Sopenharmony_ci#define U_FUNCTION		H_FUNCTION
1662306a36Sopenharmony_ci#define U_NOT_AVAILABLE		H_NOT_AVAILABLE
1762306a36Sopenharmony_ci#define U_P2			H_P2
1862306a36Sopenharmony_ci#define U_P3			H_P3
1962306a36Sopenharmony_ci#define U_P4			H_P4
2062306a36Sopenharmony_ci#define U_P5			H_P5
2162306a36Sopenharmony_ci#define U_PARAMETER		H_PARAMETER
2262306a36Sopenharmony_ci#define U_PERMISSION		H_PERMISSION
2362306a36Sopenharmony_ci#define U_SUCCESS		H_SUCCESS
2462306a36Sopenharmony_ci
2562306a36Sopenharmony_ci/* opcodes */
2662306a36Sopenharmony_ci#define UV_WRITE_PATE			0xF104
2762306a36Sopenharmony_ci#define UV_RETURN			0xF11C
2862306a36Sopenharmony_ci#define UV_ESM				0xF110
2962306a36Sopenharmony_ci#define UV_REGISTER_MEM_SLOT		0xF120
3062306a36Sopenharmony_ci#define UV_UNREGISTER_MEM_SLOT		0xF124
3162306a36Sopenharmony_ci#define UV_PAGE_IN			0xF128
3262306a36Sopenharmony_ci#define UV_PAGE_OUT			0xF12C
3362306a36Sopenharmony_ci#define UV_SHARE_PAGE			0xF130
3462306a36Sopenharmony_ci#define UV_UNSHARE_PAGE			0xF134
3562306a36Sopenharmony_ci#define UV_UNSHARE_ALL_PAGES		0xF140
3662306a36Sopenharmony_ci#define UV_PAGE_INVAL			0xF138
3762306a36Sopenharmony_ci#define UV_SVM_TERMINATE		0xF13C
3862306a36Sopenharmony_ci
3962306a36Sopenharmony_ci#endif /* _ASM_POWERPC_ULTRAVISOR_API_H */
40