gicv3_iomem_deny_access() incorrectly uses csize (physical CPU
interface size) instead of vsize (virtual CPU interface size) when
calculating the number of pages to deny for the virtual CPU interface
region at vbase.
Fixes: 8300b3377e ("arm/gic: Add a new callback to deny Dom0 access to GIC regions")
Signed-off-by: Michal Orzel <michal.orzel@amd.com>
---
xen/arch/arm/gic-v3.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/arch/arm/gic-v3.c b/xen/arch/arm/gic-v3.c
index b3e104ea4ad0..5641ee870f23 100644
--- a/xen/arch/arm/gic-v3.c
+++ b/xen/arch/arm/gic-v3.c
@@ -1631,7 +1631,7 @@ static int gicv3_iomem_deny_access(struct domain *d)
if ( vbase != INVALID_PADDR )
{
mfn = vbase >> PAGE_SHIFT;
- nr = PFN_UP(csize);
+ nr = PFN_UP(vsize);
return iomem_deny_access(d, mfn, mfn + nr - 1);
}
--
2.43.0
Hi Michal,
> On 9 Apr 2026, at 12:39, Michal Orzel <michal.orzel@amd.com> wrote:
>
> gicv3_iomem_deny_access() incorrectly uses csize (physical CPU
> interface size) instead of vsize (virtual CPU interface size) when
> calculating the number of pages to deny for the virtual CPU interface
> region at vbase.
>
> Fixes: 8300b3377e ("arm/gic: Add a new callback to deny Dom0 access to GIC regions")
> Signed-off-by: Michal Orzel <michal.orzel@amd.com>
> ---
Reviewed-by: Luca Fancellu <luca.fancellu@arm.com>
Cheers,
Luca
On Thu, 9 Apr 2026, Luca Fancellu wrote:
> Hi Michal,
>
> > On 9 Apr 2026, at 12:39, Michal Orzel <michal.orzel@amd.com> wrote:
> >
> > gicv3_iomem_deny_access() incorrectly uses csize (physical CPU
> > interface size) instead of vsize (virtual CPU interface size) when
> > calculating the number of pages to deny for the virtual CPU interface
> > region at vbase.
> >
> > Fixes: 8300b3377e ("arm/gic: Add a new callback to deny Dom0 access to GIC regions")
> > Signed-off-by: Michal Orzel <michal.orzel@amd.com>
> > ---
>
> Reviewed-by: Luca Fancellu <luca.fancellu@arm.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
On 09/04/2026 12:39, Michal Orzel wrote:
> gicv3_iomem_deny_access() incorrectly uses csize (physical CPU
> interface size) instead of vsize (virtual CPU interface size) when
> calculating the number of pages to deny for the virtual CPU interface
> region at vbase.
good catch
>
> Fixes: 8300b3377e ("arm/gic: Add a new callback to deny Dom0 access to GIC regions")
> Signed-off-by: Michal Orzel <michal.orzel@amd.com>
Reviewed-by: Ayan Kumar Halder <ayan.kumar.halder@amd.com>
- Ayan
© 2016 - 2026 Red Hat, Inc.