注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

My Unix World

不要迷恋Unix,Unix只是计算世界很小的一部分!

 
 
 

日志

 
 

QEMU learnning 1-4: Parameters of qemu-system-x86_64  

2009-09-02 22:06:13|  分类: develop-src |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
There are so many parameter qemu have,  we can get a brief list by:

$ qemu-system-x86_64 --help

For detailed description, refer to: http://www.qemu.org/qemu-doc.html

-help               print the main help list
-audio-help     print list of audio drivers and their options

-name string    set the name of the guest
-uuid %08x-%04x-%04x-%04x-%012x
specify machine UUID


These 3 parameters specify cpu related information.
-M
-cpu
-smp


-m megs         set virtual RAM size to megs MB [default=128]


These 3 parameter related to drive.
-drive [file=file][,if=type][,bus=n][,unit=m][,media=d][,index=i]
[,cyls=c,heads=h,secs=s[,trans=t]][,snapshot=on|off]
[,cache=writethrough|writeback|none][,format=f][,serial=s]
-boot [a|c|d|n] boot on floppy (a), hard disk (c), CD-ROM (d), or network (n)
Flowing parameters are just some quick sort for -drive:
-fda file
-fdb file
-hda file
-hdb file
-hdc file
-hdd file
'-cdrom file'
'-mtdblock file'
'-sd file'
'-pflash file'
'-snapshot'
'-hdachs c,h,s[,t]'

I have a question, what's the meaning of bus=?,unit=?, what's the relationship between bus and index? Seems the total number of ide bus should not more than 2, but for virtio block, seems there is none limitation.
That's also means that the knowledge of hardware specification is very important. PCI specification, USB specification, Power PC Instructions, etc.


-k language     use keyboard layout (for example "fr" for French)


-soundhw c1,... enable audio support
and only specified sound cards (comma separated list)
use -soundhw ? to get the list of supported cards
use -soundhw all to enable all of them


-usb            enable the USB driver (will be the default soon)
-usbdevice name add the host or guest USB device 'name'

I'd like to remind myself that there are so many kinds of hardware and also related specifications in the IT world, one of the most important thing the OS(the Kernel) need to deal with is the hardware wrapping.  It's truly the duty of OS to provide a common and abstract interface to access all the resources connected to the computer system. We are lucky when we work on the top of SCI(system call interface) by the help of the OS, and we will recognize how important the OS is as soon as when we trying to join in the kernel developing team or just trying to read some code of the low level programs.

Qemu is a simple, as it's just need to simulate the interface provided by the hardware, it do not have to realize the real hardware, so, it just cost little instructions to simulate the behavior of the hardware, but need not realize it.
One of the most important feature of operating system is to wrap the difference of so many different kinds of hardware, and provide the upper level programs a common, abstract, and very stable interfaces.
Then, I can say that the most important duty of OS are process management and hardware resource management.


And, the difference between Virtual machine simulator and OS?
They are against each other! The OS would like to wrap the difference from the hardware and provide a common, stable, abstract interface to the high level programs, but the virtual machine simulator is completely the different, it will provide lots of different hardware interfaces to simulate the real multiple-hardware world. It's so int resting!
OS and simulator are a pair of programs do the polarity work.
The result of running the simulator, it will generate a computer with so many different and complex hardware interfaces, similar to the real machine does.

  评论这张
 
阅读(442)| 评论(0)
推荐 转载

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017