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

Re: [Xen-devel] [ PATCH 2/2] xen: enable Virtual-interrupt delivery




> -----Original Message-----
> From: Zhang, Yang Z
> Sent: Friday, September 07, 2012 10:08 AM
> To: Jan Beulich; Li, Jiongxi
> Cc: Keir Fraser; xen-devel@xxxxxxxxxxxxx
> Subject: RE: [Xen-devel] [ PATCH 2/2] xen: enable Virtual-interrupt delivery
> 
> Jan Beulich wrote on 2012-09-06:
> >>>> On 06.09.12 at 12:00, "Li, Jiongxi" <jiongxi.li@xxxxxxxxx> wrote:
> >>> From: Keir Fraser [mailto:keir.xen@xxxxxxxxx] On 31/08/2012 10:30,
> >>> "Li, Jiongxi" <jiongxi.li@xxxxxxxxx> wrote:
> >>>> --- a/xen/arch/x86/hvm/irq.c  Fri Aug 31 09:30:38 2012 +0800
> >>>> +++ b/xen/arch/x86/hvm/irq.c         Fri Aug 31 09:49:39 2012 +0800
> >>>> @@ -452,7 +452,11 @@ struct hvm_intack hvm_vcpu_ack_pending_i
> >>>>
> >>>>  int hvm_local_events_need_delivery(struct vcpu *v) {
> >>>> -    struct hvm_intack intack = hvm_vcpu_has_pending_irq(v);
> >>>> +    struct hvm_intack intack;
> >>>> +
> >>>> +    pt_update_irq(v);
> >>>
> >>> Why would this change be needed for vAPIC?
> >> When vcpu is scheduled out, there will be periodic timer interrupt
> >> pending
> >
> > Probably rather "may"?
> 
> yes, there may have pending timer interrupt.
> 
> >> for injection. Every VMExit is a chance to inject the pending
> >> periodic timer interrupt on vmx_intr_assist. In no virtual interrupt
> >> delivery case, although injected timer interrupt is edge trigger, EOI
> >> always induces VMExit, pending periodic timer can be kept injected
> >> till there is no pending left. But in virtual interrupt delivery
> >> case, only level trigger interrupt can induce VMExit, there is much
> >> less chance for injecting pending timer interrupt through VMExit.
> >
> > And it's not possible to set the respective VIRR[] bit, and let the
> > hardware take care of injecting at the right time?
> 
> Right, we can use this way to inject the interrupt.
> But it still need a watchdog to aware when the bit in VIRR is cleared by 
> guest,
> and the cost is same with forcing VM exit when writing EOI for timer 
> interrupt.
> 
> >> Adding pt_update_irq here is another code path to inject pending
> >> periodic timer, but it can't guarantee every pending timer interrupt can be
> injected.
> >> Another way is to make every EOI of pending timer interrupt induce
> >> VMExit, but it may obey the spirit of virtual interrupt delivery - reducing
> VMExit.
> >> We have been evaluating that.
> >
> > With which result?
> 
> We are doing it now. Will let you know the result when get it.
> 
In our new patch, we set eoi_exit_bitmap for periodic timer interrup to cause 
EOI-induced VM exit, then pending periodic time interrups have the chance to be 
injected for compensation
Please refer to patch v2

> > Jan
> >
> >
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@xxxxxxxxxxxxx
> > http://lists.xen.org/xen-devel
> 
> 
> Best regards,
> Yang
> 


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