From: Vincent Donnefort <vdonnefort@google.com>
To: catalin.marinas@arm.com, will@kernel.org, mark.rutland@arm.com
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, kernel-team@android.com,
fuad.tabba@linux.dev, Vincent Donnefort <vdonnefort@google.com>
Subject: [PATCH v2 5/5] drivers/virt: pkvm: Allow granule larger than PAGE_SIZE
Date: Tue, 24 Nov 2026 16:44:46 +0000 [thread overview]
Message-ID: <20261124164446.2371939-6-vdonnefort@google.com> (raw)
In-Reply-To: <20261124164446.2371939-1-vdonnefort@google.com>
Both MEM_SHARE and MMIO_GUARD now support a PAGE_SIZE smaller than the
hypervisor granule. Drop the res.a0 > PAGE_SIZE check in
pkvm_init_hyp_services().
Tested-by: Fuad Tabba <fuad.tabba@linux.dev>
Reviewed-by: Fuad Tabba <fuad.tabba@linux.dev>
Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
---
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.1.809.ga0b61035b5-goog
prev parent reply other threads:[~2026-11-24 16:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 16:44 [PATCH v2 0/5] drivers/virt: pkvm: Protected VMs with PAGE_SIZE smaller than the hypervisor granule Vincent Donnefort
2026-11-24 16:44 ` [PATCH v2 1/5] drivers/virt: pkvm: Make pkvm_init_hyp_services() __init Vincent Donnefort
2026-11-24 16:44 ` [PATCH v2 2/5] drivers/virt: pkvm: Make pkvm_granule __ro_after_init Vincent Donnefort
2026-11-24 16:44 ` [PATCH v2 3/5] drivers/virt: pkvm: Handle a granule larger than PAGE_SIZE for MEM_SHARE Vincent Donnefort
2026-11-24 16:44 ` [PATCH v2 4/5] drivers/virt: pkvm: Handle a granule larger than PAGE_SIZE for MMIO_GUARD Vincent Donnefort
2026-11-24 16:44 ` Vincent Donnefort [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261124164446.2371939-6-vdonnefort@google.com \
--to=vdonnefort@google.com \
--cc=catalin.marinas@arm.com \
--cc=fuad.tabba@linux.dev \
--cc=kernel-team@android.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox