From e48193bfcf823495ca24b3df2a127ecac629b03b Mon Sep 17 00:00:00 2001 From: Mostafa Saleh Date: Wed, 14 May 2025 13:25:51 +0000 Subject: [PATCH] ANDROID: KVM: arm64: Reserve all args for req_mmio Make unused args for ARM_SMCCC_KVM_FUNC_DEV_REQ_MMIO to be 0 as they may be used in the future. Bug: 357781595 Change-Id: Iea52c8b623ef8ee732b4799b395e0a112248d2b9 Signed-off-by: Mostafa Saleh --- arch/arm64/kvm/hyp/nvhe/device/device.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/arm64/kvm/hyp/nvhe/device/device.c b/arch/arm64/kvm/hyp/nvhe/device/device.c index d3da14cbad09..36f655b5a7d2 100644 --- a/arch/arm64/kvm/hyp/nvhe/device/device.c +++ b/arch/arm64/kvm/hyp/nvhe/device/device.c @@ -280,8 +280,9 @@ bool pkvm_device_request_mmio(struct pkvm_hyp_vcpu *hyp_vcpu, u64 *exit_code) u64 token; s8 level; - /* arg2 and arg3 reserved for future use. */ - if (smccc_get_arg2(vcpu) || smccc_get_arg3(vcpu) || !PAGE_ALIGNED(ipa)) + /* args 2..6 reserved for future use. */ + if (smccc_get_arg2(vcpu) || smccc_get_arg3(vcpu) || smccc_get_arg4(vcpu) || + smccc_get_arg5(vcpu) || smccc_get_arg6(vcpu) || !PAGE_ALIGNED(ipa)) goto out_inval; ret = pkvm_get_guest_pa_request(hyp_vcpu, ipa, PAGE_SIZE,