[Bug 229824] Fatal trap 1 when resuming from S3 with a VirtualBox VM running

2018-08-08 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229824

John Baldwin  changed:

   What|Removed |Added

 CC||j...@freebsd.org

--- Comment #1 from John Baldwin  ---
FreeBSD doesn't have a way to let external hypervisors like vbox work across
suspend and resume.  I did add a hook for bhyve in
https://svnweb.freebsd.org/base?view=revision=259782.  We would need
something similar.  The same issue matters for permitting multiple hypervisors
being active at the same time (e.g. you can't run both bhyve and vbox at the
same time currently).  I had been thinking of adding a kind of hypervisor
framework to let hypervisors allocate the VMX region and then permit
associating it with a given process so that you could do the right vmxon/vmxoff
during context switch.  Having that would also allow us to more cleanly handle
suspend/resume for arbitrary hypervisors.

One thing you might be able to do for now is change the vbox driver to set the
same vmm_resume_p pointer that bhyve's vmm.ko sets during MOD_LOAD to a
function that reinvokes vmxon with the right address on each CPU during resume.
 Probably both bhyve and vbox should also fail to load in MOD_LOAD if that
pointer is already non-NULL which would enforce only one could be used at a
time.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: Passthrough not working with OpenBSD nor NetBSD

2018-08-08 Thread John Baldwin
On 7/6/18 8:07 AM, Farid Joubbi wrote:
> Hello,
> 
> 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
> 
> With OpenBSD it's the same error.
> 
> I have no problems running FreeBSD or CentOS with the exact same setup.
> 
> This is how vm is configured for the NetBSD install:
> loader="grub"
> cpu=1
> memory=4G
> passthru0="12/0/1"
> passthru1="3/0/1"
> disk0_type="virtio-blk"
> disk0_name="disk0.img"
> uuid="1c9596b9-80a0-11e8-960c-5cb9013bbb64"
> grub_install0="knetbsd -h -r cd0a /netbsd"
> grub_run0="knetbsd -h -r ld0a /netbsd"
> 
> 
> I started out with OpenBSD and a Intel NIC. Then I added the Broadcom NIC
> since I figured that maybe it's a driver issue.
> I'm running bhyve on 11.1-RELEASE-p11.
> 
> Any ideas?

You have to use MSI interrupts for pass-through devices for bhyve.  Those
errors look as if the guests are trying to use legacy INTx interrupts.

-- 
John Baldwin
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"