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

Re: [Xen-devel] [PATCH 2/5] x86/ioapic: introduce helper to fetch triggering mode of GSI



>>> On 27.03.17 at 12:44, <roger.pau@xxxxxxxxxx> wrote:
> --- a/xen/arch/x86/io_apic.c
> +++ b/xen/arch/x86/io_apic.c
> @@ -2261,6 +2261,28 @@ int io_apic_set_pci_routing (int ioapic, int pin, int 
> irq, int edge_level, int a
>      return 0;
>  }
>  
> +unsigned int io_apic_get_gsi_trigger(unsigned int gsi)

bool

> +{
> +    struct IO_APIC_route_entry entry;
> +    unsigned int ioapic, base_gsi;
> +
> +    ASSERT(gsi < nr_irqs_gsi);
> +
> +    /* For GSI type find if the GSI is level or edge triggered */

The comment looks like it wants to go ahead of the function instead
of here. And what's "GSI type"?

> +    for ( ioapic = 0; ioapic < nr_ioapics; ioapic++ )
> +    {
> +        base_gsi = io_apic_gsi_base(ioapic);
> +
> +        if ( gsi >= base_gsi && gsi < base_gsi + nr_ioapic_entries[ioapic] )
> +            break;
> +    }
> +    ASSERT(ioapic < nr_ioapics);
> +
> +    entry = ioapic_read_entry(ioapic, gsi - base_gsi, 0);
> +
> +    return entry.trigger;
> +}

It is presumably not entirely without reason that you add this function
without having an immediate user (in existing code) for it: The trigger
bit is entirely meaningless in a masked RTE.

Jan


_______________________________________________
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®.