Date: Tue, 10 Jan 2017 09:39:43 +0000 From: Dom <misc-freebsd@talk2dom.com> To: soralx@cydem.org, freebsd-virtualization@freebsd.org Subject: Re: Issues with GTX960 on CentOS7 using bhyve PCI passthru (FreeBSD 11-RC2) Message-ID: <0c927784-3e3f-7946-fba9-c25001f4156c@talk2dom.com> In-Reply-To: <0de7e0fe-5680-b1be-bd57-6bf446c2fd38@talk2dom.com> References: <20170110003332.7cf8ba15@mscad14> <0de7e0fe-5680-b1be-bd57-6bf446c2fd38@talk2dom.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Found my original attempt by modifying /usr/src/sys/amd64/vmm/x86.c
Unified diff follows, but this didn't work for me.
("bhyve_id[]" commented out to prevent compiler complaints)
There doesn't seem to be support for CPUID 0x40000001 in bhyve either.
--- x86.c.orig 2016-09-11 14:40:22.410462000 +0100
+++ x86.c 2016-09-11 15:53:14.182186000 +0100
@@ -52,7 +52,7 @@
#define CPUID_VM_HIGH 0x40000000
-static const char bhyve_id[12] = "bhyve bhyve ";
+/* static const char bhyve_id[12] = "bhyve bhyve "; */
static uint64_t bhyve_xcpuids;
SYSCTL_ULONG(_hw_vmm, OID_AUTO, bhyve_xcpuids, CTLFLAG_RW,
&bhyve_xcpuids, 0,
@@ -236,7 +236,7 @@
regs[2] &= ~(CPUID2_VMX | CPUID2_EST | CPUID2_TM2);
regs[2] &= ~(CPUID2_SMX);
- regs[2] |= CPUID2_HV;
+ /* regs[2] |= CPUID2_HV; */
if (x2apic_state != X2APIC_DISABLED)
regs[2] |= CPUID2_X2APIC;
@@ -463,12 +463,15 @@
}
break;
+ /*
+ * Don't expose KVM to guest
case 0x40000000:
regs[0] = CPUID_VM_HIGH;
bcopy(bhyve_id, ®s[1], 4);
bcopy(bhyve_id + 4, ®s[2], 4);
bcopy(bhyve_id + 8, ®s[3], 4);
break;
+ */
default:
/*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0c927784-3e3f-7946-fba9-c25001f4156c>
