History log of /kvm-unit-tests/x86/hyperv_synic.c (Results 1 – 18 of 18)
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


# 65e843e1 24-Oct-2023 Vitaly Kuznetsov <vkuznets@redhat.com>

x86: hyper-v: Use 'goto' instead of putting the whole test in an 'if' branch in hyperv_synic

Unify 'hyperv_synic' test with other Hyper-V tests by using the:

if (required-features-missing) {

x86: hyper-v: Use 'goto' instead of putting the whole test in an 'if' branch in hyperv_synic

Unify 'hyperv_synic' test with other Hyper-V tests by using the:

if (required-features-missing) {
report_skip();
goto done;
}
...

done:
return report_summary();

pattern.

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

show more ...


# e53b4ace 04-Jan-2022 Metin Kaya <metikaya@amazon.com>

x86: hyperv: improve naming of stimer functions

- synic_supported() is renamed to hv_synic_supported().
- stimer_supported() is renamed to hv_stimer_supported().

Signed-off-by: Metin Kaya <metikaya

x86: hyperv: improve naming of stimer functions

- synic_supported() is renamed to hv_synic_supported().
- stimer_supported() is renamed to hv_stimer_supported().

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

show more ...


# cd5f2fb4 20-Sep-2023 Paolo Bonzini <pbonzini@redhat.com>

Merge tag 'kvm-x86-2023.09.01' of https://github.com/kvm-x86/kvm-unit-tests into HEAD

x86 fixes, cleanups, and new testcases, and a few generic changes

- Fix a bug in runtime.bash that caused it t

Merge tag 'kvm-x86-2023.09.01' of https://github.com/kvm-x86/kvm-unit-tests into HEAD

x86 fixes, cleanups, and new testcases, and a few generic changes

- Fix a bug in runtime.bash that caused it to mishandle "check" strings with
multiple entries, e.g. a test that depends on multiple module params
- Make the PMU tests depend on vPMU support being enabled in KVM
- Fix PMU's forced emulation test on CPUs with full-width writes
- Add a PMU testcase for measuring TSX transactional cycles
- Nested SVM testcase for virtual NMIs
- Move a pile of code to ASM_TRY() and "safe" helpers
- Set up the guest stack in the LBRV tests so that the tests don't fail if the
compiler decides to generate function calls in guest code
- Ignore the "mispredict" flag in nSVM's LBRV tests to fix false failures
- Clean up usage of helpers that disable interrupts, e.g. stop inserting
unnecessary nops
- Add helpers to dedup code for programming the APIC timer
- Fix a variety of bugs in nVMX testcases related to being a 64-bit host

show more ...


# 787f0aeb 22-Nov-2022 Maxim Levitsky <mlevitsk@redhat.com>

x86: replace irq_{enable|disable}() with sti()/cli()

This removes a layer of indirection which is strictly
speaking not needed since its x86 code anyway.

Signed-off-by: Maxim Levitsky <mlevitsk@red

x86: replace irq_{enable|disable}() with sti()/cli()

This removes a layer of indirection which is strictly
speaking not needed since its x86 code anyway.

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Reviewed-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Link: https://lore.kernel.org/r/20221122161152.293072-2-mlevitsk@redhat.com
[sean: move and reword IRQ shadow to be above and about safe_halt()]
Signed-off-by: Sean Christopherson <seanjc@google.com>

show more ...


# 198dfd0e 05-Oct-2021 Janis Schoetterl-Glausch <scgl@linux.ibm.com>

Use report_fail(...) instead of report(0/false, ...)

Whitespace is kept consistent with the rest of the file.

Signed-off-by: Janis Schoetterl-Glausch <scgl@linux.ibm.com>
Reviewed-by: Thomas Huth <

Use report_fail(...) instead of report(0/false, ...)

Whitespace is kept consistent with the rest of the file.

Signed-off-by: Janis Schoetterl-Glausch <scgl@linux.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Message-Id: <20211005090921.1816373-5-scgl@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.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 ...


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


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

x86/hyperv_synic: apply on_cpus

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


# d2c248af 06-Jun-2017 Roman Kagan <rkagan@virtuozzo.com>

hyperv: don't take vcpu where inappropriate

MSRs can not be written on a forein cpu, so the functions to create /
destroy sint routes, which also enable / disable the respective SINTs,
can only run

hyperv: don't take vcpu where inappropriate

MSRs can not be written on a forein cpu, so the functions to create /
destroy sint routes, which also enable / disable the respective SINTs,
can only run on the current cpu. To avoid confusion, stop taking vcpu
argument and use smp_id() internally.

While chaning the function signatures, also adjust them to be explicit
about the width of input values.

Signed-off-by: Roman Kagan <rkagan@virtuozzo.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>

show more ...


# fd6aada0 17-May-2017 Radim Krčmář <rkrcmar@redhat.com>

use %# instead of 0x% in all format strings

It's one character shorter, properly prefixed, and also provides error
detection: %#d triggers a warning.

Done with `sed -i 's/0x%/%#/g' **/*.[ch]` to mo

use %# instead of 0x% in all format strings

It's one character shorter, properly prefixed, and also provides error
detection: %#d triggers a warning.

Done with `sed -i 's/0x%/%#/g' **/*.[ch]` to motivate the use of %#,
existing padding was raised by 2 to account for the counted "0x" (output
should be the same).

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

show more ...


# 2ce7a6c7 17-May-2017 Radim Krčmář <rkrcmar@redhat.com>

fix conversions in report()s

Fix conversions that would trigger a warning if the format was checked
by a compiler.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: David Hildenbrand <david@

fix conversions in report()s

Fix conversions that would trigger a warning if the format was checked
by a compiler.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>

show more ...


# 5731572b 25-Oct-2016 Peter Xu <peterx@redhat.com>

tests: don't call setup_idt() if with smp_init()

smp_init() will setup idt as default. No need to call it twice.

Signed-off-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@r

tests: don't call setup_idt() if with smp_init()

smp_init() will setup idt as default. No need to call it twice.

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

show more ...


# 55601383 06-Jun-2016 Alexander Gordeev <agordeev@redhat.com>

x86: Introduce lib/x86/asm/io.h

Make x86 consistent with other architectures and put
IO specific defines to lib/x86/asm/io.h

Cc: Andrew Jones <drjones@redhat.com>
Cc: Thomas Huth <thuth@redhat.com>

x86: Introduce lib/x86/asm/io.h

Make x86 consistent with other architectures and put
IO specific defines to lib/x86/asm/io.h

Cc: Andrew Jones <drjones@redhat.com>
Cc: Thomas Huth <thuth@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


# 32b9603c 11-May-2016 Radim Krčmář <rkrcmar@redhat.com>

x86/*: report skipped tests

Some care to consistency was given. A test that ended in
report_summary without any report is considered as skipped;
only x86/hyperv_synic used report_skip resulting in

x86/*: report skipped tests

Some care to consistency was given. A test that ended in
report_summary without any report is considered as skipped;
only x86/hyperv_synic used report_skip resulting in

SKIP hyperv_synic (1 tests, 1 skipped)

instead of the more consistent

SKIP hyperv_syinc (0 tests)

Drew pointed out that tscdeadline_latency.c doesn't report skipped
tests. tscdeadline_latency needs complete refactoring and is not run
with ./run_tests, so I ignored it.

Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Message-Id: <1462983171-4208-3-git-send-email-rkrcmar@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

ff

show more ...


# 98fb3357 08-Dec-2015 Andrey Smetanin <asmetanin@virtuozzo.com>

x86/hyperv: Move Hyper-V generic code into hyperv.h/hyperv.c

This code will be used as shared between hyperv_synic
and hyperv_stimer tests.

Signed-off-by: Andrey Smetanin <asmetanin@virtuozzo.com>

x86/hyperv: Move Hyper-V generic code into hyperv.h/hyperv.c

This code will be used as shared between hyperv_synic
and hyperv_stimer tests.

Signed-off-by: Andrey Smetanin <asmetanin@virtuozzo.com>
CC: Paolo Bonzini <pbonzini@redhat.com>
CC: Marcelo Tosatti <mtosatti@redhat.com>
CC: Roman Kagan <rkagan@virtuozzo.com>
CC: Denis V. Lunev <den@openvz.org>
CC: qemu-devel@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


# 17fdf23e 26-Oct-2015 Andrey Smetanin <asmetanin@virtuozzo.com>

x86: hyperv_synic: Hyper-V SynIC test

Hyper-V SynIC is a Hyper-V synthetic interrupt controller.

The test runs on every vCPU and performs the following steps:
* read from all Hyper-V SynIC MSR's
*

x86: hyperv_synic: Hyper-V SynIC test

Hyper-V SynIC is a Hyper-V synthetic interrupt controller.

The test runs on every vCPU and performs the following steps:
* read from all Hyper-V SynIC MSR's
* setup Hyper-V SynIC evt/msg pages
* setup SINT's routing
* inject SINT's into destination vCPU by 'hyperv-synic-test-device'
* wait for SINT's isr's completion
* clear Hyper-V SynIC evt/msg pages and destroy SINT's routing

Signed-off-by: Andrey Smetanin <asmetanin@virtuozzo.com>
Reviewed-by: Roman Kagan <rkagan@virtuozzo.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Vitaly Kuznetsov <vkuznets@redhat.com>
CC: "K. Y. Srinivasan" <kys@microsoft.com>
CC: Gleb Natapov <gleb@kernel.org>
CC: Paolo Bonzini <pbonzini@redhat.com>
CC: Roman Kagan <rkagan@virtuozzo.com>
CC: Denis V. Lunev <den@openvz.org>
CC: qemu-devel@nongnu.org
CC: virtualization@lists.linux-foundation.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...