All of lore.kernel.org
 help / color / mirror / Atom feed
* Question. Inject virq to Domain on Xen ARM.
@ 2015-04-13  8:08 신정섭
  2015-04-15  8:48 ` Ian Campbell
  0 siblings, 1 reply; 4+ messages in thread
From: 신정섭 @ 2015-04-13  8:08 UTC (permalink / raw)
  To: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 898 bytes --]

HI
I have a question about Inject virq to Domain on Xen ARM.
 
Function 'vgic_vcpu_inject_irq' is inject virq to target vcpu.
At the end of vgic_vcpu_inject_irq, like below
--------------------------------------------------------------
running = v->is_running;
vcpu_unblock(v); 
if ( running && v != current )
        smp_send_event_check_mask(cpumask_of(v->processor)); 
--------------------------------------------------------------
In code if target vcpu is not current, send SGI to v->processor;
 
I think this function help inject virq to target vcpu immediately in Xen 4.5.0.
In Xen 4.5.0, vcpu that receive SGI, will execute 'enter_hypervisor_head' function
and move irq from lr_queue to linked register. 
 
But I think that in Xen 4.4.X above code is not help inject virq. because there is code
to move irq from lr_queue to linked register in hyp handler routine.
 
Thanks

[-- Attachment #1.2: Type: text/html, Size: 2282 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Question. Inject virq to Domain on Xen ARM.
  2015-04-13  8:08 Question. Inject virq to Domain on Xen ARM 신정섭
@ 2015-04-15  8:48 ` Ian Campbell
  2015-04-15 11:59   ` Stefano Stabellini
  0 siblings, 1 reply; 4+ messages in thread
From: Ian Campbell @ 2015-04-15  8:48 UTC (permalink / raw)
  To: 신정섭; +Cc: Stefano Stabellini, xen-devel

On Mon, 2015-04-13 at 17:08 +0900, 신정섭 wrote:
> HI
> 
> I have a question about Inject virq to Domain on Xen ARM.
> 
>  
> 
> Function 'vgic_vcpu_inject_irq' is inject virq to target vcpu.
> 
> At the end of vgic_vcpu_inject_irq, like below
> 
> --------------------------------------------------------------
> 
> running = v->is_running;
> 
> vcpu_unblock(v); 
> 
> if ( running && v != current )
> 
>         smp_send_event_check_mask(cpumask_of(v->processor)); 
> 
> --------------------------------------------------------------
> 
> In code if target vcpu is not current, send SGI to v->processor;
> 
>  
> 
> I think this function help inject virq to target vcpu immediately in
> Xen 4.5.0.
> 
> In Xen 4.5.0, vcpu that receive SGI, will execute
> 'enter_hypervisor_head' function
> 
> and move irq from lr_queue to linked register. 
> 
>  
> 
> But I think that in Xen 4.4.X above code is not help inject virq.
> because there is code
> 
> to move irq from lr_queue to linked register in hyp handler routine.

The virq injection stuff was heavily reworked by Stefano between 4.4 and
4.5, to try and avoid things like maintenance interrupts.

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.

In any case, I would strongly recommend to using at least Xen 4.5+ on
ARM.

Ian.



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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Question. Inject virq to Domain on Xen ARM.
  2015-04-15  8:48 ` Ian Campbell
@ 2015-04-15 11:59   ` Stefano Stabellini
  2015-04-17  0:43     ` 신정섭
  0 siblings, 1 reply; 4+ messages in thread
From: Stefano Stabellini @ 2015-04-15 11:59 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Stefano Stabellini, 신정섭, xen-devel

[-- Attachment #1: Type: text/plain, Size: 2049 bytes --]

On Wed, 15 Apr 2015, Ian Campbell wrote:
> On Mon, 2015-04-13 at 17:08 +0900, 신정섭 wrote:
> > HI
> > 
> > I have a question about Inject virq to Domain on Xen ARM.
> > 
> >  
> > 
> > Function 'vgic_vcpu_inject_irq' is inject virq to target vcpu.
> > 
> > At the end of vgic_vcpu_inject_irq, like below
> > 
> > --------------------------------------------------------------
> > 
> > running = v->is_running;
> > 
> > vcpu_unblock(v); 
> > 
> > if ( running && v != current )
> > 
> >         smp_send_event_check_mask(cpumask_of(v->processor)); 
> > 
> > --------------------------------------------------------------
> > 
> > In code if target vcpu is not current, send SGI to v->processor;
> > 
> >  
> > 
> > I think this function help inject virq to target vcpu immediately in
> > Xen 4.5.0.
> > 
> > In Xen 4.5.0, vcpu that receive SGI, will execute
> > 'enter_hypervisor_head' function
> > 
> > and move irq from lr_queue to linked register. 
> > 
> >  
> > 
> > But I think that in Xen 4.4.X above code is not help inject virq.
> > because there is code
> > 
> > to move irq from lr_queue to linked register in hyp handler routine.
> 
> The virq injection stuff was heavily reworked by Stefano between 4.4 and
> 4.5, to try and avoid things like maintenance interrupts.
> 
> 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 != 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.

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Question. Inject virq to Domain on Xen ARM.
  2015-04-15 11:59   ` Stefano Stabellini
@ 2015-04-17  0:43     ` 신정섭
  0 siblings, 0 replies; 4+ messages in thread
From: 신정섭 @ 2015-04-17  0:43 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Campbell, Stefano Stabellini


[-- Attachment #1.1: Type: text/plain, Size: 2826 bytes --]

Yes. I confirm
irq move from lr_queue to lr in gic_inject().
 
Thanks but i have another question about vgic_vcpu_inject_irq function.
I will Start new thread.
 
-----Original Message-----
From: "Stefano Stabellini"<stefano.stabellini@eu.citrix.com> 
To: "Ian Campbell"<ian.campbell@citrix.com>; 
Cc: "신정섭"<supsup5642@naver.com>; <xen-devel@lists.xen.org>; "Stefano Stabellini"<Stefano.Stabellini@eu.citrix.com>; 
Sent: 2015-04-15 (수) 20:59:53
Subject: Re: [Xen-devel] Question. Inject virq to Domain on Xen ARM.
 
On Wed, 15 Apr 2015, Ian Campbell wrote:
> On Mon, 2015-04-13 at 17:08 +0900, 신정섭 wrote:
> > HI
> > 
> > I have a question about Inject virq to Domain on Xen ARM.
> > 
> >  
> > 
> > Function 'vgic_vcpu_inject_irq' is inject virq to target vcpu.
> > 
> > At the end of vgic_vcpu_inject_irq, like below
> > 
> > --------------------------------------------------------------
> > 
> > running = v->is_running;
> > 
> > vcpu_unblock(v); 
> > 
> > if ( running && v != current )
> > 
> >         smp_send_event_check_mask(cpumask_of(v->processor)); 
> > 
> > --------------------------------------------------------------
> > 
> > In code if target vcpu is not current, send SGI to v->processor;
> > 
> >  
> > 
> > I think this function help inject virq to target vcpu immediately in
> > Xen 4.5.0.
> > 
> > In Xen 4.5.0, vcpu that receive SGI, will execute
> > 'enter_hypervisor_head' function
> > 
> > and move irq from lr_queue to linked register. 
> > 
> >  
> > 
> > But I think that in Xen 4.4.X above code is not help inject virq.
> > because there is code
> > 
> > to move irq from lr_queue to linked register in hyp handler routine.
> 
> The virq injection stuff was heavily reworked by Stefano between 4.4 and
> 4.5, to try and avoid things like maintenance interrupts.
> 
> 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 != 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.

[-- Attachment #1.2: Type: text/html, Size: 3832 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-04-17  0:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-13  8:08 Question. Inject virq to Domain on Xen ARM 신정섭
2015-04-15  8:48 ` Ian Campbell
2015-04-15 11:59   ` Stefano Stabellini
2015-04-17  0:43     ` 신정섭

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.