From 594798dacf857e1fffe70c71bbfdc9606752489c Mon Sep 17 00:00:00 2001 From: dv Date: Thu, 20 May 2021 17:33:44 +0000 Subject: [PATCH] vmm(4): don't advertise cpu support for TSC_ADJUST msr We don't emulate it, so guests that attempt to read it just get #GP injected anyways. OK mlarkin@ --- sys/arch/amd64/include/vmmvar.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/arch/amd64/include/vmmvar.h b/sys/arch/amd64/include/vmmvar.h index e29da2d9041..83580758c2a 100644 --- a/sys/arch/amd64/include/vmmvar.h +++ b/sys/arch/amd64/include/vmmvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vmmvar.h,v 1.71 2021/04/05 18:26:46 dv Exp $ */ +/* $OpenBSD: vmmvar.h,v 1.72 2021/05/20 17:33:44 dv Exp $ */ /* * Copyright (c) 2014 Mike Larkin * @@ -637,6 +637,7 @@ struct vm_mprotect_ept_params { /* * SEFF flags - copy from host minus: + * TSC_ADJUST (SEFF0EBX_TSC_ADJUST) * SGX (SEFF0EBX_SGX) * HLE (SEFF0EBX_HLE) * INVPCID (SEFF0EBX_INVPCID) @@ -655,7 +656,8 @@ struct vm_mprotect_ept_params { * PT (SEFF0EBX_PT) * AVX512VBMI (SEFF0ECX_AVX512VBMI) */ -#define VMM_SEFF0EBX_MASK ~(SEFF0EBX_SGX | SEFF0EBX_HLE | SEFF0EBX_INVPCID | \ +#define VMM_SEFF0EBX_MASK ~(SEFF0EBX_TSC_ADJUST | SEFF0EBX_SGX | \ + SEFF0EBX_HLE | SEFF0EBX_INVPCID | \ SEFF0EBX_RTM | SEFF0EBX_PQM | SEFF0EBX_MPX | \ SEFF0EBX_PCOMMIT | SEFF0EBX_PT | \ SEFF0EBX_AVX512F | SEFF0EBX_AVX512DQ | \ -- 2.20.1