Hi Andre,
On 11/05/17 18:53, Andre Przywara wrote:
The MAPC command associates a given collection ID with a given
redistributor, thus mapping collections to VCPUs.
We just store the vcpu_id in the collection table for that.
Signed-off-by: Andre Przywara <andre.przyw...@arm.com>
---
xen/arch/arm/vgic-v3-its.c | 47 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)
diff --git a/xen/arch/arm/vgic-v3-its.c b/xen/arch/arm/vgic-v3-its.c
index f9379c9..8f1c217 100644
--- a/xen/arch/arm/vgic-v3-its.c
+++ b/xen/arch/arm/vgic-v3-its.c
@@ -118,6 +118,27 @@ static paddr_t get_baser_phys_addr(uint64_t reg)
*/
/* Must be called with the ITS lock held. */
+static int its_set_collection(struct virt_its *its, uint16_t collid,
+ coll_table_entry_t vcpu_id)
+{
+ paddr_t addr;
+
+ /* The collection table entry must be able to store a VCPU ID. */
+ BUILD_BUG_ON(BIT(sizeof(coll_table_entry_t) * 8) < MAX_VIRT_CPUS);
+
+ addr = get_baser_phys_addr(its->baser_coll);
I am not sure to understand why you moved from:
paddr_t addr = get_baser...
to:
paddr_t addr;
...
addr = get_baser...
Keeping them merged would be nice.
With that:
Acked-by: Julien Grall <julien.gr...@arm.com>
Cheers,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel