[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] x86/apicv: enhance posted-interrupt processing
On Thu, Feb 23, 2017 at 11:55:15AM +0000, Xuquan (Quan Xu) wrote: >On February 23, 2017 7:01 PM, Jan Beulich wrote: >>>>> On 23.02.17 at 11:53, <xuquan8@xxxxxxxxxx> wrote: >>> On February 23, 2017 5:59 PM, Jan Beulich wrote: >>>>>>> On 23.02.17 at 10:28, <xuquan8@xxxxxxxxxx> wrote: >>>>> On February 18, 2017 12:33 AM, Jan Beulich wrote: >>>>>>>>> On 17.02.17 at 09:49, <chao.gao@xxxxxxxxx> wrote: >>>>>>>>diff --git a/xen/arch/x86/hvm/vmx/vmx.c >>>>b/xen/arch/x86/hvm/vmx/vmx.c >>>>>>>>index 61925cf..3887c32 100644 >>>>>>>>--- a/xen/arch/x86/hvm/vmx/vmx.c >>>>>>>>+++ b/xen/arch/x86/hvm/vmx/vmx.c >>>>>>>>@@ -1846,8 +1846,7 @@ static void >>>>>>__vmx_deliver_posted_interrupt(struct vcpu *v) >>>>>>>> { >>>>>>>> unsigned int cpu = v->processor; >>>>>>>> >>>>>>>>- if ( !test_and_set_bit(VCPU_KICK_SOFTIRQ, >>>>>>&softirq_pending(cpu)) >>>>>>>>- && (cpu != smp_processor_id()) ) >>>>>>>>+ if ( !softirq_pending(cpu) && (cpu != smp_processor_id()) >>>>>>>>+ ) >>>>> >>>>> Jan, >>>>> could you help me present the definition of ' smp_processor_id()' >>and ' >>>>> current' in __vmx_deliver_posted_interrupt() ? thanks.. >>>> >>>>I'm afraid I don't understand the request. >>> >>> IOW, >>> which vcpu does the 'current' refer to? >>> which cpu does the ' smp_processor_id()' refer to? >> >>current: currently running vCPU > >in a SMP machine, are there more than one currently running vCPU? >I think so, the condition "if ( running && (in_irq() || (v != current)) )", in >__vmx_deliver_posted_interrupt() looks strange -- when vCPU is running, why to >check ' v != current '.. > > >>smp_processor_id(): processor ID of the CPU we're running on >> >I think if vcpu is running, ' cpu != smp_processor_id() ' should be true. > I am afraid it is not right. when the 'current' wants to deliver posted interrupt to 'current', the vcpu is running and cpu == smp_processor_id(). > >I think we could simplify __vmx_deliver_posted_interrupt(): > > 1. set VCPU_KICK_SOFTIRQ bit of v->processor. Do we need set VCPU_KICK_SOFTIRQ bit when vcpu is not running? IMO, if vcpu is not running, just unblock (or, vcpu_kick since when vcpu is not running, vcpu_kick is the same with vcpu_unblock )is enough. > 2. IF vcpu is running: > - send_IPI Do we need send self-IPI when the target vcpu is 'current'? IMO, set VCPU_KICK_SOFTIQR is enough. > ELSE > - vcpu_kick > > >Thank you for your patience.. >Quan > > _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |