From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v4 12/17] xen/arm: ITS: Initialize LPI irq descriptors and route Date: Mon, 20 Jul 2015 14:25:00 +0100 Message-ID: <55ACF6AC.4090505@citrix.com> References: <1436514172-3263-1-git-send-email-vijay.kilari@gmail.com> <1436514172-3263-13-git-send-email-vijay.kilari@gmail.com> <1436542215.10074.100.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Vijay Kilari , Ian Campbell Cc: Stefano Stabellini , Prasun Kapoor , Vijaya Kumar K , Tim Deegan , "xen-devel@lists.xen.org" , Stefano Stabellini , manish.jaggi@caviumnetworks.com List-Id: xen-devel@lists.xenproject.org On 20/07/15 14:07, Vijay Kilari wrote: > AUI, you are refering to > > http://xenbits.xen.org/people/ianc/vits/draftG.html#virtual-lpi-injection > > If we want to extract, its_device, and VITT information before calling > vgic_vcpu_inject_lpi(), > it cannot be done in do_IRQ() as irq.c cannot have vITS related code. IHMO it can't be done in vgic.c too... > > So one option is to call vits_foo() function which will validated plpi and get > its_device / VITT info and call vgic_vcpu_inject_lpi(). So vITS will > call back vgic function. > OR > Introduce new vgic function for doing this and call vgic_vcpu_inject_lpi(). I don't understand why you need to validate the plpi. It's already done when we receive the IRQ. Furthermore, you will need to retrieve again the VITT entry in vgic_vcpu_inject_lpi in order to get the collection associated to the vLPI. Given that the irq_desc as the vDevID and the eventID and the INT command will have the same parameters in hand it looks like to me that the prototype of vgic_vcpu_inject_lpi should be vgic_vcpu_inject_lpi(struct domain *d, uint32_t vdevid, uint32_t eventid) And the vgic_vcpu_inject_lpi will take care of retrieving the vLPI and the collection associated. Regards, -- Julien Grall