diff options
| author | Will Deacon <will@kernel.org> | 2024-08-30 14:01:45 +0100 |
|---|---|---|
| committer | Will Deacon <will@kernel.org> | 2024-08-30 16:30:41 +0100 |
| commit | a06c3fad49a50d5d5eb078f93e70f4d3eca5d5a5 (patch) | |
| tree | de34d85241d786ccefe1b4a36e87e96ee6fe5504 /include/linux | |
| parent | 0ba5b4ba61781f1eca843d9e5d499da329a8a275 (diff) | |
| download | linux-a06c3fad49a50d5d5eb078f93e70f4d3eca5d5a5.tar.gz linux-a06c3fad49a50d5d5eb078f93e70f4d3eca5d5a5.tar.bz2 linux-a06c3fad49a50d5d5eb078f93e70f4d3eca5d5a5.zip | |
drivers/virt: pkvm: Add initial support for running as a protected guest
Implement a pKVM protected guest driver to probe the presence of pKVM
and determine the memory protection granule using the HYP_MEMINFO
hypercall.
Acked-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20240830130150.8568-3-will@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/arm-smccc.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/arm-smccc.h b/include/linux/arm-smccc.h index 083f85653716..16b6dcc54e02 100644 --- a/include/linux/arm-smccc.h +++ b/include/linux/arm-smccc.h @@ -115,6 +115,7 @@ /* KVM "vendor specific" services */ #define ARM_SMCCC_KVM_FUNC_FEATURES 0 #define ARM_SMCCC_KVM_FUNC_PTP 1 +#define ARM_SMCCC_KVM_FUNC_HYP_MEMINFO 2 #define ARM_SMCCC_KVM_FUNC_FEATURES_2 127 #define ARM_SMCCC_KVM_NUM_FUNCS 128 @@ -137,6 +138,12 @@ ARM_SMCCC_OWNER_VENDOR_HYP, \ ARM_SMCCC_KVM_FUNC_PTP) +#define ARM_SMCCC_VENDOR_HYP_KVM_HYP_MEMINFO_FUNC_ID \ + ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL, \ + ARM_SMCCC_SMC_64, \ + ARM_SMCCC_OWNER_VENDOR_HYP, \ + ARM_SMCCC_KVM_FUNC_HYP_MEMINFO) + /* ptp_kvm counter type ID */ #define KVM_PTP_VIRT_COUNTER 0 #define KVM_PTP_PHYS_COUNTER 1 |
