From owner-freebsd-virtualization@freebsd.org Sat Dec 12 07:59:35 2015 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 9D6B3A14436 for ; Sat, 12 Dec 2015 07:59:35 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F52A1C17 for ; Sat, 12 Dec 2015 07:59:35 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id tBC7xZ3T070829 for ; Sat, 12 Dec 2015 07:59:35 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-virtualization@FreeBSD.org Subject: [Bug 205262] centos 6.7 x86_64 panic on bhyve Date: Sat, 12 Dec 2015 07:59:35 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.2-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: linimon@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-virtualization@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: assigned_to Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.20 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: Sat, 12 Dec 2015 07:59:35 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205262 Mark Linimon changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|freebsd-bugs@FreeBSD.org |freebsd-virtualization@Free | |BSD.org -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-virtualization@freebsd.org Sat Dec 12 13:06:15 2015 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 14FA29D8352 for ; Sat, 12 Dec 2015 13:06:15 +0000 (UTC) (envelope-from g_amanakis@yahoo.com) Received: from nm5-vm2.bullet.mail.ne1.yahoo.com (nm5-vm2.bullet.mail.ne1.yahoo.com [98.138.90.153]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DDE1013B2 for ; Sat, 12 Dec 2015 13:06:14 +0000 (UTC) (envelope-from g_amanakis@yahoo.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1449925467; bh=27SKcM22Jbm8iwPmvJa0gUmsfh4n6yLG5S5LKiPASyA=; h=In-Reply-To:References:Subject:From:Date:To:From:Subject; b=rJ4HpNiz9R3Fv4v3iAOfTJmvHtKhOWhgvdnIbTAX9iSVpyVyNI17UyAN2eZuQeKyytR1Je4JiFxI2MUJYVyHveptWLFNwMOsa/pd0UXSKTfX8qL521ouUqYqKxpRu/+wYlzozs3xCHL6Srli8LF01uAzntQzWwtMstg3td27rWVwHjeVbJsXRmGuOgOTl4e7LNCZbCqExs2cJkfYJNkhif1kQuDfK2U/qcSC5OKCgFNjNmx9OujRPOXmcpCfaZWabzGubw1pHC6QEkgz3eGH5HB5NsQGxEsyWPwvlYhyg5eH+eVEvxFrTS302zNvF9QKmuVqdfTIFhe6aSmGfhI2Pg== Received: from [98.138.101.130] by nm5.bullet.mail.ne1.yahoo.com with NNFMP; 12 Dec 2015 13:04:27 -0000 Received: from [98.138.226.63] by tm18.bullet.mail.ne1.yahoo.com with NNFMP; 12 Dec 2015 13:04:27 -0000 Received: from [127.0.0.1] by smtp214.mail.ne1.yahoo.com with NNFMP; 12 Dec 2015 13:04:27 -0000 X-Yahoo-Newman-Id: 514478.22839.bm@smtp214.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: eSY4Q9UVM1mOqZS9awZIaVY3NQ6gXiFEz_ofyNWYFQSPe.u 0p9gpLMycNOb_r5klBM_SAO8SQfLeG4bVr6jMO5ULe2T36PgYvjBCkKzzY6G IssTIhRMLyYUDW48pEH3GbXTlcqoJ0WQUu2I7mG59XLdCTOUZJSha_RpNC3v dySlfLKCROLNCsURgWUneF9Xevc_ATo2amd4dl.101FAlLPW5vzTnHxkEAxm YNM_O.OrpHUTmYrfCZC1Y2RtxPtFe83Im4MpNlVdY5nC2QS3P2X9AjANhy6i sO3MpVQPxt6BztMR5u3UhONP7iSq0sAe.L4bt1f6cwu36I2yf3zToJWGE0Ax Wa6aa0KMqeL4EM2rvV0z3XPpENI6T8mSE0uhMlmiQXjDi90PSs0qZPIVcz67 nuVCCvuqUF4ew.z6MvM0BBkHWh879D.NBQAlyCfVAdr5I06VkxQde8gew6B9 2qxepJrzxRAUAK8gjGdF4S3pn74ocsB0tvl6jxWCjjmPhef.sOF1siqdQwDx r2Hhoq490k.v6c33ip7QmO3VRxHpgrqR0 X-Yahoo-SMTP: 6sUo5IiswBDB2TZm6JKJ6DaI.Rsz4O0- User-Agent: K-9 Mail for Android In-Reply-To: References: <4F251D2F-8C0C-46FF-B5E1-D88DE84904D8@yahoo.com> MIME-Version: 1.0 Subject: Re: BAR and pci passthrough From: "G. Amanakis" Date: Sat, 12 Dec 2015 14:04:17 +0100 To: "freebsd-virtualization@freebsd.org" Message-ID: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.20 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: Sat, 12 Dec 2015 13:06:15 -0000 Changing #define PCIM_BAR_MEM_BASE 0xfffffffffffffff0ULL to #define PCIM_BAR_MEM_BASE 0xfffffffffffff000ULL in sys/dev/PCI/pcireg=2Eh makes the min size of a memory BAR equal to 0x1000 = or 4096 bytes and it lets me passthrough the device=2E Any objections to th= is strategy? On December 2, 2015 11:54:03 PM GMT+01:00, Neel Natu wrote: >On Wed, Dec 2, 2015 at 3:13 AM, G=2E Amanakis via freebsd-virtualization > wrote: >> I am facing the following problem: >> on a X9SCM with an E3-1220Lv2 I am trying to passthrough the >onboard usb controllers=2E I disable the usb module from the kernel >config and using pptdev the controllers are assigned to ppt devices=2E >However running bhyve on FreeBSD 10=2E2 with: >> >> sudo bhyve -AI -H -P -s 0:0,hostbridge -s 1:0,lpc -s >2:0,virtio-net,tap0 -s 3:0,virtio-blk,=2E/linux=2Eimg -s >4:0,passthru,0/29/0 -l com1,stdio -c 2 -m 2048M linuxguest >> >> returns : >> >> passthru device 0/29/0 BAR 0: base 0xdf823000 or size 0x400 not >page aligned >> >> The problem probably that the length of the bar is smaller and not >aligned with the pagesize=2E Could the length of the BAR be modified in >order to perform the pci passthrough? > >Yes, that's correct - the size of the BAR is not a multiple of the >page size which leads to the error=2E If this BAR is mapped into the >guest's address space then it will "leak" an additional 3K into the >guest (since the minimum nested mapping is 4KB in size)=2E > >It is hard to fix this in the general case if you want to truly >passthrough the BAR to the guest=2E > >best >Neel > >> -- >> Sent from my Android device with K-9 Mail=2E Please excuse my brevity= =2E >> _______________________________________________ >> freebsd-virtualization@freebsd=2Eorg mailing list >> https://lists=2Efreebsd=2Eorg/mailman/listinfo/freebsd-virtualization >> To unsubscribe, send any mail to >"freebsd-virtualization-unsubscribe@freebsd=2Eorg" --=20 Sent from my Android device with K-9 Mail=2E Please excuse my brevity=2E