[PATCH 5/5] drivers/virt: pkvm: Allow granule larger than PAGE_SIZE
From: Vincent Donnefort
Date: Wed Oct 07 2026 - 11:06:47 EST
Both MEM_SHARE and MMIO_GUARD now support a PAGE_SIZE smaller than the
hypervisor granule. We can relax this restriction.
Signed-off-by: Vincent Donnefort <vdonnefort@xxxxxxxxxx>
---
drivers/virt/coco/pkvm-guest/arm-pkvm-guest.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/virt/coco/pkvm-guest/arm-pkvm-guest.c b/drivers/virt/coco/pkvm-guest/arm-pkvm-guest.c
index 3852be6bd16b..e3363a69a7eb 100644
--- a/drivers/virt/coco/pkvm-guest/arm-pkvm-guest.c
+++ b/drivers/virt/coco/pkvm-guest/arm-pkvm-guest.c
@@ -135,7 +135,7 @@ void __init pkvm_init_hyp_services(void)
arm_smccc_1_1_invoke(ARM_SMCCC_VENDOR_HYP_KVM_HYP_MEMINFO_FUNC_ID,
0, 0, 0, &res);
- if (res.a0 > PAGE_SIZE) /* Includes error codes */
+ if ((long)res.a0 <= 0)
return;
pkvm_granule = res.a0;
--
2.56.0.rc1.315.gc6ed9934b7-goog