I am not sure if the code is wrong or the
config file does not correctly map the cpu_set

Currently, the cpu_id is passed as logical CPU number (0,1,2,3..)
But the TYPER register affinity is (0, 1, 100, 101...)

Correct this to look for a different bitfield in TYPER which
matches the logical numbering.
---
 hypervisor/arch/arm-common/gic-v3.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hypervisor/arch/arm-common/gic-v3.c 
b/hypervisor/arch/arm-common/gic-v3.c
index 5f9c6e7..af51632 100644
--- a/hypervisor/arch/arm-common/gic-v3.c
+++ b/hypervisor/arch/arm-common/gic-v3.c
@@ -105,7 +105,7 @@ static int gic_cpu_init(struct per_cpu *cpu_data)
                        break;
 
                typer = mmio_read64(redist_base + GICR_TYPER);
-               if ((typer >> 32) == cpu_data->cpu_id) {
+               if (((typer >> 8) & 0xf) == cpu_data->cpu_id) {
                        cpu_data->gicr_base = redist_base;
                        break;
                }
-- 
1.9.1

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to