linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv4 0/4] Add generic MMIO instruction deconding to be used in SEV and TDX
@ 2021-11-30 18:49 Kirill A. Shutemov
  2021-11-30 18:49 ` [PATCHv4 1/4] x86/insn-eval: Handle insn_get_opcode() failure Kirill A. Shutemov
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Kirill A. Shutemov @ 2021-11-30 18:49 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Tom Lendacky,
	Joerg Roedel
  Cc: Kuppuswamy Sathyanarayanan, Andi Kleen, Dave Hansen,
	Sean Christopherson, Peter Zijlstra, Nakajima, Jun, x86,
	linux-kernel, Kirill A. Shutemov

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

-- 
2.32.0

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

end of thread, other threads:[~2021-11-30 22:57 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-30 18:49 [PATCHv4 0/4] Add generic MMIO instruction deconding to be used in SEV and TDX Kirill A. Shutemov
2021-11-30 18:49 ` [PATCHv4 1/4] x86/insn-eval: Handle insn_get_opcode() failure Kirill A. Shutemov
2021-11-30 22:56   ` [tip: x86/misc] " tip-bot2 for Kirill A. Shutemov
2021-11-30 18:49 ` [PATCHv4 2/4] x86/insn-eval: Introduce insn_get_modrm_reg_ptr() Kirill A. Shutemov
2021-11-30 22:56   ` [tip: x86/misc] " tip-bot2 for Kirill A. Shutemov
2021-11-30 18:49 ` [PATCHv4 3/4] x86/insn-eval: Introduce insn_decode_mmio() Kirill A. Shutemov
2021-11-30 22:56   ` [tip: x86/misc] " tip-bot2 for Kirill A. Shutemov
2021-11-30 18:49 ` [PATCHv4 4/4] x86/sev-es: Use insn_decode_mmio() for MMIO implementation Kirill A. Shutemov
2021-11-30 22:56   ` [tip: x86/misc] " tip-bot2 for Kirill A. Shutemov
2021-11-30 22:11 ` [PATCHv4 0/4] Add generic MMIO instruction deconding to be used in SEV and TDX Tom Lendacky

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