#
a299895b |
| 06-Dec-2019 |
Thomas Huth <thuth@redhat.com> |
Switch the order of the parameters in report() and report_xfail()
Commit c09c54c66b1df ("lib: use an argument which doesn't require default argument promotion") fixed a warning that occurs with Clan
Switch the order of the parameters in report() and report_xfail()
Commit c09c54c66b1df ("lib: use an argument which doesn't require default argument promotion") fixed a warning that occurs with Clang, but introduced a regression: If the "pass" parameter is a value which has only set the condition bits in the upper 32 bits of a 64 bit value, the condition is now false since the value is truncated to "unsigned int" so that the upper bits are simply discarded.
We fixed it by reverting the commit, but that of course also means trouble with Clang again. We can not use "bool" if it is the last parameter before the variable argument list. The proper fix is to swap the parameters around and make the format string the last parameter.
This patch (except the changes in lib/libcflat.h and lib/report.c and some rebase conflicts along the way) has basically been created with following coccinelle script (with some additional manual tweaking of long and disabled lines afterwards):
@@ expression fmt; expression pass; expression list args; @@ report( -fmt, pass +pass, fmt , args);
@@ expression fmt; expression pass; expression list args; @@ report_xfail( -fmt, xfail, pass +xfail, pass, fmt , args);
Tested-by: Andrew Jones <drjones@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <20191206113102.14914-1-thuth@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
81a63732 |
| 04-Oct-2019 |
Andre Przywara <andre.przywara@arm.com> |
arm: timer: Split variable output data from test name
For some tests we mix variable diagnostic output with the test name, which leads to variable test line, confusing some higher level frameworks.
arm: timer: Split variable output data from test name
For some tests we mix variable diagnostic output with the test name, which leads to variable test line, confusing some higher level frameworks.
Split the output to always use the same test name for a certain test, and put diagnostic output on a separate line using the INFO: tag.
Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Andrew Jones <drjones@redhat.com> Signed-off-by: Andrew Jones <drjones@redhat.com>
show more ...
|
#
55554ec8 |
| 29-Jul-2019 |
Alexandru Elisei <alexandru.elisei@arm.com> |
arm: timer: Fix potential deadlock when waiting for interrupt
Commit 204e85aa9352 ("arm64: timer: a few test improvements") added a call to report_info after enabling the timer and before the wfi in
arm: timer: Fix potential deadlock when waiting for interrupt
Commit 204e85aa9352 ("arm64: timer: a few test improvements") added a call to report_info after enabling the timer and before the wfi instruction. The uart that printf uses is emulated by userspace and is slow, which makes it more likely that the timer interrupt will fire before executing the wfi instruction, which leads to a deadlock.
An interrupt can wake up a CPU out of wfi, regardless of the PSTATE.{A, I, F} bits. Fix the deadlock by masking interrupts on the CPU before enabling the timer and unmasking them after the wfi returns so the CPU can execute the timer interrupt handler.
Suggested-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
204e85aa |
| 03-Jun-2019 |
Andrew Jones <drjones@redhat.com> |
arm64: timer: a few test improvements
1) Ensure set_timer_irq_enabled() clears the pending interrupt from the gic before proceeding with the next test. 2) Inform user we're about to wait for an i
arm64: timer: a few test improvements
1) Ensure set_timer_irq_enabled() clears the pending interrupt from the gic before proceeding with the next test. 2) Inform user we're about to wait for an interrupt - just in case we never come back... 3) Allow the user to choose just vtimer or just ptimer tests, or to reverse their order with -append 'ptimer vtimer'.
Signed-off-by: Andrew Jones <drjones@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
497d0f12 |
| 21-Sep-2018 |
Paolo Bonzini <pbonzini@redhat.com> |
Merge tag 'for-master' of https://github.com/rhdrjones/kvm-unit-tests into HEAD
arm/arm64 patches ready for master
|
#
4d1d87b1 |
| 16-Jul-2018 |
Andre Przywara <andre.przywara@arm.com> |
arm64: timer: Add TVAL timeout IRQ trigger test
So far we were only testing the CVAL register. Add a test which programs a (relative) TVAL value to check this functionality as well. Also we go into
arm64: timer: Add TVAL timeout IRQ trigger test
So far we were only testing the CVAL register. Add a test which programs a (relative) TVAL value to check this functionality as well. Also we go into WFI and wait for the interrupt to release us from it. The timer tests are run with a 2 second timeout on the host side, so that any failure in coming back would be covered.
Signed-off-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Andrew Jones <drjones@redhat.com>
show more ...
|
#
dc329e46 |
| 16-Jul-2018 |
Andre Przywara <andre.przywara@arm.com> |
arm64: timer: add TVAL accessors
The ARM arch timer features the CVAL register, which holds an absolute value that is compared against the counter value. But there is also the TVAL register, which i
arm64: timer: add TVAL accessors
The ARM arch timer features the CVAL register, which holds an absolute value that is compared against the counter value. But there is also the TVAL register, which is defined as (CVAL - counter), and can be used to program or read relative timeouts.
Add accessors for the TVAL register, to be able to read and write them easily later.
Signed-off-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Andrew Jones <drjones@redhat.com>
show more ...
|
#
9e5e817b |
| 10-Aug-2017 |
Andrew Jones <drjones@redhat.com> |
arm64: timer: guard ptimer tests with errata
Rather than unconditionally attempting ptimer tests, which won't work on older KVM, check the KVM version first, reporting SKIP when the tests would fail
arm64: timer: guard ptimer tests with errata
Rather than unconditionally attempting ptimer tests, which won't work on older KVM, check the KVM version first, reporting SKIP when the tests would fail. This also allows vtimer and ptimer tests to be merged into just "timer" tests.
Signed-off-by: Andrew Jones <drjones@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
86943f8a |
| 03-Aug-2017 |
Christoffer Dall <cdall@linaro.org> |
arm64: timer: Use correct counter for !pending_before
We were using the virtual counter to calculate a timer cval which is 10 seconds in the future, but this obviously doesn't work for the physical
arm64: timer: Use correct counter for !pending_before
We were using the virtual counter to calculate a timer cval which is 10 seconds in the future, but this obviously doesn't work for the physical timer which is bases on the physical counter.
Make sure we use a properly paired timer/counter pair.
Reported-by: Andrew Jones <drjones@redhat.com> Signed-off-by: Christoffer Dall <cdall@linaro.org> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
show more ...
|
#
002f5a9d |
| 26-Jul-2017 |
Christoffer Dall <cdall@linaro.org> |
arm64: timer: Avoid IRQ race in timer test
The current timer test relies on testing the pending state of the timer before the interrupt handler has run which could lower the pending signal again (be
arm64: timer: Avoid IRQ race in timer test
The current timer test relies on testing the pending state of the timer before the interrupt handler has run which could lower the pending signal again (because it masks the timer output signal).
What we really want is to make sure the output signal from the timer as perceived by the virtual interrupt controller is low when the timer is programmed some time far in the future. The proper way to do that is to disable the timer interrupt on the distributor and then reading its pending state.
Signed-off-by: Christoffer Dall <cdall@linaro.org> Message-Id: <20170726114249.17774-1-cdall@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
0b41d18b |
| 13-Jul-2017 |
Christoffer Dall <cdall@linaro.org> |
arm64: timer: Add support for phys timer testing
Rearrange the code to be able to reuse as much as posible and add support for testing the physical timer as well.
Also change the default unittests
arm64: timer: Add support for phys timer testing
Rearrange the code to be able to reuse as much as posible and add support for testing the physical timer as well.
Also change the default unittests configuration to run a separate vtimer and ptimer test so that older kernels without ptimer support just show a failure.
Signed-off-by: Christoffer Dall <cdall@linaro.org> Message-Id: <20170713192009.10069-4-cdall@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
e5d789d1 |
| 13-Jul-2017 |
Christoffer Dall <cdall@linaro.org> |
arm64: timer: Fix test on APM X-Gene
When running the vtimer test on an APM X-Gene, setting the timer value to (2^64 - 1) apparently results in the timer always firing, even thought the counter is m
arm64: timer: Fix test on APM X-Gene
When running the vtimer test on an APM X-Gene, setting the timer value to (2^64 - 1) apparently results in the timer always firing, even thought the counter is mich lower than the cval.
Since the idea of the code is to set everything up and schedule the timer for some time very far in the future, take a pragmatic approach and just add 10s worth of delay instead.
Signed-off-by: Christoffer Dall <cdall@linaro.org> Message-Id: <20170713192009.10069-3-cdall@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
3c58864d |
| 13-Jul-2017 |
Christoffer Dall <cdall@linaro.org> |
arm64: timer: Fix vtimer interrupt test
The timer irq_handler is supposed to mask the timer signal, but unfortunately also disables the timer at the same time, even though we loop and wait on ISTATU
arm64: timer: Fix vtimer interrupt test
The timer irq_handler is supposed to mask the timer signal, but unfortunately also disables the timer at the same time, even though we loop and wait on ISTATUS to become set.
According to the ARM ARM, "When the value of the ENABLE bit is 0, the ISTATUS field is UNKNOWN." This test happens to work on AMD Seattle, but doesn't work on Mustang or on QEMU with TCG.
Fix the problem by preserving the enable bit in the irq handler.
Signed-off-by: Christoffer Dall <cdall@linaro.org> Message-Id: <20170713192009.10069-2-cdall@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
310d1af7 |
| 04-Jul-2017 |
Andrew Jones <drjones@redhat.com> |
arm64: timer: check for vtimer interrupt
Signed-off-by: Andrew Jones <drjones@redhat.com> Message-Id: <20170704135838.9061-3-drjones@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
#
f2f220de |
| 04-Jul-2017 |
Alexander Graf <agraf@suse.de> |
arm64: add vtimer test
All virtualization capable ARM cores support the ARM virtual timer.
Add minimalistic check for firing a virtual timer event, confirming by checking that the timer pin is mark
arm64: add vtimer test
All virtualization capable ARM cores support the ARM virtual timer.
Add minimalistic check for firing a virtual timer event, confirming by checking that the timer pin is marked as pending on the GIC.
Signed-off-by: Alexander Graf <agraf@suse.de> [ Applied my review comments and a few other tweaks. ] Signed-off-by: Andrew Jones <drjones@redhat.com> Message-Id: <20170704135838.9061-2-drjones@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|