xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Chao Gao <chao.gao@intel.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	Xuquan <xuquan8@huawei.com>,
	osstest-admin@xenproject.org, Kevin Tian <kevin.tian@intel.com>,
	xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [xen-unstable test] 106504: regressions - FAIL
Date: Wed, 22 Mar 2017 14:13:58 +0800	[thread overview]
Message-ID: <20170322061358.GA11612@skl-2s3.sh.intel.com> (raw)
In-Reply-To: <58D280750200007800146399@prv-mh.provo.novell.com>

On Wed, Mar 22, 2017 at 06:47:33AM -0600, Jan Beulich wrote:
>>>> On 22.03.17 at 05:53, <chao.gao@intel.com> wrote:
>> I have written a xtf test case (many codes are from hvmloader) to
>> trigger this assertion. The test case is in attachments.
>
>Thanks for doing this.
>
>> Bottom is the output
>> of this test. This test initializes PIT channel0 to generate periodic timer
>> interrupt at 1000hz per second. The timer interrupt is delivered to vCPU0. And
>> vCPU1 is used to change IOAPIC RTE 2 frequently.
>
>Well, this is certainly helpful (due to some of the conclusions you
>draw below), but it is very likely not what has caused the assertion
>to trigger in osstest. So by removing the assertion (as you suggest
>below) we then will have a silent, non-understood misbehavior.

Agree.

>
>> The assertion can be triggered by guest. To fix assertion failure,
>> I propose to remove this assertion for the reason below:
>
>Of course I agree that a guest triggerable assertion is bad, and
>hence needs a correction somewhere.
>
>> 1. Operations in this test case are very intrusive and abnormal. It updates 
>> RTE frequently without disabling interrupt source. In this case, I think 
>> software can't assume hardware works correctly.
>
>I guess hardware behavior simply is unspecified in such a case, so
>it's hard to judge whether it works "correctly".

agree.

>
>> 2. If we remove this assertion(means we admit pt_vector may be different
>> from (or bigger than) the vector we set in vIRR in a rare case), the side
>> effect is that we won't decrease the counter pt->ending_intr_nr in
>> pt_intr_post() and one more timer interrupt in number is injected to guest. 
>
>Which is clearly wrong, afaict, as that may drive the guest clock
>off (depending on how the guest OS does its accounting).

Yes.

>
>> 3. We read RTE 3 times. 1st happens when we set vIRR. 2nd happens when
>> pt_update_irq() returns. 3rd happens in pt_intr_post(). If guest changes
>> the vector in RTE during the window, it will also incur losing or getting
>> more periodic timer interrupt.
>
>Which raises the question whether latching the value read the first
>time would address the issue you demonstrate with the test case.
>Or alternatively deferring writes to take effect only once readers
>are done with their perhaps multiple accesses?

I think your solution is better.

>
>Can you get in touch with your chipset folks to find out whether
>hardware has cases where multiple reads occur during the
>processing of a single event?

Yes, I will come back once I get how they handle similar processes. 

>
>> (d1) [ 1409.741660] --- Xen Test Framework ---
>> (d1) [ 1409.741869] Environment: HVM 32bit (No paging)
>> (d1) [ 1409.741964] Test periodic-timer
>> (d1) [ 1409.742077] activate cpu1
>> (XEN) [ 1423.581228] d1v0: intack: 02:48 pt: 38
>
>I keep getting confused by my own mistake of getting the format
>string wrong here (the above should be intack: 2:30 pt: 38). I.e.
>I was about to complain that there's no use vector 48 in your
>test code, when I remembered that it's being wrongly printed in
>decimal.

Sorry for my fault.

>
>Jan
>

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

  reply	other threads:[~2017-03-22 13:16 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-07  5:52 [xen-unstable test] 106504: regressions - FAIL osstest service owner
2017-03-07  9:16 ` Jan Beulich
2017-03-07  4:24   ` Chao Gao
2017-03-07 14:11     ` Jan Beulich
2017-03-22  4:53       ` Chao Gao
2017-03-22 12:47         ` Jan Beulich
2017-03-22  6:13           ` Chao Gao [this message]
2017-03-22 13:40             ` Jan Beulich
2017-03-29  3:28             ` Xuquan (Quan Xu)
2017-03-28 20:48               ` Chao Gao
2017-03-24  7:48           ` Tian, Kevin
2017-03-24  8:17             ` Jan Beulich
2017-03-24  8:25               ` Tian, Kevin
     [not found]               ` <AADFC41AFE54684AB9EE6CBC0274A5D190C7CFB9@SHSMSX101.ccr.corp.intel.com>
2017-03-24  8:49                 ` Tian, Kevin
2017-03-24  9:00               ` Andrew Cooper
2017-04-04 23:57           ` Chao Gao
2017-04-05  7:48             ` Jan Beulich
2017-04-05  1:49               ` Chao Gao
2017-04-07  8:56             ` Xuquan (Quan Xu)
2017-03-08  3:16     ` 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=20170322061358.GA11612@skl-2s3.sh.intel.com \
    --to=chao.gao@intel.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=kevin.tian@intel.com \
    --cc=osstest-admin@xenproject.org \
    --cc=xen-devel@lists.xenproject.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).