kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [kvm-unit-tests GIT PULL] x86: Fixes, cleanups, and new testcases
@ 2023-04-05 23:16 Sean Christopherson
  0 siblings, 0 replies; 3+ messages in thread
From: Sean Christopherson @ 2023-04-05 23:16 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: kvm

Please pull a smattering of changes, most of which have been floating around
for quite some time.

Thanks!

The following changes since commit 723a5703848d91f7aea8bc01d12fe8b1a6fc2391:

  nVMX: Add forced emulation variant of #PF access test (2023-04-04 13:10:21 -0400)

are available in the Git repository at:

  https://github.com/kvm-x86/kvm-unit-tests.git tags/kvm-x86-2023.04.05

for you to fetch changes up to 408e9eaae1c628b4895c213ee1eeb9ab3f42effb:

  x86/msr: Add testcases for MSR_IA32_FLUSH_CMD and its L1D_FLUSH command (2023-04-05 14:34:06 -0700)

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

----------------------------------------------------------------
David Matlack (2):
      x86: Run the tsc test with -cpu max
      x86: Mark RDPID asm volatile to avoid dropping instructions

Michal Luczaj (1):
      x86: Test CPL=3 DS/ES/FS/GS RPL=DPL=0 segment descriptor load

Sean Christopherson (8):
      x86: Set forced emulation access timeouts to 240
      x86: Exclude forced emulation #PF access test from base "vmx" test
      x86/msr: Skip built-in testcases if user provides custom MSR+value to test
      x86/apic: Refactor x2APIC reg helper to provide exact semantics
      x86/msr: Add testcases for x2APIC MSRs
      x86: Add define for MSR_IA32_PRED_CMD's PRED_CMD_IBPB (bit 0)
      x86/msr: Add testcases for MSR_IA32_PRED_CMD and its IBPB command
      x86/msr: Add testcases for MSR_IA32_FLUSH_CMD and its L1D_FLUSH command

Thomas Huth (2):
      x86/syscall: Add suffix to "sysret" to silence an assembler warning
      x86/flat.lds: Silence warnings about empty loadable segments

 lib/x86/apic.h      |  59 +++++++++---
 lib/x86/msr.h       |   4 +
 lib/x86/processor.h |   1 +
 x86/emulator64.c    |  16 ++++
 x86/flat.lds        |  14 ++-
 x86/msr.c           | 267 +++++++++++++++++++++++++++++++++++++---------------
 x86/syscall.c       |   2 +-
 x86/tsc.c           |   2 +-
 x86/unittests.cfg   |   6 +-
 x86/vmexit.c        |   2 +-
 x86/vmx_tests.c     |   6 +-
 11 files changed, 279 insertions(+), 100 deletions(-)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [kvm-unit-tests GIT PULL] x86: Fixes, cleanups, and new testcases
@ 2025-06-26 22:43 Sean Christopherson
  2025-07-08 15:04 ` Paolo Bonzini
  0 siblings, 1 reply; 3+ messages in thread
From: Sean Christopherson @ 2025-06-26 22:43 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: kvm, linux-kernel, Sean Christopherson

Please pull a self-centered set of KUT changes.

The following changes since commit 507612326c9417b6330b91f7931678a4c6866395:

  travis.yml: Remove the aarch64 job (2025-06-05 10:07:07 +0200)

are available in the Git repository at:

  https://github.com/kvm-x86/kvm-unit-tests.git tags/kvm-x86-2025.06.26

for you to fetch changes up to 525bdb5d65d51a367341f471eb1bcd505d73c51f:

  x86/pmu: Verify all available GP counters in check_counters_many() (2025-06-25 14:20:34 -0700)

----------------------------------------------------------------
x86 fixes, cleanups, and new test coverage

 - Ensure APIC is xAPIC mode for APIC MMIO tests.

 - Expand the I/O APIC routing reconfiguration vs. EOI interception testcase
   to validate multiple in-flight interrupts.

 - Fix a variety of minor PMU/PEBS bugs and warts.

 - Fix the nSVM MSR interception test to actually detect failures, and expand
   its coverage to validate more scenarios.

 - Add X86_PROPERTY_xxx macros (stolen from KVM selftests) and use them to
   clean up related code.

 - Add testcases for MSR_SPEC_CTRL, and an msr64 config to validate negative
   testcases (i.e. when MSRs aren't supposed to exist).

 - Disable PIT re-injection for all tests so that (x2)AVIC isn't inhibited due
   to enabling in-kernel PIT emulation.

 - Play nice with QEMU builds that disable VNX support.

----------------------------------------------------------------
Dapeng Mi (2):
      x86/pmu_pebs: Initalize and enable PMU interrupt (PMI_VECTOR)
      x86/pmu: Verify all available GP counters in check_counters_many()

Sean Christopherson (41):
      x86: apic: Move helpers for querying APIC state to library code
      x86: nSVM: Ensure APIC MMIO tests run with APIC in xAPIC mode
      x86: ioapic: Expand routing reconfiguration => EOI interception testcase
      runtime: Skip tests if the target "kernel" file doesn't exist
      x86/pks: Actually skip the PKS test if PKS isn't support
      x86/pmu: Explicitly zero PERF_GLOBAL_CTRL at start of PMU test
      x86/run: Specify "-vnc none" for QEMU if and only if QEMU supports VNC
      lib: Add and use static_assert() convenience wrappers
      x86: Call setup_idt() from start{32,64}(), not from smp_init()
      x86: Drop protection against setup_idt() being called multiple times
      x86: Move call to load_idt() out of setup_tr_and_percpu macro
      x86: Load IDT on BSP as part of setup_idt()
      x86: Cache availability of forced emulation during setup_idt()
      nVMX: Force emulation of LGDT/LIDT in iff FEP is available
      x86: nSVM: Actually report missed MSR intercepts as failures
      x86: nSVM: Test MSRs just outside the ranges of the MSR Permissions Map
      x86: nSVM: Clean up variable types and names in test_msr_intercept()
      x86: Expand the suite of bitops to cover all set/clear operations
      x86: nVMX: Use set_bit() instead of test_and_set_bit() when return is ignored
      x86: nSVM: Set MSRPM bit on-demand when testing interception
      x86: nSVM: Verify disabling {RD,WR}MSR interception behaves as expected
      x86: nSVM: Verify L1 and L2 see same MSR value when interception is disabled
      x86: Disable PIT re-injection for all tests to play nice with (x2)AVIC
      x86: Delete split IRQ chip variants of apic and ioapic tests
      x86: Encode X86_FEATURE_* definitions using a structure
      x86: Add X86_PROPERTY_* framework to retrieve CPUID values
      x86: Use X86_PROPERTY_MAX_VIRT_ADDR in is_canonical()
      x86: Implement get_supported_xcr0() using X86_PROPERTY_SUPPORTED_XCR0_{LO,HI}
      x86: Add and use X86_PROPERTY_INTEL_PT_NR_RANGES
      x86/pmu: Mark all arch events as available on AMD, and rename fields
      x86/pmu: Mark Intel architectural event available iff X <= CPUID.0xA.EAX[31:24]
      x86/pmu: Use X86_PROPERTY_PMU_* macros to retrieve PMU information
      x86/sev: Use VC_VECTOR from processor.h
      x86/sev: Skip the AMD SEV test if SEV is unsupported/disabled
      x86/sev: Define and use X86_FEATURE_* flags for CPUID 0x8000001F
      x86/sev: Use X86_PROPERTY_SEV_C_BIT to get the AMD SEV C-bit location
      x86/sev: Use amd_sev_es_enabled() to detect if SEV-ES is enabled
      x86: Move SEV MSR definitions to msr.h
      x86/msr: Treat PRED_CMD as support if CPU has SBPB
      x86/msr: Add a testcase to verify SPEC_CTRL exists (or not) as expected
      x86/msr: Add an "msr64" test configuration to validate negative cases

 lib/riscv/asm/isa.h      |   4 +-
 lib/s390x/asm/arch_def.h |   6 +-
 lib/s390x/fault.c        |   3 +-
 lib/util.h               |   3 +
 lib/x86/amd_sev.c        |  48 ++-----
 lib/x86/amd_sev.h        |  29 -----
 lib/x86/apic.h           |  21 +++
 lib/x86/asm/bitops.h     |  86 +++++++++++-
 lib/x86/desc.c           |  29 ++++-
 lib/x86/desc.h           |  14 +-
 lib/x86/msr.h            |  14 +-
 lib/x86/pmu.c            |  25 ++--
 lib/x86/pmu.h            |   8 +-
 lib/x86/processor.h      | 332 +++++++++++++++++++++++++++++++++--------------
 lib/x86/setup.c          |   1 -
 lib/x86/smp.c            |   1 -
 scripts/runtime.bash     |   5 +
 x86/access.c             |   2 +-
 x86/amd_sev.c            |  63 ++-------
 x86/apic.c               |  20 ---
 x86/cstart.S             |   3 +-
 x86/cstart64.S           |   2 +-
 x86/emulator.c           |  11 +-
 x86/emulator64.c         |   2 +-
 x86/ioapic.c             |  52 +++++++-
 x86/la57.c               |   4 +-
 x86/lam.c                |   6 +-
 x86/msr.c                |  36 ++++-
 x86/pks.c                |   2 +-
 x86/pmu.c                |  37 ++++--
 x86/pmu_pebs.c           |   3 +
 x86/run                  |  15 ++-
 x86/svm_npt.c            |  27 ++++
 x86/svm_tests.c          | 240 ++++++++++++++++++++++++++--------
 x86/unittests.cfg        |  30 ++---
 x86/vmx_tests.c          |  11 +-
 x86/xsave.c              |  11 +-
 37 files changed, 792 insertions(+), 414 deletions(-)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [kvm-unit-tests GIT PULL] x86: Fixes, cleanups, and new testcases
  2025-06-26 22:43 [kvm-unit-tests GIT PULL] x86: Fixes, cleanups, and new testcases Sean Christopherson
@ 2025-07-08 15:04 ` Paolo Bonzini
  0 siblings, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2025-07-08 15:04 UTC (permalink / raw)
  To: Sean Christopherson; +Cc: kvm, linux-kernel

On Fri, Jun 27, 2025 at 12:43 AM Sean Christopherson <seanjc@google.com> wrote:
>  - Play nice with QEMU builds that disable VNX support.

This mysterious VNX caught my attention. :)

This could be fixed in QEMU to accept "-vnc none", or could be changed
to "-display none" (-display being the newer and nicer option that
sums up -vnc, -sdl, -gtk and so on).

I'll send the patch and have pushed the rest in the meanwhile.

Paolo


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-07-08 15:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-26 22:43 [kvm-unit-tests GIT PULL] x86: Fixes, cleanups, and new testcases Sean Christopherson
2025-07-08 15:04 ` Paolo Bonzini
  -- strict thread matches above, loose matches on Subject: below --
2023-04-05 23:16 Sean Christopherson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).