[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen staging] arm/vpci: mask off upper bits in vPCI read mmio handler



commit d13b786e8fd20f08e3eeb81b9a141771d38c69f1
Author:     Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
AuthorDate: Thu May 8 06:46:06 2025 -0400
Commit:     Stefano Stabellini <stefano.stabellini@xxxxxxx>
CommitDate: Fri May 9 13:58:40 2025 -0700

    arm/vpci: mask off upper bits in vPCI read mmio handler
    
    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.hildebrand@xxxxxxx>
    Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
---
 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 b63a356bb4..3a3ff5d081 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;
     }
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.