Skip to content

x86: Illegal LEA test and FEP cleanups

Sean Christopherson kvm 1 version Applied

Status from this message: Queued, thanks.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v3 Latest7 patches 1 replyApplied

Changes in v3 from the cover letter

- Define __ASM_SEL/__ASM_FORM in desc.h to fix circular dependency.
- Move ASM_TRY_FEP() to desc.h
- Add is_fep_available() helper to simplify probing FEP.
- Use is_fep_available() in PMU test.

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/7x86: emulator.c: Save and restore exception handlersx86/emulator.c+38 -340 replies
2/7x86: Dedup 32-bit vs. 64-bit ASM_TRY() by stealing kernel's __ASM_SEL()lib/x86/desc.h+17 -140 replies
3/7x86: Introduce ASM_TRY_FEP() to handle exceptions on forced emulationlib/x86/desc.h x86/emulator.c x86/pmu.c+10 -50 replies
4/7x86: Add helper to detect if forced emulation prefix is availablelib/x86/desc.h x86/emulator.c+15 -140 replies
5/7x86: emulator.c: Use ASM_TRY() for the UD_VECTOR casesx86/emulator.c+11 -150 replies
6/7x86: Test emulator's handling of LEA with /regx86/emulator.c+15 -00 replies
7/7x86/pmu: Run the "emulation" test iff forced emulation is availablex86/pmu.c x86/unittests.cfg+8 -160 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [kvm-unit-tests PATCH v3 0/7] x86: Illegal LEA test and FEP cleanups

Slightly reworked version of Michal's series clean up the FEP mess and add a testcase for illegal LEA. Core ideas are all the same, just moved the common FEP functionality to desc.h to make it easier to use in other tests.

v3:
- Define __ASM_SEL/__ASM_FORM in desc.h to fix circular dependency.
- Move ASM_TRY_FEP() to desc.h
- Add is_fep_available() helper to simplify probing FEP.
- Use is_fep_available() in PMU test.

Michal Luczaj (4):
x86: emulator.c: Save and restore exception handlers
x86: Introduce ASM_TRY_FEP() to handle exceptions on forced emulation
x86: emulator.c: Use ASM_TRY() for the UD_VECTOR cases
x86: Test emulator's handling of LEA with /reg

Sean Christopherson (3):
x86: Dedup 32-bit vs. 64-bit ASM_TRY() by stealing kernel's

    __ASM_SEL()

x86: Add helper to detect if forced emulation prefix is available x86/pmu: Run the "emulation" test iff forced emulation is available

 lib/x86/desc.h    |  52 ++++++++++++++-----
 x86/emulator.c    | 127 +++++++++++++++++++++++-----------------------
 x86/pmu.c         |  18 +++----
 x86/unittests.cfg |   7 ---
 4 files changed, 110 insertions(+), 94 deletions(-)

base-commit: a106b30d39425b7afbaa3bbd4aab16fd26d333e7

Signature · 1 line
2.37.1.559.g78731f0fdb-goog