From owner-freebsd-virtualization@FreeBSD.ORG Thu Feb 6 19:00:56 2014 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7EFE5FD3; Thu, 6 Feb 2014 19:00:56 +0000 (UTC) Received: from mail-qa0-x236.google.com (mail-qa0-x236.google.com [IPv6:2607:f8b0:400d:c00::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D07371900; Thu, 6 Feb 2014 19:00:55 +0000 (UTC) Received: by mail-qa0-f54.google.com with SMTP id i13so3504611qae.27 for ; Thu, 06 Feb 2014 11:00:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=+ah69YB46PGH6fxp1WWtoPgRoB4HdgNOleGw6Dd4XpE=; b=Yazee+8MDsvTavrcX35OfwAaTOUS8mCKVp3p0SxgwbkIwOpcJQlXJJGu/ZcUU6jXT6 pbO80xkBKoBSOfWq9DuQL/vA+i1o/7P/OcCzSnM4BOcsbH5LGVBGiVgK6kXHsM1e2TiL quAcM1TevMAFF13rygp7qxEv4tUDSb5a7OeV2F8SjwhP2BOA1Wm7MyZ8gMp3YanDQch0 Uc+ozVCY8CC+ecMo8nOqxLKAGlx/FmEeanYqXDw2s0jwKwl9bWK46H4WZZ7sje2UE+QN O8EBf8arBVNX+A+9ood5bnvhmWFCmjJLoLDeKLsUKhxb3gOA9K2jlZYzNVQUCw4LHBRw BxWw== MIME-Version: 1.0 X-Received: by 10.140.32.200 with SMTP id h66mr14163254qgh.49.1391713254909; Thu, 06 Feb 2014 11:00:54 -0800 (PST) Sender: shteryana@gmail.com Received: by 10.224.128.73 with HTTP; Thu, 6 Feb 2014 11:00:54 -0800 (PST) In-Reply-To: <20140206175919.GA67849@enceladus10.kn-bremen.de> References: <20140206175919.GA67849@enceladus10.kn-bremen.de> Date: Thu, 6 Feb 2014 21:00:54 +0200 X-Google-Sender-Auth: jfwIEspnq0r7jVWY1-7-pVfWMKg Message-ID: Subject: Re: kqemu patch for CURRENT/10-STABLE (was Re: Linux on BHyVe in 10.0-RELEASE ) From: Shteryana Shopova To: Juergen Lock X-Mailman-Approved-At: Thu, 06 Feb 2014 19:12:25 +0000 Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.17 Cc: nox@freebsd.org, freebsd-virtualization@freebsd.org X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: syrinx@FreeBSD.org List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Feb 2014 19:00:56 -0000 On Thu, Feb 6, 2014 at 7:59 PM, Juergen Lock wrote: > 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 Well, the VirtualBox off topic was caused by someone saying in an earlier thread "me and Dee (personally and not as the petitecloud development team) would be willing to give $50 to anyone who can get kqemu running on 10 and/or show how to get vbox to work headless" > 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 Did you really try it? Can you explain then why it works for me with both kqemu-kmod-devel and kqemu-kmod? Can you please explain why this commit - http://svnweb.freebsd.org/base?view=revision&revision=248084 - is (ir-)relevant to the patch proposed? > uses kqemu-kmod-devel, kqemu-kmod is only left for people still using > even older qemu forks.) > > Sorry... > Juergen cheers, Shteryana Shopova