铁面无私是什么生肖| 转氨酶偏高吃什么药| 头发老是出油是什么原因| 早起眼皮肿是什么原因引起的| 石英表是什么意思| 金鸡独立什么意思| 我是舅舅的什么人| 救世主是什么意思| 急性肠胃炎吃什么消炎药| 医是什么结构| 痛风不能吃什么水果| 三岁宝宝喝什么奶粉比较好| 骨骼肌是什么意思| 警察是什么生肖| 扑感敏又叫什么名字| 为什么一照相脸就歪了| 乳腺属于什么科室| nmr是什么意思| 当兵有什么好处| 肺纹理增粗是什么意思| 身上肉疼是什么原因| 火龙果和什么相克| 收到是什么意思| 晚饭吃什么| 尿酸高能吃什么水果| 平顶山为什么叫平顶山| 牙龈肿痛吃什么消炎药| 今天什么冲什么| 做梦梦见出车祸是什么征兆| 包皮手术是什么| leep术是什么手术| 什么是滑精| ep什么意思| 来月经适合吃什么水果| 忧愁是什么意思| 南瓜是什么颜色| 什么解酒| 夏天有什么蔬菜| 什么不能带上高铁| 肠痉挛吃什么药| 妥了是什么意思| 女人喜欢什么样的阴茎| 头发为什么会掉| 锦鲤跳缸是什么原因| 菠萝是什么意思| 蜜蜡是什么东西| 灰姑娘叫什么名字| 老铁是什么意思| 芭乐什么味道| 荨麻疹可以涂什么药膏| mt指什么| 茶叶水洗脸有什么好处| 吃什么补叶酸| 130是什么意思| 中性粒细胞绝对值高是什么原因| 3月21是什么星座| 黄鼠狼的天敌是什么动物| 阉割是什么意思| 梦见戴手表是什么意思| 棠字五行属什么| 大安是什么意思| 微量蛋白尿高说明什么| 大姨妈来了吃什么水果好| 中耳炎不能吃什么食物| 双子是什么星座| 夵是什么意思| 利而不害为而不争是什么意思| 白话文是什么意思| 北芪煲汤加什么药材好| 吃什么可以调理肠胃| 勾心斗角什么意思| 属狗女和什么属相最配| 劳动局全称叫什么| 盛夏是什么意思| 变色龙指什么样的人| 什么脱口秀| 双肺呼吸音粗是什么意思| 男人梦见鱼是什么征兆| 铁杵是什么| 南京有什么山| 红花配绿叶是什么意思| 乳腺彩超什么时候做最准确| 红豆和什么搭配最好| 子宫内膜是什么| 手掌小鱼际发红是什么原因| 十九畏是什么意思| 严重贫血吃什么补的快| 献血和献血浆有什么区别| mrmrs是什么牌子| 观察是什么意思| 得令是什么意思| 十二年义务教育什么时候实行| spoRT是什么| 什么血型不招蚊子| 什么时机塞给医生红包| 现在什么年| 梦到拔牙是什么预兆| 呼吸困难是什么原因引起的| 流年是什么| 抛光是什么意思| 基围虾为什么叫基围虾| 健康管理是什么专业| 护照和签证有什么区别| 小便黄是什么病症| 眉毛附近长痘痘是什么原因| 女人吃什么养肝排毒| 长期低烧是什么原因| 第二次世界大战是什么时候| 农历6月是什么月| 高汤是什么汤| 晚上睡觉睡不着是什么原因| 羊水少了对宝宝有什么影响| 胳肢窝痒是什么原因| 9月份出生的是什么星座| 西安有什么好吃的特产| 男人下面有异味什么原因| 戒定真香是什么意思| 198什么意思| 黄芪什么人不能吃| 眼袋青色什么原因| 最小的一位数是什么| 小鹿乱撞是什么意思| 夏天摆摊适合卖什么| 锲而不舍是什么生肖| 军魂是什么意思| 棘突是什么意思| egfr是什么意思| 痛风发作吃什么药| 鞑靼是什么意思| 猴和什么相冲| 吃芒果后不能吃什么| 狂犬疫苗为什么要打五针| 完美收官是什么意思| 胰腺炎不能吃什么食物| 脸颊为什么会凹陷| 乳腺增生什么意思| 岑字五行属什么| 属猴与什么属相最配| 较重闭合性跌打损伤是什么意思| 头加一笔是什么字| 医疗保险是什么| 清宫和人流有什么区别| 干细胞能治什么病| 商人是什么意思| 上环要做什么检查| 叶酸什么时间吃最好| 蜜饯是什么意思| 农历10月22日是什么星座| 女生下面是什么味道| 蝉鸣声耳鸣是什么原因引起的| 为什么鼻毛会变白| 钱是什么单位| 喝茶叶茶有什么好处和坏处| 宝宝囟门什么时候闭合| 梦见女儿哭意味着什么| 鼠冲什么生肖| pbr是什么意思| 脚心烧是什么原因| 穿山甲说了什么| 火腿炒什么菜好吃| 女人被操是什么感觉| peg是什么意思| 理工科是什么意思| 做爱女生是什么感觉| 左侧头疼是什么原因| 唐氏筛查高风险是什么意思| 唐氏筛查和无创有什么区别| 10月19是什么星座| 白天咳嗽晚上不咳嗽是什么原因| 安门是什么意思| 刷酸是什么| 手发麻是什么原因| 养生是什么意思| 什么牌子的蛋白质粉比较好| 什么食物吃了不胖| 死库水是什么意思| 打耳洞不能吃什么| 送荷花的寓意是什么| 煎熬是什么意思| 兆字五行属什么| 7月初7是什么节日| 什么是沙龙| 文雅是什么意思| 下面痒用什么药效果好| 看甲沟炎挂什么科| 什么是幻听| 右脸麻木是什么原因| 什么木做菜板最好| 为什么会心衰| 本科是什么| 谷丙转氨酶高是什么原因| 忌动土是什么意思| 什么是忧郁症| 三月一日是什么星座| 莎字五行属什么| 什么是周岁| kumpoo是什么牌子| 邪气入体是什么症状| 关羽的刀叫什么名字| 什么是普世价值| 早晨起来嘴苦是什么原因| 醒酒器有什么作用| 博文是什么意思| 什么情况不能献血| 长痘痘去医院挂什么科| 吊儿郎当什么意思| 梭子蟹什么季节吃最好| 养阴生津是什么意思| 强直性脊柱炎看什么科| 霸王别姬是什么意思| 跳楼机是什么| 正主是什么意思| 外耳道疖肿用什么药| 汤圆和元宵有什么区别| 五行火生什么克什么| 全身检查要挂什么科| 五定是什么| 怀孕吃什么水果比较好| 扁平足是什么样的| 上海副市长什么级别| 达英35是什么药| 相声海清是什么意思| 尿不出来吃什么药| 养神经的药是什么药最好| nautical什么牌子| 养病是什么意思| 吃柿子有什么好处和坏处| 大便里面有血是什么原因| 副高是什么级别| 大腿外侧什么经络| 良心是什么意思| 乙肝检查挂什么科| 梦到自己开车是什么意思| 排卵期出血是什么原因造成的| 嗓子疼吃什么食物好| 抗核抗体阳性对怀孕有什么影响| 北方人立秋吃什么| 一箭双雕是什么生肖| 什么叫基因突变| 勿忘是什么意思| 白带多用什么药效果好| 洋葱不能和什么一起吃| 蜂蜜是什么糖| 肩周炎属于什么科室| 二婚是什么意思| 阑尾炎手术后可以吃什么| 青光眼是什么意思| 狮子吃什么食物| 10度左右穿什么衣服合适| 梦见灵堂是什么预兆| 打仗是什么意思| 喉咙有痰咳嗽是什么原因| 车震什么意思| 蔓越莓对女性妇科有什么好处| 什么人不适合吃胃复春| 吃人肉会得什么病| 小青柑属于什么茶| 为什么手臂上有很多很小的点| 我炸了是什么意思| 什么时候做人流才是最佳时间| 梦见彩虹是什么征兆| 三月二十六是什么星座| 二氧化碳是什么东西| 胎盘能吃吗有什么作用与功效| 百度

The hardware-assisted virtualization challenge


January 30, 2019 posted by Kamil Rytarowski

Over two years ago, I made a pledge to use NetBSD as my sole OS and only operating system, and to resist booting into any other OS until I had implemented hardware-accelerated virtualization in the NetBSD kernel (the equivalent of Linux' KVM, or Hyper-V).

Today, I am here to report: Mission Accomplished!

It's been a long road, but we now have hardware-accelerated virtualization in the kernel! And while I had only initially planned to get Oracle VirtualBox working, I have with the help of the Intel HAXM engine (the same backend used for virtualization in Android Studio) and a qemu frontend, successfully managed to boot a range of mainstream operating systems.

With the advent of Intel's open-sourcing of their HAXM engine, we now have access to an important set of features:

  • A BSD-style license.
  • Support for multiple platforms: Windows, Darwin, Linux, and now NetBSD .
  • HAXM is an Intel hardware assisted virtualization for their CPUs (VTx and EPT needed).
  • Support for an arbitrary number of concurrent VMs. For simplicity's sake, NetBSD only supports 8, whereas Windows/Darwin/Linux support 64.
  • An arbitary number of supported VCPUS per VM. All OSes support up to 64 VCPUs.
  • ioctl(2) based API (/dev/HAX, /dev/haxmvm/vmXX, /dev/haxmvm/haxmvmXXvcpuYY).
  • Implement non-intrusively as part of the kernel, rather than as an out-of-tree, standalone executable kernel module.
  • Default compatibility with qemu as a frontend.
  • Active upstream support from Intel, which is driven by commercial needs.
  • Optimized for desktop scenarios.
  • Probably the only open-source cross-OS virtualization engine.
  • An active and passionate community that's dedicated to keep improving it.

As well as a few of HAXM's downsides:

  • No AMD (SVM) support (althought there are community plans to implement it).
  • No support for non-x86 architectures.
  • Need for a relatively recent Intel CPU (EPT required).
  • Not as flexible as KVM-like solutions for embedded use-cases or servers.
  • Not as quick as KVM (probably 80% as fast as KVM).

If you'd like more details on HAXM, check out the following sites:

贸易战第二天,欧美多位重量级人物在中国这样表态

百度 4、按照公司的要求进行成本的核算和控制,及时反映成本支出情况;  5、协助公司的税务申报、优惠政策申请、税收筹划等工作;6、配合财务总监协调外部审计相关工作。

I've managed to boot and run several operating systems as guests running on HAXM/NetBSD, all of which are multi-core (2-4 VCPUs):

  • NetBSD. And as our motto goes, of course it runs NetBSD. And, of course, my main priority as a NetBSD developer is achieving excellent support for NetBSD guest operating systems. With the massive performance gains of hardware-accelerated virtualization, it'll finally be possible to run kernel fuzzers and many other practical, real-world workloads on virtualized NetBSD systems.


    [NetBSD at the bootloader]


    [NetBSD kernel booting]


    [NetBSD at a shell prompt]


    [NetBSD with X Window session]


    [NetBSD with X Window session]


    [NetBSD guest and qemu's ACPI integration - emitted poweroff button press]


    [NetBSD in the qemu's curses mode display, which I find convenient to use, especially on a headless remote computer]

  • Linux. When I pledged myself to not boot any other OS before accomplishing my goal, I was mostly thinking about resigning from benefits of the Linux ecosystem (driver and software base). There is still a selection of programs that I miss such as valgrind.. but with each week we are getting closer to fill the missing gaps. Linux guests seem to work, however there is need to tune or disable IOAPIC in order to get it running (I had to pass "noapic" as a Linux kernel option).


    [ArchLinux at a bootloader]


    [ArchLinux at a shell (ZSH) prompt]


    [Ubuntu's installer]


    [Ubuntu at a bootloader]

  • Windows. While I have no personal need nor use-case to run Windows, it's a must-have prestigious target for virtualization. I've obtained a Windows 7 86 trial image from the official Microsoft webpage for testing purposes. Windows 8.1 or newer and 64-bit version is still in development in HAXM.


    [Windows 7 booting]


    [Windows 7 welcome message]


    [Windows 7 running]


    [Windows 7 Control Panel]


    [Windows 7 multitasking]


    [Windows 7 MS Paint]

  • DragonflyBSD. I was prompted to test this FreeBSD derivation by a developer of this OS and it just worked flawlessly.


    [DragonflyBSD at a bootloader]


    [DragonflyBSD at a shell prompt]

  • FreeDOS. It seems to just work, but I have no idea what I can use it for.


    [FREEDOS at an installer]


    [FREEDOS at a command line]

Unfortunatelly not all Operating Systems are already supported. I've found issues with the following ones:
  • Android. The kernel booting seems fine (with "noapic"), but later during distribution load it freezes the host computer.


    [Android bootloader]


    [Android just before the host crash]

  • FreeBSD. Hangs during the booting process.


    [FreeBSD hanging at boot]

Summary and future plans

One thing I must clarify, since I'm frequently asked about it, is that HAXM/NetBSD does not attempt to compete with the NVMM (NetBSD Virtual Machine Monitor) work being done by Maxime Villard. I'm primarily doing this for my own educational purposes, and because I find reaching feature-parity with other open-source projects is important work. Additionally, NVMM only has AMD CPU support, whereas I'm primarily a user of the Intel x86 platform, and thus, so is HAXM/NetBSD. The Intel port of NVMM and NVMM in general is still in development, and this means that HAXM is probably the first solution that has ever successfuly managed to run Windows on NetBSD (has anyone done it with Xen before?)

I will keep working on this project in my spare time and try to correct IOAPIC issues on Linux, hangs during FreeBSD's boot process, and Android crashes.

Most of the NetBSD-specific patches for qemu and Intel HAXM have already been merged upstream. And after this process has been completed, there are plans to make it available in pkgsrc. There's also at least one kernel-level workaround for HAXM behavior related to FPU state, which triggers an assert due to an abnormal condition. For this to be amended, fixes would have to land upstream into HAXM's code.

Subnote

Althought I confess that I've been playing with OpenVMS/VAX in SIMH as I have got a hobbyist license, but on the other hand it's hardly to be treated as a competition to NetBSD. Another exception was during a DTrace tutorial during EuroBSDCon 2017 in Paris, where I had to boot and use a FreeBSD image shared by the lecturer. [6 comments]

 



Comments:

Thanks, Kamil, that's great progress! I look forward to seeing more contribution to HAXM from you and the NetBSD community. > An arbitary number of supported VCPUS per VM. All OSes support up to 64 VCPUs. I think 64 is a typo, because HAX_MAX_VCPUS is defined as 16.

Posted by Yu Ning on January 30, 2019 at 08:53 AM UTC #

I have been running Windows 2000, XP and 7 as NetBSD/Xen guests (amd64) for quite a while now. It is not perfect (eg. graphics over VNC, no audio, could not get PCI or USB forwarding to work, performance is not great) but quite reliable.

Posted by khorben on January 30, 2019 at 10:26 AM UTC #

Amazing work, very well done!

Posted by Zach on January 30, 2019 at 03:34 PM UTC #

this is really nice!!!!!!!!!!!!!!!!!!!!!

Posted by tony on January 31, 2019 at 02:48 AM UTC #

Excellent work, Kamil! Congrats and thank you! NetBSD is my favorite and this gives me choices.

Posted by Gary on February 22, 2019 at 12:00 AM UTC #

Kamil, this IS IMPRESSIVE!!! Thank you for investing your time in NetBSD, I use it on servers and on two desktops too. I am excited about your work and have to test it, since using Xen on desktop is far from comfortable. Thank you one more time! Petr

Posted by 127.0.0.1 on February 28, 2019 at 05:18 PM UTC #

Post a Comment:
Comments are closed for this entry.
心脏突然剧烈跳动是什么原因 福寿延绵是什么意思 贴切是什么意思 合成立方氧化锆是什么 属蛇是什么命
广州机场叫什么名字 两情相悦什么意思 胃火牙疼吃什么药好 一什么饭 月经期间可以吃什么水果
乔迁送什么礼物 静电是什么 附件炎吃什么药最好 肛门塞什么东西最舒服 没有痔疮大便出血是什么原因
一直打哈欠是什么原因 梵克雅宝是什么材质 黄飞鸿属什么生肖 15岁可以做什么兼职 发五行属什么
月子可以吃什么菜hcv9jop6ns7r.cn 血象高会导致什么后果hcv8jop3ns4r.cn 0到3个月的婴儿惊吓吃什么药hcv8jop2ns5r.cn 中国第一长洞是什么hcv8jop5ns4r.cn 便秘吃什么hcv8jop6ns6r.cn
马刺是什么hcv8jop5ns4r.cn 垂头丧气什么意思hcv9jop7ns2r.cn 高尿酸血症吃什么药hcv9jop1ns3r.cn 脚抽筋什么原因hcv8jop5ns7r.cn 小孩突然抽搐失去意识是什么原因hcv8jop7ns4r.cn
秉着是什么意思hcv9jop6ns0r.cn 女人自尊心强说明什么onlinewuye.com 高铁不能带什么hcv8jop2ns8r.cn 桂花什么时候开bfb118.com 飞机上不能带什么东西hcv7jop7ns1r.cn
前庭是什么意思bfb118.com 动脉斑块是什么意思520myf.com 嘴下面起痘是什么原因hcv8jop9ns2r.cn m k是什么牌子hcv8jop1ns6r.cn 打不死的小强什么意思jingluanji.com
百度