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

Re: [Xen-devel] [RFC PATCH v2 03/26] ARM: GICv3 ITS: allocate device and collection table



Hello,

On 04/01/2017 22:47, Stefano Stabellini wrote:
On Thu, 22 Dec 2016, Andre Przywara wrote:
Each ITS maps a pair of a DeviceID (usually the PCI b/d/f triplet) and
an EventID (the MSI payload or interrupt ID) to a pair of LPI number
and collection ID, which points to the target CPU.
This mapping is stored in the device and collection tables, which software
has to provide for the ITS to use.
Allocate the required memory and hand it the ITS.
The maximum number of devices is limited to a compile-time constant
exposed in Kconfig.

Signed-off-by: Andre Przywara <andre.przywara@xxxxxxx>
---
 xen/arch/arm/Kconfig          |   6 +++
 xen/arch/arm/gic-its.c        | 114 ++++++++++++++++++++++++++++++++++++++++++
 xen/arch/arm/gic-v3.c         |   5 ++
 xen/include/asm-arm/bitops.h  |   1 +
 xen/include/asm-arm/gic-its.h |  51 ++++++++++++++++++-
 5 files changed, 176 insertions(+), 1 deletion(-)

diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
index a7d941c..a369305 100644
--- a/xen/arch/arm/Kconfig
+++ b/xen/arch/arm/Kconfig
@@ -59,6 +59,12 @@ config MAX_HOST_LPI_BITS
           This can be overriden on the command line with the max_lpi_bits
           parameter.

+config MAX_ITS_PCI_BUSSES
+        depends on HAS_ITS
+        int "Number of PCI busses the ITS supports (4)"
+        range 1 1024
+        default "4"

Given that any kind of devices can be behind an ITS, including non-PCI
devices, I think it is best to call this MAX_PHYS_ITS_DEVICES.

I don't think we should limit the number of devices supported at compilation time. We aim to have a single Xen binary running on any board. The best would be to guess the number at runtime, but I would be fine with a command line options.

Cheers,

--
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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