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

[xen staging] xen/arm: account IO handler for emulated PCI host bridge



commit b88109676376217e11d158de8325eb2234327760
Author:     Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx>
AuthorDate: Thu Dec 9 09:29:17 2021 +0200
Commit:     Julien Grall <jgrall@xxxxxxxxxx>
CommitDate: Wed Dec 15 17:39:56 2021 +0000

    xen/arm: account IO handler for emulated PCI host bridge
    
    At the moment, we always allocate an extra 16 slots for IO handlers
    (see MAX_IO_HANDLER). So while adding an IO trap handler for the emulated
    PCI host bridge we are not breaking anything, but we have a latent bug
    as the maximum number of IOs may be exceeded.
    Fix this by explicitly telling that we have an additional IO handler, so it 
is
    accounted.
    
    Fixes: d59168dc05a5 ("xen/arm: Enable the existing x86 virtual PCI support 
for ARM")
    
    Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx>
    Acked-by: Julien Grall <jgrall@xxxxxxxxxx>
    Reviewed-by: Rahul Singh <rahul.singh@xxxxxxx>
    Tested-by: Rahul Singh <rahul.singh@xxxxxxx>
---
 xen/arch/arm/vpci.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/xen/arch/arm/vpci.c b/xen/arch/arm/vpci.c
index ebc4c8398b..a9fc5817f9 100644
--- a/xen/arch/arm/vpci.c
+++ b/xen/arch/arm/vpci.c
@@ -130,7 +130,11 @@ unsigned int domain_vpci_get_num_mmio_handlers(struct 
domain *d)
         return ret;
     }
 
-    return 0;
+    /*
+     * For guests each host bridge requires one region to cover the
+     * configuration space. At the moment, we only expose a single host bridge.
+     */
+    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®.