[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <eeaa95f842a199499970232cca7136fb@kernel.org>
Date: Thu, 16 Nov 2023 16:32:07 +0000
From: Marc Zyngier <maz@...nel.org>
To: Yi-De Wu <yi-de.wu@...iatek.com>
Cc: Yingshiuan Pan <yingshiuan.pan@...iatek.com>,
Ze-Yu Wang <ze-yu.wang@...iatek.com>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>,
Jonathan Corbet <corbet@....net>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>,
Arnd Bergmann <arnd@...db.de>, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org,
David Bradil <dbrazdil@...gle.com>,
Trilok Soni <quic_tsoni@...cinc.com>,
Jade Shih <jades.shih@...iatek.com>,
Ivan Tseng <ivan.tseng@...iatek.com>,
My Chuang <my.chuang@...iatek.com>,
Shawn Hsiao <shawn.hsiao@...iatek.com>,
PeiLun Suei <peilun.suei@...iatek.com>,
Liju Chen <liju-clr.chen@...iatek.com>,
Willix Yeh <chi-shen.yeh@...iatek.com>,
Kevenny Hsieh <kevenny.hsieh@...iatek.com>
Subject: Re: [PATCH v7 03/16] virt: geniezone: Add GenieZone hypervisor driver
On 2023-11-16 15:27, Yi-De Wu wrote:
> From: "Yingshiuan Pan" <yingshiuan.pan@...iatek.com>
>
> GenieZone hypervisor(gzvm) is a type-1 hypervisor that supports various
> virtual machine types and provides security features such as TEE-like
> scenarios and secure boot. It can create guest VMs for security use
> cases and has virtualization capabilities for both platform and
> interrupt. Although the hypervisor can be booted independently, it
> requires the assistance of GenieZone hypervisor kernel driver(gzvm-ko)
> to leverage the ability of Linux kernel for vCPU scheduling, memory
> management, inter-VM communication and virtio backend support.
>
> Add the basic hypervisor driver. Subsequent patches will add more
> supported features to this driver.
>
> Signed-off-by: Yingshiuan Pan <yingshiuan.pan@...iatek.com>
> Signed-off-by: Jerry Wang <ze-yu.wang@...iatek.com>
> Signed-off-by: Liju Chen <liju-clr.chen@...iatek.com>
> Signed-off-by: Yi-De Wu <yi-de.wu@...iatek.com>
> ---
> MAINTAINERS | 3 +
> arch/arm64/Kbuild | 1 +
> arch/arm64/geniezone/Makefile | 9 +++
> arch/arm64/geniezone/gzvm_arch_common.h | 37 ++++++++++
> arch/arm64/geniezone/vm.c | 40 +++++++++++
> drivers/virt/Kconfig | 2 +
> drivers/virt/geniezone/Kconfig | 16 +++++
> drivers/virt/geniezone/Makefile | 10 +++
> drivers/virt/geniezone/gzvm_main.c | 89 +++++++++++++++++++++++++
> include/linux/gzvm_drv.h | 25 +++++++
> 10 files changed, 232 insertions(+)
> create mode 100644 arch/arm64/geniezone/Makefile
> create mode 100644 arch/arm64/geniezone/gzvm_arch_common.h
> create mode 100644 arch/arm64/geniezone/vm.c
> create mode 100644 drivers/virt/geniezone/Kconfig
> create mode 100644 drivers/virt/geniezone/Makefile
> create mode 100644 drivers/virt/geniezone/gzvm_main.c
> create mode 100644 include/linux/gzvm_drv.h
>
[...]
> diff --git a/arch/arm64/geniezone/gzvm_arch_common.h
> b/arch/arm64/geniezone/gzvm_arch_common.h
> new file mode 100644
> index 000000000000..10037013ab91
> --- /dev/null
> +++ b/arch/arm64/geniezone/gzvm_arch_common.h
> @@ -0,0 +1,37 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +/*
> + * Copyright (c) 2023 MediaTek Inc.
> + */
> +
> +#ifndef __GZVM_ARCH_COMMON_H__
> +#define __GZVM_ARCH_COMMON_H__
> +
> +#include <linux/arm-smccc.h>
> +
> +enum {
> + GZVM_FUNC_PROBE = 12,
> + NR_GZVM_FUNC,
> +};
> +
> +#define SMC_ENTITY_MTK 59
> +#define GZVM_FUNCID_START (0x1000)
> +#define GZVM_HCALL_ID(func) \
> + ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL, ARM_SMCCC_SMC_32, \
> + SMC_ENTITY_MTK, (GZVM_FUNCID_START + (func)))
> +
ARM_SMCCC_SMC_32? Really? You never pass a 64bit quantity anywhere?
I'm half tempted to enforce the truncation to 32bit.
M.
--
Jazz is not dead. It just smells funny...
Powered by blists - more mailing lists