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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CABgObfZJKav=Lv10s1y__tpJC4wGkWhGYud4rxyZeDEgsFWZGQ@mail.gmail.com>
Date: Tue, 24 Dec 2024 15:57:56 +0100
From: Paolo Bonzini <pbonzini@...hat.com>
To: Rick Edgecombe <rick.p.edgecombe@...el.com>
Cc: kvm@...r.kernel.org, seanjc@...gle.com, dave.hansen@...el.com, 
	isaku.yamahata@...il.com, kai.huang@...el.com, linux-kernel@...r.kernel.org, 
	tony.lindgren@...ux.intel.com, xiaoyao.li@...el.com, yan.y.zhao@...el.com, 
	x86@...nel.org, adrian.hunter@...el.com
Subject: Re: [RFC PATCH 0/6] SEAMCALL Wrappers

On Fri, Nov 15, 2024 at 9:20 PM Rick Edgecombe
<rick.p.edgecombe@...el.com> wrote:
> Separate from discussions with Dave on the SEAMCALLs, there was some some
> suggestions on how we might remove or combine specific SEAMCALLs. I didn’t
> try this here, because this RFC is more about exploring in general how we
> want to distribute things between KVM and arch/x86 for these SEAMCALL
> wrappers.
>
> So in summary the RFC only has:
>  - Use structs to hold tdXYZ fields for TD and vCPUs
>  - Make helper to hold CLFLUSH_BEFORE_ALLOC comments
>  - Use semantic names for out args
>  - (Add Kai's sign-off that should have been in the last version)
>
> Patches 1 and 3 contain new commit log verbiage justifying specific design
> choices behind the struct definitions.
>
> I didn’t create enums for the out args. Just using proper names for the
> args seemed like a good balance between code clarity and not
> over-engineering. But please correct if this was the wrong judgment.

Sounds good. I'll also convert

x86/virt/tdx: Add SEAMCALL wrapper tdh_mem_sept_add() to add SEPT pages
x86/virt/tdx: Add SEAMCALL wrappers to add TD private pages
x86/virt/tdx: Add SEAMCALL wrappers to manage TDX TLB tracking
x86/virt/tdx: Add SEAMCALL wrappers to remove a TD private page
x86/virt/tdx: Add SEAMCALL wrappers for TD measurement of initial contents
x86/virt/tdx: Add SEAMCALL wrapper to enter/exit TDX guest

(which I've "extracted" from the TDX-KVM series and placed all at the
top of kvm-coco-queue).

Paolo

> Here is a branch for seeing the callers. I didn’t squash the caller
> changes into the patches yet either, the caller changes are all just in the
> HEAD commit. I also only converted the “VM/vCPU creation” SEAMCALLs to the
> approach described above:
> https://github.com/intel/tdx/tree/seamcall-rfc
>
> [0] https://lore.kernel.org/kvm/20241030190039.77971-1-rick.p.edgecombe@intel.com/
>
>
> Rick Edgecombe (6):
>   x86/virt/tdx: Add SEAMCALL wrappers for TDX KeyID management
>   x86/virt/tdx: Add SEAMCALL wrappers for TDX TD creation
>   x86/virt/tdx: Add SEAMCALL wrappers for TDX vCPU creation
>   x86/virt/tdx: Add SEAMCALL wrappers for TDX page cache management
>   x86/virt/tdx: Add SEAMCALL wrappers for TDX VM/vCPU field access
>   x86/virt/tdx: Add SEAMCALL wrappers for TDX flush operations
>
>  arch/x86/include/asm/tdx.h  |  29 +++++
>  arch/x86/virt/vmx/tdx/tdx.c | 224 ++++++++++++++++++++++++++++++++++++
>  arch/x86/virt/vmx/tdx/tdx.h |  38 ++++--
>  3 files changed, 284 insertions(+), 7 deletions(-)
>
> --
> 2.47.0
>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ