On Thu, Feb 06, 2014 at 05:16:15PM +0200, Shteryana Shopova wrote:
> Hi all,
> 
> Sorry for top posting but I'm new to the list and came across this
> thread while playing with bhyve these days. To apply the patch -
> 
> #cp patch-unit3minorfix /usr/ports/emulators/kqemu-kmod/files/
> 
> compile and install the module.
> 
> I've been running kqemu under current with the attached patch (plain
> text below in case the attachment is removed) for a couple of months
> now and the module is loaded successfully -
> 
> root@demetra:/usr/ports/emulators/kqemu-kmod # dmesg | tail -n 10 | grep kqemu
> kqemu version 0x00010300
> kqemu: KQEMU installed, max_locked_mem=4120624kB.
> root@demetra:/usr/ports/emulators/kqemu-kmod # uname -v
> FreeBSD 11.0-CURRENT #6 r260863: Sun Jan 19 02:57:49 EET 2014
> 
> The original commit that broke kqemu-kmod is from March 9th, 2013, so
> the patch should be applicable to 10-STABLE too. Reports on
> success/failures welcome.
> 
> cheers,
> Shteryana
> 
> P.S. Example on getting a headless VM with vbox -
> 
> #VBoxManage createvm --name MyServer --ostype Windows7 --register
> #VBoxManage createhd --filename "MyServer.vdi" --size 200000
> #VBoxManage storagectl MyServer --name "IDE Controller" --add ide
> --controller PIIX3
> #VBoxManage storageattach MyServer --storagectl "IDE Controller"
> --port 0 --device 1 --type hdd --medium "MyServer.vdi"
> #VBoxManage storageattach MyServer --storagectl "IDE Controller"
> --port 1 --device 0 --type dvddrive --medium
> /home/myserver/install.iso
> #VBoxManage modifyvm MyServer --nic1 bridged --cableconnected1 on
> --bridgeadapter1 em0 --nictype1 82540EM
> #VBoxManage modifyvm MyServer --memory 1024 --acpi on --boot1 dvd
> #VBoxHeadless -n -m 5901 -s "MyServer"
> 
> The VM is then accessible via vncviewer to the IP of the original
> machine port 5901
> 
> --- kqemu-freebsd.c.orig    2014-02-06 16:03:15.881335406 +0200
> +++ kqemu-freebsd.c    2014-02-06 16:04:25.951329106 +0200
> @@ -109,7 +109,12 @@
>      vm_offset_t va;
>      vm_paddr_t pa;
> 
> +#if __FreeBSD_version >= 1000030
> +    va = kmem_malloc(kernel_map, PAGE_SIZE, M_WAITOK);
> +#else
>      va = kmem_alloc(kernel_map, PAGE_SIZE);
> +#endif
> +
>      if (va == 0) {
>      kqemu_log("kqemu_alloc_zeroed_page: NULL\n");
>      return NULL;

Oh well kqemu isn't even used by vbox, it's for emulaotors/qemu when
built with the KQEMU knob and run with -enable-kqemu or -kernel-kqemu,
and fixing _that_ needs most likely more changes than this. (I.e. I
think I tried something similar and only got a panic.  And also qemu
uses kqemu-kmod-devel, kqemu-kmod is only left for people still using
even older qemu forks.)

 Sorry...
        Juergen
_______________________________________________
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"

Reply via email to