All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Tian, Kevin" <kevin.tian@intel.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: "yang.zhang.wz@gmail.com" <yang.zhang.wz@gmail.com>,
	"Lan, Tianyu" <tianyu.lan@intel.com>,
	"Xuquan (Quan Xu)" <xuquan8@huawei.com>,
	AndrewCooper <andrew.cooper3@citrix.com>,
	George Dunlap <George.Dunlap@citrix.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
	"Nakajima, Jun" <jun.nakajima@intel.com>
Subject: Re: [PATCH v3] x86/apicv: fix RTC periodic timer and apicv issue
Date: Tue, 20 Dec 2016 08:53:41 +0000	[thread overview]
Message-ID: <AADFC41AFE54684AB9EE6CBC0274A5D190BD13EA@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <5858FB35020000780012ACF4@prv-mh.provo.novell.com>

> From: Jan Beulich [mailto:JBeulich@suse.com]
> Sent: Tuesday, December 20, 2016 4:35 PM
> 
> >>> On 20.12.16 at 06:37, <kevin.tian@intel.com> wrote:
> >>  From: Xuquan (Quan Xu) [mailto:xuquan8@huawei.com]
> >> Sent: Friday, December 16, 2016 5:40 PM
> >> -        if (pt_vector != -1)
> >> -            vmx_set_eoi_exit_bitmap(v, pt_vector);
> >> +        if ( pt_vector != -1 ) {
> >> +            if ( intack.vector > pt_vector )
> >> +                vmx_set_eoi_exit_bitmap(v, intack.vector);
> >> +            else
> >> +                vmx_set_eoi_exit_bitmap(v, pt_vector);
> >> +        }
> >
> > Above can be simplified as one line change:
> > 	if ( pt_vector != -1 )
> > 		vmx_set_eoi_exit_bitmap(v, intack.vector);
> 
> Hmm, I don't understand. Did you mean to use max() here? Or
> else how is this an equivalent of the originally proposed code?
> 

Original code is not 100% correct. The purpose is to set EOI exit
bitmap for any vector which may block injection of pt_vector - 
give chance to recognize pt_vector in future intack and then do pt 
intr post. The simplified code achieves this effect same as original
code if intack.vector >= vector. I cannot come up a case why
intack.vector might be smaller than vector. If this case happens,
we still need enable exit bitmap for intack.vector instead of
pt_vector for said purpose while original code did it wrong.

Thanks
Kevin

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

  reply	other threads:[~2016-12-20  8:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-16  9:40 [PATCH v3] x86/apicv: fix RTC periodic timer and apicv issue Xuquan (Quan Xu)
2016-12-20  5:37 ` Tian, Kevin
2016-12-20  5:54   ` Xuquan (Quan Xu)
2016-12-20  8:32     ` Jan Beulich
2016-12-20  9:38       ` Xuquan (Quan Xu)
2016-12-20  9:57         ` Jan Beulich
2016-12-21  2:32         ` Tian, Kevin
2016-12-20  8:34   ` Jan Beulich
2016-12-20  8:53     ` Tian, Kevin [this message]
2016-12-20  8:57       ` Jan Beulich
2016-12-20  9:33       ` Xuquan (Quan Xu)
2016-12-20 13:12   ` Xuquan (Quan Xu)
2016-12-21  2:29     ` Tian, Kevin
2016-12-21  4:59       ` Xuquan (Quan Xu)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AADFC41AFE54684AB9EE6CBC0274A5D190BD13EA@SHSMSX101.ccr.corp.intel.com \
    --to=kevin.tian@intel.com \
    --cc=George.Dunlap@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=jun.nakajima@intel.com \
    --cc=tianyu.lan@intel.com \
    --cc=xen-devel@lists.xen.org \
    --cc=xuquan8@huawei.com \
    --cc=yang.zhang.wz@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.