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

Re: [PATCH v2] xen: gic-v3: Introduce CONFIG_GICV3_NR_LRS



Hi,

On 08/04/2026 23:24, Luca Fancellu wrote:
@@ -203,6 +209,10 @@ static uint64_t gicv3_ich_read_lr(int lr)

static void gicv3_ich_write_lr(int lr, uint64_t val)
{
+    /* WI for unsupported LR */
+    if ( lr >= LRS )
+        return;
+
     switch ( lr )
     {
     case 0:

Now, since we are using CONFIG_GICV3_NR_LRS or gicv3_info.nr_lrs in 
gicv3_save_lrs/gicv3_restore_lrs,
there are other part of the codebase using nr_lrs (gic_get_nr_lrs() is one of 
them), but all the callers of that
function will use the HW nr_lrs and not the CONFIG_GICV3_NR_LRS, so I think 
some work needs to be done
to align them or there will be mismatches at runtime with possible loss of 
information.

+1. We need a consistent view for the number of LRs. I could also see a use case where the integrator wants to support less LRs than what the HW supports (this doesn't seem to be prevented with this patch).

Note, during Xen boot, we may need to zero the LRs which are unused as they may potentially contain active interrupts.

Cheers,

--
Julien Grall




 


Rackspace

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