Skip to content

x86: Add "safe" macros to wrap ASM_TRY()

Sean Christopherson kvm 1 version Applied

Status from this message: Applied to kvm-x86 next, thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 1 replyApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/5x86: Add macros to wrap ASM_TRY() for single instructionslib/x86/desc.h x86/memory.c+40 -460 replies
2/5x86: Convert inputs-only "safe" instruction helpers to asm_safe()lib/x86/processor.h+4 -170 replies
3/5x86: Add macros to wrap ASM_TRY() for single instructions with output(s)lib/x86/desc.h lib/x86/processor.h+38 -180 replies
4/5x86: Move invpcid_safe() to processor.h and convert to asm_safe()lib/x86/processor.h x86/pcid.c+7 -80 replies
5/5x86: Move XSETBV and XGETBV "safe" helpers to processor.hlib/x86/processor.h x86/xsave.c+22 -310 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [kvm-unit-tests PATCH 0/5] x86: Add "safe" macros to wrap ASM_TRY()

Provide macros to wrap single instructions with ASM_TRY(), and to automagically report success/fault as appropriate. In other words, make it easier to write code for testing (non)faulting instruction behavior.

Sean Christopherson (5):
x86: Add macros to wrap ASM_TRY() for single instructions
x86: Convert inputs-only "safe" instruction helpers to asm_safe()
x86: Add macros to wrap ASM_TRY() for single instructions with
output(s)
x86: Move invpcid_safe() to processor.h and convert to asm_safe()
x86: Move XSETBV and XGETBV "safe" helpers to processor.h

 lib/x86/desc.h      | 48 ++++++++++++++++++++++++++
 lib/x86/processor.h | 82 +++++++++++++++++++++++++--------------------
 x86/memory.c        | 60 ++++++++-------------------------
 x86/pcid.c          |  8 -----
 x86/xsave.c         | 31 ++---------------
 5 files changed, 110 insertions(+), 119 deletions(-)

base-commit: 408e9eaae1c628b4895c213ee1eeb9ab3f42effb

Signature · 1 line
2.40.0.348.gf938b09366-goog