Re: PCI passthrough not working with bhyve and NetBSD

2018-07-09 Thread Travis Paul


> On 9 Jul 2018, at 5:58 AM, Farid Joubbi  wrote:
> 
> Thanks for the reply.
> After reading it, I realize that the learning curve for me to understand what 
> is going on is a bit too steep.
> I know only some basic C programming from university courses several years 
> ago.
> This kind of learning was not what I had in mind when I figured that I want 
> to run a new NetBSD installation this summer... ;-(

FWIW, NetBSD runs fine on Bhyve without PCI passthru. I'm running a few NetBSD 
7 and 8 VMs on FreeBSD 11.

I can share some commands to get a NetBSD system up if you're interested but 
I'm not using PCI passthru so I can't assist there.

Best,
Travis


signature.asc
Description: Message signed with OpenPGP


Re: PCI passthrough not working with bhyve and NetBSD

2018-07-09 Thread David Brownlee
On 8 July 2018 at 22:58, Farid Joubbi  wrote:
> Thanks for the reply.
> After reading it, I realize that the learning curve for me to understand
> what is going on is a bit too steep.
> I know only some basic C programming from university courses several years
> ago.
> This kind of learning was not what I had in mind when I figured that I want
> to run a new NetBSD installation this summer... ;-(
>
> I had no idea that it was so uncommon to use the BSD hypervisor to run the
> two other big BSD's beside FreeBSD until I started googling for answers to
> my problem.

You might find more luck using VirtualBox under FreeBSD to run NetBSD
https://www.freebsd.org/doc/handbook/virtualization-host-virtualbox.html

If you are willing to try digging into bhyve a little more you are
likely to find people willing to help both on the NetBSD and FreeBSD
lists (particularly if you treat it as an opportunity to learn along
the way and not get frustrated if it doesn't work out in the end :)

I would also try booting a current NetBSD install image to see if it
shows the same issue (can download from
http://nycdn.netbsd.org/pub/NetBSD-daily/HEAD/ )

David


Re: PCI passthrough not working with bhyve and NetBSD

2018-07-09 Thread Farid Joubbi
Thanks for the reply.
After reading it, I realize that the learning curve for me to understand
what is going on is a bit too steep.
I know only some basic C programming from university courses several years
ago.
This kind of learning was not what I had in mind when I figured that I want
to run a new NetBSD installation this summer... ;-(

I had no idea that it was so uncommon to use the BSD hypervisor to run the
two other big BSD's beside FreeBSD until I started googling for answers to
my problem.


On Sun, Jul 8, 2018 at 4:29 PM Greg Troxel  wrote:

>
> Farid Joubbi  writes:
>
> > I have a server running FreeBSD 11.1-RELEASE-p11.
> > I would like to run NetBSD using bhyve on that.
>
> That's interesting; there has been little discussion of running NetBSD
> under bhyve so far.
>
> > I have configured passthrough of two different PCI Express network
> > interface cards. I can't get neither OpenBSD nor NetBSD to work with
> these
> > NICs.
> >
> > I get this in dmesg when booting the NetBSD install:
> >
> > wm0 at pci0 dev 5 function 0: 82576 quad-1000BaseT Ethernet (rev. 0x01)
> > pci_intr_map: no mapping for pin B (line=ff)
> > wm0: unable to map interrupt
> > bge0 at pci0 dev 6 function 0: Broadcom BCM5720 Gigabit Ethernet
> > pci_intr_map: no mapping for pin B (line=ff)
> > bge0: couldn't map interrupt
>
> It seems that while setting up interrupts the wm driver and code it
> calls runs into a situation that it can't handle, either because the
> situation is buggy or because the code doesn't handle something which is
> legitimate (per the PCI spec) but unusual.
>
> I would read the code in the wm driver and then find pci_intr_map, and
> see what debugging variables are defined, and build a kernel with them
> turned on.  Then I would either figure out how to run kgdb or add
> printfs.
>
> I would also look at the demsg from FreeBSD and CentOS, and turn on any
> verbosity you can, and understand how the interrupt is mapped there.
>
> > With OpenBSD it's the same error.
> > I have no problems running FreeBSD or CentOS with the exact same setup.
> >
> > I realize that the problem is probably in bhyve and not in NetBSD, but is
>
> Could be either way.   But you'll only know when you find out what's
> wrong and read the specs.
>
> > there a (easy) way to debug this from NetBSD in order to figure out what
> > the actual problem is?
> > Why aren't FreeBSD and CentOS having the same issue?
>
> My guess is that the bhyve code, as it was developed, was made to be
> enough like real hardware to get FreeBSD and Linux to work, and nobody
> has debugged the other situations.
>