Unverified Commit 3bbde5bb authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!15141 Add HAOC feature for openEuler-25.03: Isolated Execution Environment(IEE).

Merge Pull Request from: @amjac 
 
1. HAOC: Add support for AArch64 Isolated Execution Environment(IEE).
2. HAOC: Add support for x86 Isolated Execution Environment
 
 
Link:https://gitee.com/openeuler/kernel/pulls/15141

 

Reviewed-by: default avatarZhang Jianhua <chris.zjh@huawei.com>
Reviewed-by: default avatarJason Zeng <jason.zeng@intel.com>
Signed-off-by: default avatarZhang Peng <zhangpeng362@huawei.com>
parents 43ff8bbc 83216175
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2684,3 +2684,5 @@ source "drivers/acpi/Kconfig"

source "arch/arm64/kvm/Kconfig"

source "arch/arm64/kernel/haoc/Kconfig"
+6 −0
Original line number Diff line number Diff line
@@ -771,6 +771,12 @@ CONFIG_ARCH_VCPU_STAT=y
CONFIG_VIRT_VTIMER_IRQ_BYPASS=y
CONFIG_CPU_MITIGATIONS=y

#
# Hardware Assisted OS Compartmentalization(HAOC)
#
CONFIG_IEE=y
# end of Hardware Assisted OS Compartmentalization(HAOC)

#
# General architecture-dependent options
#
+6 −0
Original line number Diff line number Diff line
@@ -25,6 +25,9 @@
#include <asm/pgtable-hwdef.h>
#include <asm/ptrace.h>
#include <asm/thread_info.h>
#ifdef CONFIG_IEE
#include <asm/haoc/iee-asm.h>
#endif

	/*
	 * Provide a wxN alias for each wN register so what we can paste a xN
@@ -491,6 +494,9 @@ alternative_endif
	.macro		load_ttbr1, pgtbl, tmp1, tmp2
	phys_to_ttbr	\tmp1, \pgtbl
	offset_ttbr1 	\tmp1, \tmp2
	#ifdef CONFIG_IEE
	orr \tmp1, \tmp1, #IEE_ASM_ASID
	#endif
	msr		ttbr1_el1, \tmp1
	isb
	.endm
+26 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0 */
/*
 * HAOC feature support
 *
 * Copyright (C) 2025 ZGCLAB
 * Authors: Lyu Jinglin <lvjl2022@zgclab.edu.cn>
 *          Zhang Shiyang <zhangsy2023@zgclab.edu.cn>
 */

#ifndef _LINUX_HAOC_DEF_H
#define _LINUX_HAOC_DEF_H

/* Place the enum entries in the order corresponding to iee_funcs array. */
enum {
	IEE_OP_MEMSET,
	IEE_FLAG_END
};

/* The entry gate of all IEE APIs. The first parameter must be a valid
 * IEE function index.
 */
extern unsigned long long iee_rw_gate(int flag, ...);

#define __iee_code		__section(".iee.text")

#endif
+18 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0 */
/*
 * HAOC feature support
 *
 * Copyright (C) 2025 ZGCLAB
 * Authors: Lyu Jinglin <lvjl2022@zgclab.edu.cn>
 *          Zhang Shiyang <zhangsy2023@zgclab.edu.cn>
 */

#ifndef _LINUX_HAOC_H
#define _LINUX_HAOC_H

#include <linux/types.h>
#include <linux/mm.h>

void _iee_memset(unsigned long __unused, void *ptr, int data, size_t n);

#endif
Loading