DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 7th October 2008
adamk adamk is offline
Spam Deminer
 
Join Date: May 2008
Posts: 250
Default qemu & kqemu

Is it possible to get qemu to make use of the kqemu kernel module?

I have both qemu-devel and kqemu-kmod-devel installed (and have tried with just the qemu and kqemu-kmod ports as well). However there is no noticeable difference in speed between qemu with or without the kqemu kernel module loaded. In addition, I can actually unload the kqemu kernel module while qemu is running a guest OS without any impact what-so-ever. I would assume that if qemu was actually using the acceleration provided by kqemu, I would get a message that the module was busy.

I have also noticed that loading the kqemu module does not result in a /dev/kqemu device being created like it does under Linux...

Any thoughts?

Adam
Reply With Quote
  #2   (View Single Post)  
Old 7th October 2008
Weaseal's Avatar
Weaseal Weaseal is offline
Package Pilot
 
Join Date: May 2008
Location: East Coast, US
Posts: 177
Default

I know that a lot of the performance issues vary OS to OS. Google around for people's qemu guest tips. I know there are a few you can toss into a FreeBSD guest to make it run a bit smoother.

What particular guest are you running?
__________________
FreeBSD addict since 4.2-RELEASE.
My FreeBSD wiki.
Reply With Quote
  #3   (View Single Post)  
Old 7th October 2008
mdh's Avatar
mdh mdh is offline
Real Name: Matt D. Harris
FreeBSD 2.2.6 User
 
Join Date: Oct 2008
Location: West Virginia
Posts: 139
Default

I've always assumed that if the kld was loaded when you started qemu, it'd be taken advantage of. All documentation I've read suggests that this is indeed the case.
Reply With Quote
  #4   (View Single Post)  
Old 7th October 2008
adamk adamk is offline
Spam Deminer
 
Join Date: May 2008
Posts: 250
Default

Quote:
Originally Posted by Weaseal View Post
I know that a lot of the performance issues vary OS to OS. Google around for people's qemu guest tips. I know there are a few you can toss into a FreeBSD guest to make it run a bit smoother.

What particular guest are you running?
XP :-)

Adam
Reply With Quote
  #5   (View Single Post)  
Old 7th October 2008
adamk adamk is offline
Spam Deminer
 
Join Date: May 2008
Posts: 250
Default

Quote:
Originally Posted by mdh View Post
I've always assumed that if the kld was loaded when you started qemu, it'd be taken advantage of. All documentation I've read suggests that this is indeed the case.
That's what I thought, too, but that doesn't appear to be the case. Shouldn't it complain when I try to unload the module while qemu is running? Or wouldn't qemu at least get majorly screwed up if it was actually using the kqemu accelerator? And the lack of a /dev/kqemu device really concerns me, though I have no idea if that is normal or not.

Adam
Reply With Quote
  #6   (View Single Post)  
Old 8th October 2008
BSDKaffee's Avatar
BSDKaffee BSDKaffee is offline
Real Name: Jason Hale
Coffee Addict
 
Join Date: May 2008
Location: Wintersville, Ohio
Posts: 212
Default

Are you using the '-kernel-kqemu' option when starting QEMU?

The QEMU docs state that you can check if the module is working by using the QEMU monitor command 'info kqemu'.
Reply With Quote
  #7   (View Single Post)  
Old 8th October 2008
vermaden's Avatar
vermaden vermaden is offline
Administrator
 
Join Date: Apr 2008
Location: pl_PL.lodz
Posts: 1,056
Default

Quote:
Originally Posted by adamk View Post
Is it possible to get qemu to make use of the kqemu kernel module?
Code:
# kldload aio
# kldload kqemu
# qemu ...
Quote:
I have both qemu-devel and kqemu-kmod-devel installed (and have tried with just the qemu and kqemu-kmod ports as well). However there is no noticeable difference in speed between qemu with or without the kqemu kernel module loaded. In addition, I can actually unload the kqemu kernel module while qemu is running a guest OS without any impact what-so-ever. I would assume that if qemu was actually using the acceleration provided by kqemu, I would get a message that the module was busy.
If aio and kqemu modules are not loaded then you will get that warning:
Code:
# qemu ...
warning: aio not (kld)loaded, may cause `Invalid system call' traps on disk IO
Could not open '/dev/kqemu' - QEMU acceleration layer not activated: No such file or directory
Quote:
Any thoughts?
Try qemu (without -devel) maybe newest version tries to talk in some different way with kqemu while kqemu version in Ports my be outdated.
__________________
religions, worst damnation of mankind
"If 386BSD had been available when I started on Linux, Linux would probably never had happened." Linus Torvalds

Linux is not UNIX! Face it! It is not an insult. It is fact: GNU is a recursive acronym for “GNU's Not UNIX”.
vermaden's: links resources deviantart spreadbsd
Reply With Quote
  #8   (View Single Post)  
Old 8th October 2008
adamk adamk is offline
Spam Deminer
 
Join Date: May 2008
Posts: 250
Default

Sorry, user error. When I first built qemu from ports originally, I saw that it had a kqemu option. I, incorrectly, assumed that this would just build the kqemu kernel module. In fact, qemu has to be compiled to make use of the kernel module. So now it's working :-)

Unfortunately, the difference in speed isn't that great, but it's something at least.

Adam
Reply With Quote
  #9   (View Single Post)  
Old 9th October 2008
Mr-Biscuit Mr-Biscuit is offline
Banned
 
Join Date: May 2008
Posts: 272
Default

My apologies beforehand.

A complete howto for setting up and running qemu on amd64, is one available?
Reply With Quote
Old 9th October 2008
vermaden's Avatar
vermaden vermaden is offline
Administrator
 
Join Date: Apr 2008
Location: pl_PL.lodz
Posts: 1,056
Default

Quote:
Originally Posted by Mr-Biscuit View Post
My apologies beforehand.

A complete howto for setting up and running qemu on amd64, is one available?
From QEMU Makefile:
Code:
ONLY_FOR_ARCHS= amd64 i386
So nothing changes here, you do all the things as you would do for i386.
__________________
religions, worst damnation of mankind
"If 386BSD had been available when I started on Linux, Linux would probably never had happened." Linus Torvalds

Linux is not UNIX! Face it! It is not an insult. It is fact: GNU is a recursive acronym for “GNU's Not UNIX”.
vermaden's: links resources deviantart spreadbsd
Reply With Quote
Old 9th October 2008
Mr-Biscuit Mr-Biscuit is offline
Banned
 
Join Date: May 2008
Posts: 272
Default

Again, apologies beforehand.

Qemu on amd64 with kqemu uses tun tap with bridged networking.
I'm having trouble setting this up.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
qemu sound Oko OpenBSD Packages and Ports 2 7th May 2009 06:59 AM
HOWTO: QEMU on FreeBSD vermaden Guides 10 9th March 2009 07:10 PM
Jailed QEMU + other OS revzalot FreeBSD Installation and Upgrading 3 29th May 2008 06:00 PM
ssh to FreeBSD run in Qemu mfaridi FreeBSD Security 11 19th May 2008 01:00 PM


All times are GMT. The time now is 08:13 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick