All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris J Arges <chris.j.arges@canonical.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm@vger.kernel.org
Subject: Re: kvm-unit-test failures
Date: Fri, 29 Aug 2014 16:05:05 -0500	[thread overview]
Message-ID: <5400EB01.1080106@canonical.com> (raw)
In-Reply-To: <5400BA22.9080704@canonical.com>



On 08/29/2014 12:36 PM, Chris J Arges wrote:
> On 08/27/2014 05:05 PM, Paolo Bonzini wrote:
>>
>>
>> ----- Messaggio originale -----
>>> Da: "Chris J Arges" <chris.j.arges@canonical.com>
>>> A: "Paolo Bonzini" <pbonzini@redhat.com>, kvm@vger.kernel.org
>>> Inviato: Mercoledì, 27 agosto 2014 23:24:14
>>> Oggetto: kvm-unit-test failures (was: [PATCH 1/2 v3] add check parameter to run_tests configuration)
>>>
>>> <snip>
>>>> Thanks, looks good.  Are there more failures?
>>>>
>>>> Paolo
>>>>
>>>
>>> Paolo,
>>> Thanks for applying those patches!
>>>
>>> I now only see the two failures on my machine:
>>> model name      : Intel(R) Xeon(R) CPU E5-2697 v3 @ 2.60GHz
>>>
>>> I'm running with the tip of kvm master:
>>> 0ac625df43ce9d085d4ff54c1f739611f4308b13 (Merge tag 'kvm-s390-20140825')
>>>
>>> sudo ./x86-run x86/apic.flat -smp 2 -cpu qemu64,+x2apic,+tsc-deadline |
>>> grep -v PASS
>>> qemu-system-x86_64 -enable-kvm -device pc-testdev -device
>>> isa-debug-exit,iobase=0xf4,iosize=0x4 -display none -serial stdio
>>> -device pci-testdev -kernel x86/apic.flat -smp 2 -cpu
>>> qemu64,+x2apic,+tsc-deadline
>>> enabling apic
>>> enabling apic
>>> paging enabled
>>> cr0 = 80010011
>>> cr3 = 7fff000
>>> cr4 = 20
>>> apic version: 1050014
>>> x2apic enabled
>>> FAIL: tsc deadline timer clearing
>>> tsc deadline timer enabled
>>
>> This is fixed in kvm/next (3.18).
>>
>>> SUMMARY: 16 tests, 1 unexpected failures
>>> Return value from qemu: 3
>>>
>>> sudo ./x86-run x86/kvmclock_test.flat -smp 2 --append "10000000 `date +%s`"
>>> qemu-system-x86_64 -enable-kvm -device pc-testdev -device
>>> isa-debug-exit,iobase=0xf4,iosize=0x4 -display none -serial stdio
>>> -device pci-testdev -kernel x86/kvmclock_test.flat -smp 2 --append
>>> 10000000 1409174399
>>> enabling apic
>>> enabling apic
>>> kvm-clock: cpu 0, msr 0x:44d4c0
>>> kvm-clock: cpu 0, msr 0x:44d4c0
>>> Wallclock test, threshold 5
>>> Seconds get from host:     1409174399
>>> Seconds get from kvmclock: 1409173176
>>> Offset:                    -1223
>>
>> Weird, your clock is 20 minutes behind in the VM than it
>> is in the host.  Is the offset always around -1200?  What
>> happens if you reboot?
>>
>> (I get 0, 1 or sometimes 2).
>>
>> Paolo
>>
> 
> Hi Paolo,
> 
> Results building with kvm queue tree
> (fd2752352bbc98850d83b5448a288d8991590317):
> CPU:
> model name      : Intel(R) Xeon(R) CPU E5-2697 v3 @ 2.60GHz
> 
> I still get failures with the following test, I actually tested on
> multiple machines with identical hardware and the same failure occurred.
> In v3.13/v3.16 series kernels this passes. I'll look into which commit
> changed this result for me. I suspect it was fairly recent.
> 

I did a quick grep through the patches between v3.16 and the latest and
I found: (0d3da0d26e3c3515997c99451ce3b0ad1a69a36c KVM: x86: fix TSC
matching).

I reverted this patch and the test case passed for me. Looking at the
patch, I added an extra else statement as so:

	if (!matched) {
		kvm->arch.nr_vcpus_matched_tsc = 0;
	} else if (!already_matched) {
		kvm->arch.nr_vcpus_matched_tsc++;
	} else {
		printk("kvm: do we get here?\n");
	}

And indeed there is a condition where matched && already_matched are
both true. In this case we don't zero or increment nr_vcpus_matched_tsc.
Incrementing nr_vcpus_matched_tsc in that last else clause allows the
test to pass; however this is identical to the  logic before the patch.

Any suggestions for fixing this case?

Thanks,
--chris j arges

> ./x86-run x86/kvmclock_test.flat -smp 2 --append "10000000 `date +%s`" |
> grep -v PASS
> qemu-system-x86_64 -enable-kvm -device pc-testdev -device
> isa-debug-exit,iobase=0xf4,iosize=0x4 -display none -serial stdio
> -device pci-testdev -kernel x86/kvmclock_test.flat -smp 2 --append
> 10000000 1409160326
> enabling apic
> enabling apic
> kvm-clock: cpu 0, msr 0x:44d520
> kvm-clock: cpu 0, msr 0x:44d520
> Wallclock test, threshold 5
> Seconds get from host:     1409160326
> Seconds get from kvmclock: 1409153484
> Offset:                    -6842
> offset too large!
> Check the stability of raw cycle ...
> Worst warp -6841795339348
> Total vcpus: 2
> Test  loops: 10000000
> Total warps:  1
> Total stalls: 0
> Worst warp:   -6841795339348
> Raw cycle is not stable
> Monotonic cycle test:
> Worst warp -6836691572679
> Total vcpus: 2
> Test  loops: 10000000
> Total warps:  1
> Total stalls: 0
> Worst warp:   -6836691572679
> Measure the performance of raw cycle ...
> Total vcpus: 2
> Test  loops: 10000000
> TSC cycles:  1098400654
> Measure the performance of adjusted cycle ...
> Total vcpus: 2
> Test  loops: 10000000
> TSC cycles:  1106302952
> Return value from qemu: 3
> 
> This is another test that fails or hangs, this passes in 3.13, but fails
> on 3.16 with my testing. I'll dig into this more perhaps to find out
> which commit changes things.
> 
> ./x86-run x86/vmx.flat -smp 1 -cpu host,+vmx | grep -v PASS
> qemu-system-x86_64 -enable-kvm -device pc-testdev -device
> isa-debug-exit,iobase=0xf4,iosize=0x4 -display none -serial stdio
> -device pci-testdev -kernel x86/vmx.flat -smp 1 -cpu host,+vmx
> enabling apic
> paging enabled
> cr0 = 80010011
> cr3 = 7fff000
> cr4 = 20
> 
> Test suite: VMX capability reporting
> 
> Test suite: vmenter
> 
> Test suite: preemption timer
> 
> Test suite: control field PAT
> 
> Test suite: control field EFER
> 
> Test suite: CR shadowing
> 
> Test suite: I/O bitmap
> 
> Test suite: instruction intercept
> 
> Test suite: EPT framework
> FAIL: EPT violation - paging structure
> 
> Test suite: interrupt
> `ASS: running a guest with interrupt acknowledgement set
> 
> Test suite: debug controls
> 
> SUMMARY: 109 tests, 1 unexpected failures
> Return value from qemu: 3
> 
> Here is the test case hanging:
> 
> ./x86-run x86/vmx.flat -smp 1 -cpu host,+vmx | grep -v PASS
> qemu-system-x86_64 -enable-kvm -device pc-testdev -device
> isa-debug-exit,iobase=0xf4,iosize=0x4 -display none -serial stdio
> -device pci-testdev -kernel x86/vmx.flat -smp 1 -cpu host,+vmx
> enabling apic
> paging enabled
> cr0 = 80010011
> cr3 = 7fff000
> cr4 = 20
> 
> Test suite: VMX capability reporting
> 
> Test suite: vmenter
> 
> Test suite: preemption timer
> 
> Test suite: control field PAT
> 
> Test suite: control field EFER
> 
> Test suite: CR shadowing
> 
> Test suite: I/O bitmap
> 
> Test suite: instruction intercept
> 
> Test suite: EPT framework
> FAIL: EPT violation - paging structure
> FAIL: EPT - MMIO access
> 
> Test suite: interrupt
> FAIL: intercepted interrupt + hlt
> 
> Thanks,
> --chris j arges
> 

  reply	other threads:[~2014-08-29 21:05 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-26 18:29 [PATCH 0/2] kvm-unit-tests: add check parameter to run_tests configuration Chris J Arges
2014-08-26 18:29 ` [PATCH 1/2] " Chris J Arges
2014-08-27 13:29   ` Paolo Bonzini
2014-08-27 14:42     ` [PATCH 1/2 v2] " Chris J Arges
2014-08-27 14:45     ` [PATCH 1/2 v3] " Chris J Arges
2014-08-27 14:52       ` Paolo Bonzini
2014-08-27 21:24         ` kvm-unit-test failures (was: [PATCH 1/2 v3] add check parameter to run_tests configuration) Chris J Arges
2014-08-27 22:05           ` Paolo Bonzini
2014-08-29 17:36             ` kvm-unit-test failures Chris J Arges
2014-08-29 21:05               ` Chris J Arges [this message]
2014-08-31 16:05                 ` Paolo Bonzini
2014-09-02 19:57                   ` Chris J Arges
2014-09-03 14:47                     ` Paolo Bonzini
2014-09-03 15:21                       ` Chris J Arges
2014-09-03 14:59                     ` Paolo Bonzini
2014-09-03 16:23                       ` Chris J Arges
2014-09-03 17:52                         ` Paolo Bonzini
2014-09-03 18:25                           ` Chris J Arges
     [not found]                             ` <54083688.6000201@redhat.com>
2014-09-04 11:33                               ` Paolo Bonzini
2014-09-04 12:24                                 ` Wanpeng Li
2014-09-04 13:11                                   ` Paolo Bonzini
2014-08-29 21:08               ` Paolo Bonzini
2014-08-29 21:18                 ` Chris J Arges
2014-08-26 18:29 ` [PATCH 2/2] x86/unittests.cfg: the pmu testcase requires that nmi_watchdog is disabled Chris J Arges
2014-08-27 13:29   ` Paolo Bonzini

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=5400EB01.1080106@canonical.com \
    --to=chris.j.arges@canonical.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.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.