Skip to content

Add generic MMIO instruction deconding to be used in SEV and TDX

Kirill A. Shutemov lkml 4 versions – Applied

Status from this message: The following commit has been merged into the x86/misc branch of tip:

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest4 patches 1 replyApplied
  2. v34 patches 3 repliesSuperseded
  3. v23 patches 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v13 patches6 repliesSuperseded

Changes in v4 from the cover letter

- Use enum mmio_type inside insn_decode_mmio() (Tom)
- Keep a comment in vc_handle_mmio() (Tom)
- Tested-by on AMD HW from Joerg.

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/4x86/insn-eval: Handle insn_get_opcode() failurearch/x86/lib/insn-eval.c+3 -20 replies
2/4x86/insn-eval: Introduce insn_get_modrm_reg_ptr()arch/x86/include/asm/insn-eval.h arch/x86/lib/insn-eval.c+21 -00 replies
3/4x86/insn-eval: Introduce insn_decode_mmio()arch/x86/include/asm/insn-eval.h arch/x86/lib/insn-eval.c+96 -00 replies
4/4x86/sev-es: Use insn_decode_mmio() for MMIO implementationarch/x86/kernel/sev.c+41 -1310 replies

Reviews trailers per patch

3 of 4 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchJoerg RoedelAndi KleenTony LuckTom Lendacky
SeriesA-b
1/4T-b
2/4T-b R-b R-b
3/4T-b R-b R-b
4/4T-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v4 thread

Cover letter [PATCHv4 0/4] Add generic MMIO instruction deconding to be used in SEV and TDX

Both AMD SEV and Intel TDX has to decode MMIO instruction to be able to handle MMIO.

Extract insn_decode_mmio() from SEV code. TDX will also use this helper.

v4:
- Use enum mmio_type inside insn_decode_mmio() (Tom)
- Keep a comment in vc_handle_mmio() (Tom)
- Tested-by on AMD HW from Joerg.
v3:
- Handle insn_get_opcode() in is_string_insn()
v2:
- insn_get_modrm_reg_ptr() returns unsigned long pointer now (PeterZ);
- Handle insn_get_opcode() failure in insn_decode_mmio() (PeterZ);

Kirill A. Shutemov (4):
x86/insn-eval: Handle insn_get_opcode() failure x86/insn-eval: Introduce insn_get_modrm_reg_ptr() x86/insn-eval: Introduce insn_decode_mmio() x86/sev-es: Use insn_decode_mmio() for MMIO implementation

 arch/x86/include/asm/insn-eval.h |  13 +++
 arch/x86/kernel/sev.c            | 172 ++++++++-----------------------
 arch/x86/lib/insn-eval.c         | 109 +++++++++++++++++++-
 3 files changed, 161 insertions(+), 133 deletions(-)
Signature · 1 line
2.32.0