Index | Thread | Search

From:
Alexandre Ratchov <alex@caoua.org>
Subject:
Re: SEV support in vmm breaking Intel VMX guests
To:
Dave Voutila <dv@sisu.io>
Cc:
tech@openbsd.org, Alexandre Ratchov <ratchov@openbsd.org>, Moritz Buhl <mbuhl@openbsd.org>, Hans-Joerg Hoexer <hshoexer@genua.de>
Date:
Wed, 4 Sep 2024 17:46:42 +0200

Download raw body.

Thread
On Wed, Sep 04, 2024 at 10:10:43AM -0400, Dave Voutila wrote:
> 
> diff refs/heads/master refs/heads/vmm-cpuid-sev
> commit - 98bc733b08604094f4138174a0ee0bb9faaca4bd
> commit + 3a97ccb5bf35e9482ac906670bc6603f018c3f0a
> blob - 0e8e2a526454e064ce45b2b64fb7ff16f0508189
> blob + d53361d577792b005189f6fae63b96378e476840
> --- sys/arch/amd64/amd64/vmm_machdep.c
> +++ sys/arch/amd64/amd64/vmm_machdep.c
> @@ -6282,7 +6282,8 @@ vmm_handle_cpuid(struct vcpu *vcpu)
>  		*rdx = 0;
>  		break;
>  	case 0x80000000:	/* Extended function level */
> -		*rax = 0x8000001f; /* curcpu()->ci_pnfeatset */
> +		/* We don't emulate past 0x8000001f currently. */
> +		*rax = MIN(curcpu()->ci_pnfeatset, 0x8000001f);
>  		*rbx = 0;
>  		*rcx = 0;
>  		*rdx = 0;
> 

Fixes the problem on my i5-2500k, no regressions on other intel
machines. Thanks!

ok ratchov