Re: [PATCH v4 18/43] arm64: RME: Handle realm enter/exit
From: Aneesh Kumar K.V <aneesh.kumar@kernel.org>
Date: 2024-08-22 03:59:07
Also in:
kvm, kvmarm, linux-coco, lkml
From: Aneesh Kumar K.V <aneesh.kumar@kernel.org>
Date: 2024-08-22 03:59:07
Also in:
kvm, kvmarm, linux-coco, lkml
Steven Price [off-list ref] writes:
+ /* Exit to VMM to complete the change */ + kvm_prepare_memory_fault_exit(vcpu, base, top_ipa - base, false, false, + ripas == 1); +
s/1/RMI_RAM ? May be we can make it an enum like rsi_ripas modified arch/arm64/include/asm/rmi_smc.h
@@ -62,9 +62,11 @@ #define RMI_ERROR_REC 3 #define RMI_ERROR_RTT 4 -#define RMI_EMPTY 0 -#define RMI_RAM 1 -#define RMI_DESTROYED 2 +enum rmi_ripas { + RMI_EMPTY, + RMI_RAM, + RMI_DESTROYED, +}; #define RMI_NO_MEASURE_CONTENT 0 #define RMI_MEASURE_CONTENT 1
modified arch/arm64/kvm/rme-exit.c
@@ -112,7 +112,7 @@ static int rec_exit_ripas_change(struct kvm_vcpu *vcpu) /* Exit to VMM to complete the change */ kvm_prepare_memory_fault_exit(vcpu, base, top_ipa - base, false, false, - ripas == 1); + ripas == RMI_RAM); return 0; }