History log of /kvm-unit-tests/x86/hyperv_clock.c (Results 1 – 13 of 13)
Revision Date Author Comments
# ddbcb8f4 14-Mar-2024 Paolo Bonzini <bonzini@gnu.org>

Merge branch 'nohv_v2_wstimer_direct' into 'master'

x86: hyperv-v: Various unmerged patches

See merge request kvm-unit-tests/kvm-unit-tests!52


# bf2c53fd 06-Mar-2024 Vitaly Kuznetsov <vkuznets@redhat.com>

x86: hyperv-v: Rewrite flaky hv_clock_test()

hv_clock_test() is reported to be flaky:
https://bugzilla.kernel.org/show_bug.cgi?id=217516

The test tries measuring the divergence between MSR based cl

x86: hyperv-v: Rewrite flaky hv_clock_test()

hv_clock_test() is reported to be flaky:
https://bugzilla.kernel.org/show_bug.cgi?id=217516

The test tries measuring the divergence between MSR based clock and TSC
page over one second and then expects delta to stay within the measured
range over another two seconds. This works well for a completely idle
system but if tasks get scheduled out, rescheduled to a different CPU,...
the test fails. Widening the expected range helps to certain extent but
even when the expected delta is "max_delta * 1024" sporadic failures still
occur.

Rewrite the test completely to make it stable. Check two things:
- MSR based and TSC page clocksources never go backwards.
- MSR based clocksource read between to TSC page reads stays within the
interval.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>

show more ...


# 87ba477a 24-Oct-2023 Vitaly Kuznetsov <vkuznets@redhat.com>

x86: hyper-v: Unify hyperv_clock with other Hyper-V tests

Always do 'return report_summary()' at the end, use report_abort() when an
abnormality is detected.

Signed-off-by: Vitaly Kuznetsov <vkuzne

x86: hyper-v: Unify hyperv_clock with other Hyper-V tests

Always do 'return report_summary()' at the end, use report_abort() when an
abnormality is detected.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>

show more ...


# 0d6cb7b2 24-Jan-2022 Metin Kaya <metikaya@amazon.com>

x86: hyperv_clock: print sequence field of reference TSC page

Having TscSequence in the log message for completeness.

Signed-off-by: Metin Kaya <metikaya@amazon.com>
Signed-off-by: Vitaly Kuznetsov

x86: hyperv_clock: print sequence field of reference TSC page

Having TscSequence in the log message for completeness.

Signed-off-by: Metin Kaya <metikaya@amazon.com>
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>

show more ...


# b78f9e64 24-Jan-2022 Metin Kaya <metikaya@amazon.com>

x86: hyperv_clock: handle non-consecutive APIC IDs

smp_id() should not be used if APIC IDs are not allocated consecutively.
Fix it by using on_cpu_async() with CPU ID parameter.

Fixes: 907ce0f78c94

x86: hyperv_clock: handle non-consecutive APIC IDs

smp_id() should not be used if APIC IDs are not allocated consecutively.
Fix it by using on_cpu_async() with CPU ID parameter.

Fixes: 907ce0f78c94 ("KVM: x86: add hyperv clock test case")
Signed-off-by: Metin Kaya <metikaya@amazon.com>
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>

show more ...


# 5067df40 09-Jun-2021 Nadav Amit <nadav.amit@gmail.com>

x86/hyperv: skip hyperv-clock test if unsupported by host

Skip the hyperv-clock tests if time reference counter is unsupported by
the host, similarly to the way other hyperv tests first check suppor

x86/hyperv: skip hyperv-clock test if unsupported by host

Skip the hyperv-clock tests if time reference counter is unsupported by
the host, similarly to the way other hyperv tests first check support of
the host.

Signed-off-by: Nadav Amit <nadav.amit@gmail.com>
Message-Id: <20210609182945.36849-6-nadav.amit@gmail.com>

show more ...


# 31e68df7 08-Jun-2020 Paolo Bonzini <pbonzini@redhat.com>

x86: always set up SMP

Currently setup_vm cannot assume that it can invoke IPIs, and therefore
only initializes CR0/CR3/CR4 on the CPU it runs on. In order to keep the
initialization code clean, le

x86: always set up SMP

Currently setup_vm cannot assume that it can invoke IPIs, and therefore
only initializes CR0/CR3/CR4 on the CPU it runs on. In order to keep the
initialization code clean, let's just call smp_init (and therefore
setup_idt) unconditionally.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


# 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 ...


# db4898e8 27-Jun-2018 Thomas Huth <thuth@redhat.com>

Mark many test functions as static

... so we can compile these files with -Wmissing-prototypes, too.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <1530086528-21665-5-git-send-email-thu

Mark many test functions as static

... so we can compile these files with -Wmissing-prototypes, too.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <1530086528-21665-5-git-send-email-thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


# 5aca024e 22-Oct-2017 Paolo Bonzini <pbonzini@redhat.com>

lib: move page allocator here from x86

This is another step in porting the x86 (v)malloc implementation to
other architectures.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


# eb8445a9 13-Jun-2017 Andrew Jones <drjones@redhat.com>

x86/hyperv_clock: apply on_cpus

Signed-off-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>


# 45276b58 11-May-2017 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

x86/hyperv_clock: be explicit about mul instruction data size

With gcc 4.7.2, the build fails with:

x86/hyperv_clock.c: Assembler messages:
x86/hyperv_clock.c:21: Error: no instruction mnemonic suf

x86/hyperv_clock: be explicit about mul instruction data size

With gcc 4.7.2, the build fails with:

x86/hyperv_clock.c: Assembler messages:
x86/hyperv_clock.c:21: Error: no instruction mnemonic suffix given and no register operands; can't size instruction

In order to avoid this, make the mul instruction data size explicit by
adding the appropriate suffix. It operates on 64-bit data, so use
"mulq".

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>

show more ...


# 907ce0f7 01-Sep-2016 Paolo Bonzini <pbonzini@redhat.com>

KVM: x86: add hyperv clock test case

The test checks the relative precision of the reference TSC page
and the time reference counter.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>