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

Re: [Xen-devel] [PATCH] x86/apicv: enhance posted-interrupt processing



>>> 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:
>>>>> On Fri, Feb 17, 2017 at 09:37:45AM +0000, Xuquan (Quan Xu) wrote:
>>>>>>From a589074281cc22a30ed75a5bccba60e83d2312a6 Mon Sep 17
>>>>00:00:00 2001
>>>>>>From: Quan Xu <xuquan8@xxxxxxxxxx>
>>>>>>Date: Sat, 18 Feb 2017 09:27:37 +0800
>>>>>>Subject: [PATCH] x86/apicv: enhance posted-interrupt processing
>>>>>>
>>>>>>If guest is already in non-root mode, an posted interrupt will be
>>>>>>directly delivered to guest (leaving softirq being set w/o actually
>>>>>>incurring a VM-Exit - breaking desired softirq behavior).
>>>>>>Then further posted interrupts will skip the IPI, stay in PIR and
>>>>>>not noted until another VM-Exit happens.
>>>>>>
>>>>>>Remove the softirq set. Actually since it's an optimization for less
>>>>>>IPIs, check softirq_pending(cpu) directly instead of sticking to one
>>>>>>bit only.
>>>>>>
>>>>>>Signed-off-by: Quan Xu <xuquan8@xxxxxxxxxx>
>>>>>>---
>>>>>> xen/arch/x86/hvm/vmx/vmx.c | 3 +--
>>>>>> 1 file changed, 1 insertion(+), 2 deletions(-)
>>>>>>
>>>>>>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
smp_processor_id(): processor ID of the CPU we're running on

Jan


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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.