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

Re: [Xen-devel] [PATCH v4 14/16] xen/arm: Add virtual GICv3 support



On Mon, 26 May 2014, vijay.kilari@xxxxxxxxx wrote:
> +    case GICD_ISPENDR ... GICD_ISPENDRN:
> +        if ( dabt.size != DABT_BYTE && dabt.size != DABT_WORD ) goto 
> bad_width;
> +        rank = vgic_irq_rank(v, 1, reg - GICD_ISPENDR, DABT_WORD);
> +        if ( rank == NULL ) goto read_as_zero;
> +        vgic_lock_rank(v, rank);
> +        *r = byte_read(rank->ipend, dabt.sign, reg);
> +        vgic_unlock_rank(v, rank);
> +        return 1;
> +    case GICD_ICPENDR ... GICD_ICPENDRN:
> +        if ( dabt.size != DABT_BYTE && dabt.size != DABT_WORD ) goto 
> bad_width;
> +        rank = vgic_irq_rank(v, 1, reg - GICD_ICPENDR, DABT_WORD);
> +        if ( rank == NULL) goto read_as_zero;
> +        vgic_lock_rank(v, rank);
> +        *r = byte_read(rank->ipend, dabt.sign, reg);
> +        vgic_unlock_rank(v, rank);
> +        return 1;

[...]

> +    case GICD_ISPENDR ... GICD_ISPENDRN:
> +        if ( dabt.size != DABT_WORD ) goto bad_width;
> +        rank = vgic_irq_rank(v, 1, reg - GICD_ISPENDR, DABT_WORD);
> +        if ( rank == NULL ) goto write_ignore;
> +        vgic_lock_rank(v, rank);
> +        rank->ipend = *r;
> +        vgic_unlock_rank(v, rank);
> +        return 1;
> +    case GICD_ICPENDR ... GICD_ICPENDRN:
> +        if ( dabt.size != DABT_WORD ) goto bad_width;
> +        rank = vgic_irq_rank(v, 1, reg - GICD_ICPENDR, DABT_WORD);
> +        if ( rank == NULL ) goto write_ignore;
> +        vgic_lock_rank(v, rank);
> +        rank->ipend &= ~*r;
> +        vgic_unlock_rank(v, rank);
> +        return 1;

I do realize that this is not a regression compared to our current GICv2
code, but pendsgi, GICR_ISPENDR0 and GICR_ICPENDR0 should do something.
GICR_ISPENDR0 reads should return which interrupts are pending and
GICR_ISPENDR0 writes should set the status of a particular irq as
pending.
Given that we currently don't do this on GICv2, I would be OK with this
code as is, as long as you add a TODO comment to remind us that we need
to implement it properly.


> +    case GICD_IROUTER ... GICD_IROUTER31:
> +        /* SGI/PPI is RES0 */
> +        goto write_ignore_64;
> +    case GICD_IROUTER32 ... GICD_IROUTERN:
> +        if ( dabt.size != DABT_DOUBLE_WORD ) goto bad_width;
> +        rank = vgic_irq_rank(v, 64, gicd_reg - GICD_IROUTER, 
> DABT_DOUBLE_WORD);
> +        if ( rank == NULL) goto write_ignore;
> +        vgic_lock_rank(v, rank);
> +        rank->v3.irouter[REG_RANK_INDEX(64,
> +                      (gicd_reg - GICD_IROUTER), DABT_DOUBLE_WORD)] = *r;
> +        vgic_unlock_rank(v, rank);
> +        return 1;

Similarly to

http://marc.info/?l=xen-devel&m=140104126710713

We should ignore any writes to GICD_IROUTER*.

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


 


Rackspace

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