All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Kevin Tian <kevin.tian@intel.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	"Xuquan (Quan Xu)" <xuquan8@huawei.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
	osstest service owner <osstest-admin@xenproject.org>,
	Chao Gao <chao.gao@intel.com>
Subject: Re: [xen-unstable test] 104131: regressions - FAIL
Date: Fri, 20 Jan 2017 04:48:33 -0700	[thread overview]
Message-ID: <5882072102000078001321F2@prv-mh.provo.novell.com> (raw)
In-Reply-To: <AADFC41AFE54684AB9EE6CBC0274A5D190C09663@SHSMSX101.ccr.corp.intel.com>

>>> On 18.01.17 at 11:23, <kevin.tian@intel.com> wrote:
>>  From: Jan Beulich [mailto:JBeulich@suse.com]
>> Sent: Wednesday, January 18, 2017 5:38 PM
>> 
>> >>> On 18.01.17 at 05:57, <kevin.tian@intel.com> wrote:
>> > Attached was my earlier comment:
>> >
>> > --
>> >> >>> 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
>> > --
>> >
>> > Using intack.vector is always expected here regardless of the
>> > comparison result between intack.vector and pt_vector. The
>> > reason why I was OK adding an ASSERT was simply to test
>> > whether intack.vecor<pt_vector does happen which is
>> > orthogonal to the fix itself.
>> 
>> Well, a vector lower than pt_vector can't block delivery. Or wait:
> 
> There are two points here:
> 
> a) We need enable EOI exit bitmap when pt_vector is blocked.
> 
> b) As you said, ideally a vector lower than pt_vecotr cannot block
> 
> The patch fixed a) and then added an ASSERT to verify b). Strictly
> speaking they are separate issues.

Okay, I think I finally understand your argumentation here.

>> Don't we need to consider vector classes here, i.e.
>> 
>>             ASSERT((intack.vector >> 4) >= (pt_vector >> 4));
>> 
>> ?
>> 
> 
> However it still doesn't explain why original ASSERT is triggered.
> vlapic_find_highest_vector actually finds the highest vector, instead
> of highest class...
> 
> static int vlapic_find_highest_vector(const void *bitmap)
> {
>     const uint32_t *word = bitmap;
>     unsigned int word_offset = NR_VECTORS / 32;
> 
>     /* Work backwards through the bitmap (first 32-bit word in every four). */
>     while ( (word_offset != 0) && (word[(--word_offset)*4] == 0) )
>         continue;
> 
>     return (fls(word[word_offset*4]) - 1) + (word_offset * 32);
> }

Well, perhaps a PIR -> IRR syncing issue then (I in particular note
the early bailing from vmx_sync_pir_to_irr())? I guess we'd want
to see the entire IRR array (and perhaps also PI state) if the check
in the assertion fails.

Jan


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

  reply	other threads:[~2017-01-20 11:48 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-12  6:46 [xen-unstable test] 104131: regressions - FAIL osstest service owner
2017-01-12  9:14 ` Andrew Cooper
2017-01-12 12:07   ` Xuquan (Quan Xu)
2017-01-12  9:04     ` Chao Gao
2017-01-12 12:15     ` Andrew Cooper
2017-01-12 12:25       ` Jan Beulich
2017-01-16  5:25         ` Tian, Kevin
2017-01-16  6:27           ` Xuquan (Quan Xu)
2017-01-16  0:06             ` Chao Gao
2017-01-16 11:00           ` Jan Beulich
2017-01-18  4:57             ` Tian, Kevin
2017-01-18  9:38               ` Jan Beulich
2017-01-18 10:23                 ` Tian, Kevin
2017-01-20 11:48                   ` Jan Beulich [this message]
2017-01-22  4:35                     ` Tian, Kevin
2017-01-23 10:33                       ` Jan Beulich
2017-01-20  8:47                 ` Xuquan (Quan Xu)
2017-01-20  8:56                   ` Jan Beulich
2017-01-20  9:08           ` Xuquan (Quan Xu)
2017-01-23 10:56           ` Xuquan (Quan Xu)
2017-02-08  6:51             ` Tian, Kevin
2017-02-08  8:27               ` Xuquan (Quan Xu)
2017-02-08  8:52                 ` Jan Beulich
2017-02-08 10:15                   ` Xuquan (Quan Xu)
2017-02-08  8:22                     ` Chao Gao
2017-02-09  8:51                       ` Xuquan (Quan Xu)
2017-02-09  3:41                         ` Chao Gao
2017-02-13  8:21                   ` Tian, Kevin
2017-02-20 12:04                     ` Xuquan (Quan Xu)
2017-02-21  3:17                       ` Tian, Kevin
2017-02-13  8:23                   ` Tian, Kevin
2017-02-14  1:22                     ` 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=5882072102000078001321F2@prv-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=chao.gao@intel.com \
    --cc=kevin.tian@intel.com \
    --cc=osstest-admin@xenproject.org \
    --cc=xen-devel@lists.xen.org \
    --cc=xuquan8@huawei.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.