lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <cover.1689151537.git.kai.huang@intel.com>
Date:   Wed, 12 Jul 2023 20:55:14 +1200
From:   Kai Huang <kai.huang@...el.com>
To:     peterz@...radead.org, kirill.shutemov@...ux.intel.com,
        linux-kernel@...r.kernel.org
Cc:     dave.hansen@...el.com, tglx@...utronix.de, bp@...en8.de,
        mingo@...hat.com, hpa@...or.com, x86@...nel.org, seanjc@...gle.com,
        pbonzini@...hat.com, kvm@...r.kernel.org, isaku.yamahata@...el.com,
        sathyanarayanan.kuppuswamy@...ux.intel.com, kai.huang@...el.com
Subject: [PATCH 00/10] Unify TDCALL/SEAMCALL and TDVMCALL assembly

Hi Peter, Kirill, all,

This series unifies the assembly code for TDCALL/SEAMCALL and TDVMCALL.
Now all of them use one singe TDX_MODULE_CALL asm macro.  I basically
followed Peter's code here:

https://lore.kernel.org/linux-mm/20230630120650.GB2534364@hirez.programming.kicks-ass.net/

With some differences that I found during my code writing and testing.

With this series, I have verified the TDX guest can boot successfully
and the TDX module can also be initialized successfully.

The last two patches are SEAMCALL patches that are needed for TDX host
patchset.  They are not mandatory to be here though, i.e., can be in the
TDX host support series.  I put them here so we can have a complete view
how TDCALL/SEAMCALL and TDVMCALL are implemented.

Could you help to review?  Thanks in advance.

Also cc Sean/Paolo/Isaku and KVM list for TDH.VP.ENTER part.

Kai Huang (10):
  x86/tdx: Zero out the missing RSI in TDX_HYPERCALL macro
  x86/tdx: Use cmovc to save a label in TDX_MODULE_CALL asm
  x86/tdx: Move FRAME_BEGIN/END to TDX_MODULE_CALL asm macro
  x86/tdx: Make macros of TDCALLs consistent with the spec
  x86/tdx: Rename __tdx_module_call() to __tdcall()
  x86/tdx: Pass TDCALL/SEAMCALL input/output registers via a structure
  x86/tdx: Extend TDX_MODULE_CALL to support more TDCALL/SEAMCALL leafs
  x86/tdx: Unify TDX_HYPERCALL and TDX_MODULE_CALL assembly
  x86/virt/tdx: Wire up basic SEAMCALL functions
  x86/virt/tdx: Allow SEAMCALL to handle #UD and #GP

 arch/x86/Kconfig                  |  12 ++
 arch/x86/Makefile                 |   2 +
 arch/x86/boot/compressed/tdx.c    |  26 +++-
 arch/x86/coco/tdx/tdcall.S        | 238 +++++-------------------------
 arch/x86/coco/tdx/tdx.c           | 124 +++++++++-------
 arch/x86/include/asm/shared/tdx.h |  48 ++++--
 arch/x86/include/asm/tdx.h        |  31 ++--
 arch/x86/kernel/asm-offsets.c     |  33 ++---
 arch/x86/virt/Makefile            |   2 +
 arch/x86/virt/vmx/Makefile        |   2 +
 arch/x86/virt/vmx/tdx/Makefile    |   2 +
 arch/x86/virt/vmx/tdx/seamcall.S  |  54 +++++++
 arch/x86/virt/vmx/tdx/tdxcall.S   | 206 ++++++++++++++++++++------
 13 files changed, 431 insertions(+), 349 deletions(-)
 create mode 100644 arch/x86/virt/Makefile
 create mode 100644 arch/x86/virt/vmx/Makefile
 create mode 100644 arch/x86/virt/vmx/tdx/Makefile
 create mode 100644 arch/x86/virt/vmx/tdx/seamcall.S


base-commit: 94142c9d1bdf1c18027a42758ceb6bdd59a92012
-- 
2.41.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ