On Arm, we expect read handlers to have the bits above the access size zeroed. vPCI read handlers may return all 1s. Mask off the bits above the access size.
Fixes: 9a5e22b64266 ("xen/arm: check read handler behavior") Signed-off-by: Stewart Hildebrand <stewart.hildebr...@amd.com> --- xen/arch/arm/vpci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/arm/vpci.c b/xen/arch/arm/vpci.c index b63a356bb4a8..3a3ff5d0812c 100644 --- a/xen/arch/arm/vpci.c +++ b/xen/arch/arm/vpci.c @@ -37,7 +37,7 @@ static int vpci_mmio_read(struct vcpu *v, mmio_info_t *info, if ( vpci_ecam_read(sbdf, ECAM_REG_OFFSET(info->gpa), 1U << info->dabt.size, &data) ) { - *r = data; + *r = data & invalid; return 1; } -- 2.49.0