From: Stefano Stabellini Subject: Re: Question. Inject virq to Domain on Xen ARM. Date: Wed, 15 Apr 2015 12:59:53 +0100 Message-ID: References: <1429087730.15516.137.camel@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="1342847746-1080268330-1429099193=:7690" Return-path: In-Reply-To: <1429087730.15516.137.camel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: Stefano Stabellini , =?UTF-8?B?7Iug7KCV7ISt?= , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org --1342847746-1080268330-1429099193=:7690 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: QUOTED-PRINTABLE On Wed, 15 Apr 2015, Ian Campbell wrote: > On Mon, 2015-04-13 at 17:08 +0900, =EC=8B=A0=EC=A0=95=EC=84=AD wrote: > > HI > >=20 > > I have a question about Inject virq to Domain on Xen ARM. > >=20 > > =20 > >=20 > > Function 'vgic_vcpu_inject_irq' is inject virq to target vcpu. > >=20 > > At the end of vgic_vcpu_inject_irq, like below > >=20 > > -------------------------------------------------------------- > >=20 > > running =3D v->is_running; > >=20 > > vcpu_unblock(v);=20 > >=20 > > if ( running && v !=3D current ) > >=20 > > smp_send_event_check_mask(cpumask_of(v->processor));=20 > >=20 > > -------------------------------------------------------------- > >=20 > > In code if target vcpu is not current, send SGI to v->processor; > >=20 > > =20 > >=20 > > I think this function help inject virq to target vcpu immediately in > > Xen 4.5.0. > >=20 > > In Xen 4.5.0, vcpu that receive SGI, will execute > > 'enter_hypervisor_head' function > >=20 > > and move irq from lr_queue to linked register.=20 > >=20 > > =20 > >=20 > > But I think that in Xen 4.4.X above code is not help inject virq. > > because there is code > >=20 > > to move irq from lr_queue to linked register in hyp handler routine. >=20 > The virq injection stuff was heavily reworked by Stefano between 4.4 and > 4.5, to try and avoid things like maintenance interrupts. >=20 > But I'm unsure what you actual question is, but on 4.4 I think the > actual injection happens (as implied by the comment next to the > GIC_SGI_EVENT_CHECK handler) in the return path, specifically in > leave_hypervisor_tail. The question is not clear to me too. On Xen 4.4 the injection on vcpu !=3D current happens by sending an SGI at the end of vgic_vcpu_inject_irq. Then on the other vcpu leave_hypervisor_tail will call gic_inject that is going to take care of injecting the interrupt. On Xen 4.5 vgic_vcpu_inject_irq also sends an SGI to the other vcpu, which is going to clear old LRs from enter_hypervisor_head and inject new interrupts from gic_inject, still called by leave_hypervisor_tail. --1342847746-1080268330-1429099193=:7690 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --1342847746-1080268330-1429099193=:7690--