Index | Thread | Search

From:
Theo Buehler <tb@theobuehler.org>
Subject:
Re: [EXT] Re: SEV-ES: vmd(8): Initial state encryption for SEV-ES guests 2/2
To:
tech@openbsd.org
Date:
Wed, 4 Jun 2025 13:57:37 +0200

Download raw body.

Thread
On Wed, Jun 04, 2025 at 01:50:30PM +0200, Hans-Jörg Höxer wrote:
> Hi,
> On Wed, Jun 04, 2025 at 12:39:07PM +0200, Theo Buehler wrote:
> > This breaks the build on arm64. Untested diff below fixes it:
> 
> sorry for that!  Adding stubs for arm64 looks right to me.  We also need
> one for psp_setup().  Amended diff below.

I did not need that because the call is guarded:

#ifdef __amd64__
	if (env->vmd_noaction == 0 && proc_id == PROC_PARENT)
		psp_setup();
#endif

> 
> Take care,
> HJ.
> ------------------------------------------------------------------
> diff --git a/usr.sbin/vmd/arm64_vm.c b/usr.sbin/vmd/arm64_vm.c
> index 2eec85d6f83..fbe1e2afc40 100644
> --- a/usr.sbin/vmd/arm64_vm.c
> +++ b/usr.sbin/vmd/arm64_vm.c
> @@ -209,3 +209,26 @@ sev_encrypt_memory(struct vmd_vm *vm)
>  	/* NOTREACHED */
>  	return (-1);
>  }
> +
> +int
> +sev_encrypt_state(struct vmd_vm *vm, int vcpu_id)
> +{
> +	fatalx("%s: unimplemented", __func__);
> +	/* NOTREACHED */
> +	return (-1);
> +}
> +
> +int
> +sev_launch_finalize(struct vmd_vm *vm)
> +{
> +	fatalx("%s: unimplemented", __func__);
> +	/* NOTREACHED */
> +	return (-1);
> +}
> +
> +void
> +psp_setup(void)
> +{
> +	fatalx("%s: unimplemented", __func__);
> +	/* NOTREACHED */
> +}