From owner-svn-src-projects@FreeBSD.ORG Thu May 3 05:04:38 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2F8CE1065674; Thu, 3 May 2012 05:04:38 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1BA4E8FC14; Thu, 3 May 2012 05:04:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4354bID020370; Thu, 3 May 2012 05:04:37 GMT (envelope-from grehan@svn.freebsd.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4354bP5020368; Thu, 3 May 2012 05:04:37 GMT (envelope-from grehan@svn.freebsd.org) Message-Id: <201205030504.q4354bP5020368@svn.freebsd.org> From: Peter Grehan Date: Thu, 3 May 2012 05:04:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234939 - projects/bhyve/sys/amd64/vmm X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 May 2012 05:04:38 -0000 Author: grehan Date: Thu May 3 05:04:37 2012 New Revision: 234939 URL: http://svn.freebsd.org/changeset/base/234939 Log: Until the issue of how to handle guest XCR0 state is resolved, prevent CURRENT guests from hitting unhandled xsetbv exits by hiding the xsave/osxsave/avx cpuid2 bits. Modified: projects/bhyve/sys/amd64/vmm/x86.c Modified: projects/bhyve/sys/amd64/vmm/x86.c ============================================================================== --- projects/bhyve/sys/amd64/vmm/x86.c Thu May 3 03:11:27 2012 (r234938) +++ projects/bhyve/sys/amd64/vmm/x86.c Thu May 3 05:04:37 2012 (r234939) @@ -105,6 +105,13 @@ x86_emulate_cpuid(uint32_t *eax, uint32_ regs[2] |= CPUID2_X2APIC | CPUID2_HV; /* + * Hide xsave/osxsave/avx until the FPU save/restore + * issues are resolved + */ + regs[2] &= ~(CPUID2_XSAVE | CPUID2_OSXSAVE | + CPUID2_AVX); + + /* * Hide thermal monitoring */ regs[3] &= ~(CPUID_ACPI | CPUID_TM);