~canonical-kernel-team/+git/kvm-unit-tests:tip-testing

Last commit made on 2024-01-02
Get this branch:
git clone -b tip-testing https://git.launchpad.net/~canonical-kernel-team/+git/kvm-unit-tests
Members of Canonical Kernel Team can upload to this branch. Log in for directions.

Branch merges

Branch information

Name:
tip-testing
Repository:
lp:~canonical-kernel-team/+git/kvm-unit-tests

Recent commits

b73ec38... by Po-Hsu Lin

UBUNTU: SAUCE: split failed tests out

BugLink: https://bugs.launchpad.net/bugs/1938875

vmx test contain a bunch of different tests.
Split failed test cases in vmx out as standalone tests to improve our
test granularity. Make it easier to do result hinting and allow this
test to finish properly without being terminated prematurely.

This SAUCE patch will split the following tests out of vmx:
  * rdtsc_vmexit_diff_test
  * test_vmread_flags_touch
  * test_vmwrite_flags_touch
  * test_vmwrite_vmread
  * test_vmxon
  * vmx_apic_passthrough_test
  * vmx_controls_test
  * vmx_cr_load_test
  * vmx_cr4_osxsave_test
  * vmx_db_test
  * vmx_guest_state_area_test
  * vmx_hlt_with_rvi_test
  * vmx_host_state_area_test
  * vmx_intr_window_test
  * vmx_mtf_test
  * vmx_mtf_pdpte_test
  * vmx_nmi_window_test
  * vmx_pending_event_test
  * vmx_preemption_timer_tf_test
  * vmx_preemption_timer_zero_test
  * vmx_store_tsc_test

Signed-off-by: Po-Hsu Lin <email address hidden>

02d8bef... by Nina Schoetterl-Glausch <email address hidden>

pretty_print_stacks: modify relative path calculation

Don't assume we can get a relative path by cutting of certain prefixes,
since this isn't guaranteed to work.
Instead use a library function.
Also normalize paths in order to take care of symlinks.

Fixes: a9143a24 ("scripts: pretty print stack traces")
Signed-off-by: Nina Schoetterl-Glausch <email address hidden>
Tested-by: Thomas Huth <email address hidden>
Message-Id: <email address hidden>
Signed-off-by: Thomas Huth <email address hidden>

3ad01e6... by Nina Schoetterl-Glausch <email address hidden>

pretty_print_stacks: support unknown line numbers

Handle the case where addr2line cannot determine a line number.
Skip printing lines for this frame in this case.

Fixes: a9143a24 ("scripts: pretty print stack traces")
Signed-off-by: Nina Schoetterl-Glausch <email address hidden>
Tested-by: Thomas Huth <email address hidden>
Message-Id: <email address hidden>
Signed-off-by: Thomas Huth <email address hidden>

32e7ba0... by Nina Schoetterl-Glausch <email address hidden>

pretty_print_stacks: prevent invalid address arguments

If a return address is zero, the script will pass -1 to addr2line which
it considers an invalid flag.
Zero is an unlikely return address, but we might see it, for example
because the backtrace is unreliable on s390x if there is an interrupt
frame on the stack.

Fixes: a9143a24 ("scripts: pretty print stack traces")
Signed-off-by: Nina Schoetterl-Glausch <email address hidden>
Tested-by: Thomas Huth <email address hidden>
Message-Id: <email address hidden>
Signed-off-by: Thomas Huth <email address hidden>

73ee31a... by Paolo Bonzini <email address hidden>

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

x86 fixes, cleanups, and new testcases:

 - Fix goofs in the configuration related to the new FEP access testcases
 - Add a FEP test for an CPL>DPL non-conforming segment load
 - Fix issues with the RDPID testcase in the "tsc" test
 - Fix various assembler warnings
 - Add x2APIC testcases to the "msr" test
 - Add PRED_CMD and FLUSH_CMD testscases to the "msr" test

5cf6a3f... by Sean Christopherson <email address hidden>

x86/msr: Add testcases for MSR_IA32_FLUSH_CMD and its L1D_FLUSH command

Add test coverage to verify MSR_IA32_FLUSH_CMD is write-only, that it can
be written with '0' (nop command) and '1' (L1D flush command) when the L1D
flush command is suported, and that writing any other bit (1-63) triggers
a #GP due to the bits/commands being reserved.

Signed-off-by: Sean Christopherson <email address hidden>
Signed-off-by: Paolo Bonzini <email address hidden>
Message-Id: <email address hidden>
Signed-off-by: Paolo Bonzini <email address hidden>

fbd9808... by Sean Christopherson <email address hidden>

x86/msr: Add testcases for MSR_IA32_PRED_CMD and its IBPB command

Add test coverage to verify MSR_IA32_PRED_CMD is write-only, that it can
be written with '0' (nop command) and '1' (IBPB command) when IBPB is
supported by the CPU (SPEC_CTRL on Intel, IBPB on AMD). Do not check
that writing any other bit (1-63) triggers a #GP due to the bits/commands
being reserved, because some versions of the microcode do not do that.

Signed-off-by: Sean Christopherson <email address hidden>
Signed-off-by: Paolo Bonzini <email address hidden>
Message-Id: <email address hidden>
Signed-off-by: Paolo Bonzini <email address hidden>

4fba1a2... by Sean Christopherson <email address hidden>

x86: Add define for MSR_IA32_PRED_CMD's PRED_CMD_IBPB (bit 0)

Add a define for PRED_CMD_IBPB and use it to replace the open coded '1' in
the nVMX library.

Signed-off-by: Sean Christopherson <email address hidden>
Signed-off-by: Paolo Bonzini <email address hidden>
Message-Id: <email address hidden>
Signed-off-by: Paolo Bonzini <email address hidden>

7c47d0d... by Sean Christopherson <email address hidden>

x86/msr: Add testcases for x2APIC MSRs

Verify that reads and writes to x2APIC MSRs #GP when x2APIC is disabled,
and that reads and writes honor KVM's emulation (which follows Intel
behavior) when x2APIC is enabled. E.g. verify that writes to read-only
registers #GP, reads to write-onliy registers #GP, etc...

Write '0' to write-only registers to play nice with AMD's more restrictive
behavior (Intel doesn't care what value is written).

Note, the x2APIC enabled testcases will likely fail if run on AMD bare
metal as the KVM doesn't emulate registers above self-IPI, i.e. MSRs that
are expected to #GP are presumably handled by AMD hardware.

Signed-off-by: Sean Christopherson <email address hidden>
Signed-off-by: Paolo Bonzini <email address hidden>
Message-Id: <email address hidden>
Signed-off-by: Paolo Bonzini <email address hidden>

f399af2... by Sean Christopherson <email address hidden>

x86/apic: Refactor x2APIC reg helper to provide exact semantics

Refactor x2apic_reg_reserved() into get_x2apic_reg_semantics() and have
it provide the semantics for all registers. The full semantics will be
used by the MSR test to verify KVM correctly emulates all x2APIC MSRs.

No functional change intended.

Signed-off-by: Sean Christopherson <email address hidden>
Signed-off-by: Paolo Bonzini <email address hidden>
Message-Id: <email address hidden>
Signed-off-by: Paolo Bonzini <email address hidden>