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

Re: [Xen-devel] [query] gic_set_lr always uses maintenance Interrupt



On Thu, Oct 31, 2013 at 9:13 PM, Ian Campbell <Ian.Campbell@xxxxxxxxxx> wrote:
> On Wed, 2013-10-30 at 15:08 +0530, Mj Embd wrote:
>> Hi,
>>
>> As per section 5.2.2 of IHI0048B_b_gic_architecture_specification, If
>> hypervisor is injecting a VIRQ into guest, that is actually a HW IRQ,
>
> Is it? You mean LR.HW is set? AIUI this means the IRQ is an actual
> hardware IRQ which is passed through, whereas the VIRQs are entirely
> fictional virtual interrupts. (or maybe you mean some other sort of
> VIRQ?)
>

If say a timer HW interrupt is injected into guest. And if guest does
EOI, the HW interrupt is deactivated.
This is an optimisation as per ARM which saves a trap to hypervisor
which is in form of a maintenance interrupt.

I see in the code gic_set_lr always chooses an option for maintenance
interrupt. So it is not using ARM's optimisation technique.

The reason I thought why this is done is bcase problem I see with this
is that hypervisor still has its LR used and has no way of determining
when it can replenish LR for further interrupts to be injected in
guest. But I could be wrong, why would ARM provide a way an keep a
loophole

>> and guest does EOI (provided conditions) the maintenance interrupt is
>> not needed.
>>
>> In xen arch/arm/gic.c always while setting an LR using gic_set_lr ,
>> the maintenance_int is enabled.
>>
>> Can some one clear the doubt on why it is done
>> a) is this because EOI by guest would result in control back to
>> hypervisor to replenish the LR for   inflight, as there is otherwise
>> no way to know in hypervisor that the LR is available.
>> or
>> b) some other reason ?
>
> CCing Stefano, he understands this stuff and IIRC there was some reason
> your a) didn't work in practice.
>
> Ian.
>



-- 
-mj

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