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

Re: [Xen-devel] [PATCH 3/4] VMX: Add posted interrupt supporting



On 09/04/2013 08:58, "Zhang, Yang Z" <yang.z.zhang@xxxxxxxxx> wrote:

> If posted interrupt arrived after vmx_intr_assit() and before vmentry, then
> the interrupt cannot be inject to guest in time.

But pending virtual interrupts are picked up during vmentry aren't they? So
if the IPI occurs before vmentry, why is there a race? Isn't the only
purpose of __vmx_deliver_posted_interrupt() to ensure that the pending
virtual interrupts of the given vcpu get scanned/handled by the appropriate
processor?

 -- Keir

> vmx_asm_do_vmentry:
>         call vmx_intr_assist
>         call nvmx_switch_guest
>         ASSERT_NOT_IN_ATOMIC
>                               <---------if posted interrupt arrived here and
> we don't set softirq, then the interrupt will be delay until next vmentry.
>         GET_CURRENT(%rbx)
>         cli
> 
>         mov  VCPU_processor(%rbx),%eax
>         shl  $IRQSTAT_shift,%eax
>         lea  irq_stat+IRQSTAT_softirq_pending(%rip),%rdx
>         cmpl $0,(%rdx,%rax,1)
>         jnz  .Lvmx_process_softirqs
> 
> Actually, the posted interrupt is same with a normal vcpu kick IPI, except
> that if cpu received it in non-root mode, it will not cause vmext. So we must
> follow the vcpu_kick logic.



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