From owner-freebsd-virtualization@freebsd.org Fri Sep 9 09:20:44 2016 Return-Path: Delivered-To: freebsd-virtualization@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B8840BD15B6 for ; Fri, 9 Sep 2016 09:20:44 +0000 (UTC) (envelope-from misc-freebsd@talk2dom.com) Received: from mail.shmtech.biz (mail.shmtech.biz [IPv6:2001:41c9:1:37::e]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.shmtech.biz", Issuer "Go Daddy Secure Certification Authority" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 76339D13 for ; Fri, 9 Sep 2016 09:20:44 +0000 (UTC) (envelope-from misc-freebsd@talk2dom.com) Received: from [10.0.1.100] (originc9729.pndsl.co.uk [84.92.225.78]) (authenticated bits=0) by mail.shmtech.biz (8.15.2/8.14.9) with ESMTPSA id u899KeYX004923 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO) for ; Fri, 9 Sep 2016 10:20:41 +0100 (BST) (envelope-from misc-freebsd@talk2dom.com) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=talk2dom.com; s=shmtech4; t=1473412841; x=1474017641; bh=HM+eAQR0Kq1tcWXUKBwvrAKM+ASHNc7aiMwMmiHi4fQ=; h=From:Subject:To:References:Date:In-Reply-To; b=PMUqQKyUj1xGEnY9yURqKhkI1fUH7QIOTST9OWCrkg/5bTQe+YPA36JRCqAdDMZ/c D4wWyfCBHov1hkarbVnD71nb6Jl7K1JwRpF5mHLqioAbsBXGaO67XnGqXMOP39cS76 opxkOLUeQMR4o79iggveOWIZ1Z+5kj0S63VJ3MdE= X-Authentication-Warning: sendmail: Host originc9729.pndsl.co.uk [84.92.225.78] claimed to be [10.0.1.100] From: Dom Subject: Re: Issues with GTX960 on CentOS7 using bhyve PCI passthru (FreeBSD 11-RC2) To: freebsd-virtualization@freebsd.org References: <727839e2-4be1-5661-8c19-6d13f73ad36f@talk2dom.com> <62b2a72a-3662-5b3e-5029-f284a625d05b@freebsd.org> Message-ID: <22df7de9-1dfb-561c-125d-99af2b3da70b@talk2dom.com> Date: Fri, 9 Sep 2016 10:20:41 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <62b2a72a-3662-5b3e-5029-f284a625d05b@freebsd.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Sep 2016 09:20:44 -0000 Hi Peter, Thanks for getting back to me. Here's the info you requested: >> [ 0.163085] acpi PNP0A03:00: host bridge window >> [0xd000000000-0xd0100fffff] (ignored, not CPU addressable) > > That one is most likely a bug in bhyve, where the space used for 64-bit > BAR placement isn't tested against the max physaddr width of the host > CPU. > > To confirm, would you be able to report on this value on your system ? > > # sudo pkg install cpuid > # cpuid | grep ^80000008 On my Intel i7-4790K CPU: # cpuid | grep ^80000008 80000008 00003027 00000000 00000000 00000000 > The device has an MSI capability, but the nvidia driver may not use it. > bhyve PCI passthrough requires the use of MSI/MSI-x interrupts, and > doesn't support using legacy interrupts. > > This could be confirmed from the output of /proc/interrupts when > booting Linux on the system. Output of /proc/interrupts: CPU0 0: 137 IO-APIC-edge timer 1: 9 IO-APIC-edge i8042 4: 965 IO-APIC-edge serial 8: 0 IO-APIC-edge rtc0 9: 0 IO-APIC-fasteoi acpi 12: 138 IO-APIC-edge i8042 17: 0 IO-APIC-fasteoi snd_hda_intel 24: 0 PCI-MSI-edge virtio0-config 25: 8535 PCI-MSI-edge virtio0-req.0 26: 0 PCI-MSI-edge virtio1-config 27: 123 PCI-MSI-edge virtio1-input.0 28: 1 PCI-MSI-edge virtio1-output.0 NMI: 0 Non-maskable interrupts LOC: 6050 Local timer interrupts SPU: 0 Spurious interrupts PMI: 0 Performance monitoring interrupts IWI: 2484 IRQ work interrupts RTR: 0 APIC ICR read retries RES: 0 Rescheduling interrupts CAL: 0 Function call interrupts TLB: 0 TLB shootdowns TRM: 0 Thermal event interrupts THR: 0 Threshold APIC interrupts MCE: 0 Machine check exceptions MCP: 1 Machine check polls ERR: 0 MIS: 0 I guess the lack of a line containing PCI-MSI-* here indicates the nvidia driver isn't using an MSI/MSI-x interrupt? However, searching the web suggests the Linux nvidia driver does use MSI interrupts. This taken from a working non-VM Linux dmesg: [ 4.330536] nvidia 0000:05:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16 [ 4.330542] nvidia 0000:05:00.0: setting latency timer to 64 Source: https://bugzilla.kernel.org/show_bug.cgi?id=20432#c2 (Thread also mentions disabling MSI) I'll try some Linux boot options and reordering the devices when calling bhyve to see if that changes anything. Thanks, Dom