SlideShare a Scribd company logo
1 of 6
Implements BIOS emulation support for BHyVe: A BSD Hypervisor
Abstract
Current BHyVe only supports FreeBSD/amd64 as a GuestOS.
One of the reason why BHyVe cannot support other OSes is lack of BIOS
support.
My project is implementing BIOS emulator on BHyVe, to remove these
limitations.
What is BHyVe?
BHyVe is new project to implement a hypervisor witch will integrate in FreeBSD.
The concept is similar to Linux KVM, it provides hypervisor driver to
unmodified BSD kernel running on baremetal machine.
With the driver, the kernel become a hypervisor, able to run GuestOS just like
normal process on the kernel.
Both hypervisors are designed for VT-x and AMD-V, hardware assisted
virtualization, unlike Xen s paravirtualization and VMware s binary translation1.
The kernel module only provides a feature to switch CPU modes between Host
mode and Guest mode2, almost all device emulation is performed in userland
process(Figure 1).
Linux KVM uses modified QEMU3 as the userland part.
It s good way to support large coverage of Guest OSes, because QEMU is highly
developed emulator, many people already confirmed to run variety of OSes on it.
KVM could support almost same features what QEMU has, and it just worked
fine.
BHyVe s approach is different.
BHyVe implements minimum set of device support which required to run
FreeBSD guest, from scratch.
In the result, we could have completely GPL-free, BSD licensed, well coded
hypervisor, but it only supports FreeBSD/amd64 as a Guest OS.
One of the reason why BHyVe cannot support other OSes is lack of BIOS
support.
1 Xen and VMware had provided hypervisors which use software technique to
virtualize non VT-x x86 CPUs. KVM and BHyVe doesn t take care such old CPUs,
designed for using the feature at first.
2 In Intel VT-x, it called VMX root mode and VMX non-root mode .
3 Original QEMU has full emulation of x86 CPU, but on KVM we want to use VT-x
hardware assisted virtualization instead of CPU emulation.
So they replace CPU emulation code to KVM driver call.
BHyVe loads and executes FreeBSD kernel directly using custom OS loader runs
on Host OS, instead of boot up from disk image.
With this method, we need to implement OS loader for each OSes, and currently
we don t have any loader other than FreeBSD.
Also, it doesn t support some OSes which calls BIOS function while running.
So I started the project to implementing BIOS emulator on BHyVe, to remove
these limitations.
/usr/sbin/bhyve
BSD
kernel
vmm.ko
ioctl(VM_RUN)
guest
kernel
VMExit
VMEntry
user
program
Figure 1. BHyVe overview
BIOS on real hardware
BIOS call is implemented as software interrupt handler on real mode(Figure 2).
CPU executes initialization code on BIOS ROM at the beginning of startup
machine, the code initialize real mode interrupt vector, to handle number of
software interrupts which are reserved for BIOS call(Figure 3).
And BIOS call is not only for legacy OSes like MS-DOS, almost all boot loaders
for mordan OSes are using BIOS call to access disks, display and keyboard.
Software interrupt(INTx)
CPU reads interrupt vector
Execute BIOS call handler
IO
Hardware
int 13h
Figure 2. BIOS call mechanism on real hardware
Interrupt vector
lowmem
Video RAM, etc
ROM BIOS
highmem
0000:0000
0000:0400
A000:0000
F000:0000
FFFF:0000
FFFF:000F
①Fetch interrupt handler address
②Jump to the handler address
③Handler accesses HW by IO instruction
Figure 3. Memory map on real hardware
BIOS on Linux KVM
On Linux KVM, QEMU loads Real BIOS(called SeaBIOS) on guest memory area.
Real BIOS means it also can install on some real motherboard, has full
functionality just like other proprietary BIOSes which installed on real hardware.
As I mentioned SeaBIOS support real motherboard, but usually used on
hypervisors and emulators.
KVM version of SeaBIOS s BIOS call handler accesses hardware by IO
instruction, and that behavior is basically same as BIOS for real hardware.
The difference is how the hardware access handled.
On KVM, the hardware access will trapped by KVM hypervisor driver, and QEMU
emulates hardware device, then KVM hypervisor driver resume a guest
environment(Figure 4).
In this implementation, KVM and QEMU does nothing about BIOS call, just
implements hardware device emulation and load real BIOS on guest memory
space(Figure 5).
Software interrupt(INTx)
CPU reads interrupt vector
Execute BIOS call handler
QEMU HW
Emulation
IO TrapSeaBIOS preforms IO
to virtual HW
QEMU emulates HW IO
HyperVisor
Guest
int 13h
Figure 4. BIOS call mechanism on KVM
Interrupt vector
lowmem
Video RAM, etc
SeaBIOS
highmem
0000:0000
0000:0400
A000:0000
F000:0000
FFFF:0000
FFFF:000F
①Fetch interrupt handler address
②Jump to the handler address
③Handler accesses HW by IO instr
QEMU emulates the IO
Figure 5. Memory map on KVM
How can we implement BIOS on BHyVe?
Port SeaBIOS on BHyVe and implement hardware emulation is an option, and it s
best way to improve compatibility of legacy code, but SeaBIOS is GPL d
software, it s not comfortable to bring in FreeBSD code tree.
And there s no implementation non-GPL real BIOS.
Instead, there s BSD licensed DOS Emulator called doscmd .
It s the software to run old DOS application on FreeBSD, the mechanism is
described as follows:
• Map page to 0x0
• Load DOS program
• run DOS program by entering v8086 mode
• DOS program calls BIOS call or DOS API by invoke INTx instruction
• DOS Emulator traps software interrupt, emulate BIOS call or DOS API
• Resuming v8086 mode
So it has BIOS emulation code which runs on FreeBSD protected mode
program.
Then, we decided to port BIOS emulation code to BHyVe and trap BIOS call
which executed on guest environment, instead of bring in real BIOS.
Trapping BIOS call
VT-x has functionality to trap various event on guest mode, it can be done by
changing VT-x configuration structure called VMCS.
And BHyVe kernel module can notify these events by IOCTL return.
So we need to trap BIOS call by changing configuration on VMCS, but what
event can be used for trap BIOS call?
Looks like trapping software interrupt is the easiest way, but let s think carefully
about protected mode.
On protected mode, it uses different interrupt vector called IDT, even userland
program calls INT 13H, BIOS INT 13H service won t called.
Maybe we can detect mode change between real mode/protected mode, and
enable/disable software interrupt trapping, but it s bit complicated.
Pseudo BIOS
Instead of implement complicated mode change detection, we decided to use
VMCALL instruction.
VMCALL instruction is the instruction which causes unconditional VMExit4.
And we made really simple pseudo BIOS for it.
Every software interrupt handler for BIOS call is like this:
VMCALL
IRET
BHyVe make interrupt vector when initialize guest memory area for BIOS call
handler, set pointer of the BIOS call handler described above.
In this way, it doesn t take care about mode changes anymore.
Conclusion
We decided to choose different approach than Linux KVM, to getting BIOS
support on BHyVe.
Linux KVM uses real BIOS and perform hardware emulation, BHyVe emulates
BIOS call it self(Figure 6).
4 Trap by hypervisor
Software interrupt(INTx)
CPU reads interrupt vector
Execute pseudo BIOS call handler
BHyVe BIOS
Emulation
VMCALL Trap
Pseudo BIOS issue
VMCALL instruction
(Hypercall)
BHyVe emulates BIOS call
HyperVisor
Guest
int 13h
Figure 6. BIOS call mechanism on BHyVe

More Related Content

What's hot

Introduction to Virtualization, Virsh and Virt-Manager
Introduction to Virtualization, Virsh and Virt-ManagerIntroduction to Virtualization, Virsh and Virt-Manager
Introduction to Virtualization, Virsh and Virt-Managerwalkerchang
 
Malicious Hypervisor - Virtualization in Shellcodes by Adhokshaj Mishra
Malicious Hypervisor - Virtualization in Shellcodes by Adhokshaj MishraMalicious Hypervisor - Virtualization in Shellcodes by Adhokshaj Mishra
Malicious Hypervisor - Virtualization in Shellcodes by Adhokshaj MishraOWASP Delhi
 
Virtualization Technology Overview
Virtualization Technology OverviewVirtualization Technology Overview
Virtualization Technology OverviewOpenCity Community
 
Kvm virtualization in_rhel_7
Kvm virtualization in_rhel_7Kvm virtualization in_rhel_7
Kvm virtualization in_rhel_7Urgen Sherpa
 
PV-Drivers for SeaBIOS using Upstream Qemu
PV-Drivers for SeaBIOS using Upstream QemuPV-Drivers for SeaBIOS using Upstream Qemu
PV-Drivers for SeaBIOS using Upstream QemuThe Linux Foundation
 
LCE13: Virtualization Forum
LCE13: Virtualization ForumLCE13: Virtualization Forum
LCE13: Virtualization ForumLinaro
 
I/O仮想化最前線〜ネットワークI/Oを中心に〜
I/O仮想化最前線〜ネットワークI/Oを中心に〜I/O仮想化最前線〜ネットワークI/Oを中心に〜
I/O仮想化最前線〜ネットワークI/Oを中心に〜Ryousei Takano
 
Hyper V - Minasi Forum 2009
Hyper V - Minasi Forum 2009Hyper V - Minasi Forum 2009
Hyper V - Minasi Forum 2009Aidan Finn
 
2014.08.30 Virtual Machine Threat 세미나
2014.08.30 Virtual Machine Threat 세미나2014.08.30 Virtual Machine Threat 세미나
2014.08.30 Virtual Machine Threat 세미나용환 노
 
Share point-easy-setup
Share point-easy-setupShare point-easy-setup
Share point-easy-setupLOPSUY
 
Embedded Systems Conference 2014 Presentation
Embedded Systems Conference 2014 PresentationEmbedded Systems Conference 2014 Presentation
Embedded Systems Conference 2014 PresentationManish Jaggi
 
Kvm virtualization platform
Kvm virtualization platformKvm virtualization platform
Kvm virtualization platformAhmad Hafeezi
 
Linux-without-a-bootloader
Linux-without-a-bootloaderLinux-without-a-bootloader
Linux-without-a-bootloaderNishanth Menon
 
Using QEMU for cross development
Using QEMU for cross developmentUsing QEMU for cross development
Using QEMU for cross developmentTetsuyuki Kobayashi
 
[Ruxcon] Breaking virtualization by switching the cpu to virtual 8086 mode
[Ruxcon] Breaking virtualization by switching the cpu to virtual 8086 mode[Ruxcon] Breaking virtualization by switching the cpu to virtual 8086 mode
[Ruxcon] Breaking virtualization by switching the cpu to virtual 8086 modeMoabi.com
 

What's hot (20)

Introduction to Virtualization, Virsh and Virt-Manager
Introduction to Virtualization, Virsh and Virt-ManagerIntroduction to Virtualization, Virsh and Virt-Manager
Introduction to Virtualization, Virsh and Virt-Manager
 
Malicious Hypervisor - Virtualization in Shellcodes by Adhokshaj Mishra
Malicious Hypervisor - Virtualization in Shellcodes by Adhokshaj MishraMalicious Hypervisor - Virtualization in Shellcodes by Adhokshaj Mishra
Malicious Hypervisor - Virtualization in Shellcodes by Adhokshaj Mishra
 
Virtualization Technology Overview
Virtualization Technology OverviewVirtualization Technology Overview
Virtualization Technology Overview
 
Kvm virtualization in_rhel_7
Kvm virtualization in_rhel_7Kvm virtualization in_rhel_7
Kvm virtualization in_rhel_7
 
PV-Drivers for SeaBIOS using Upstream Qemu
PV-Drivers for SeaBIOS using Upstream QemuPV-Drivers for SeaBIOS using Upstream Qemu
PV-Drivers for SeaBIOS using Upstream Qemu
 
LCE13: Virtualization Forum
LCE13: Virtualization ForumLCE13: Virtualization Forum
LCE13: Virtualization Forum
 
Kvm setup
Kvm setupKvm setup
Kvm setup
 
I/O仮想化最前線〜ネットワークI/Oを中心に〜
I/O仮想化最前線〜ネットワークI/Oを中心に〜I/O仮想化最前線〜ネットワークI/Oを中心に〜
I/O仮想化最前線〜ネットワークI/Oを中心に〜
 
Hyper V - Minasi Forum 2009
Hyper V - Minasi Forum 2009Hyper V - Minasi Forum 2009
Hyper V - Minasi Forum 2009
 
2014.08.30 Virtual Machine Threat 세미나
2014.08.30 Virtual Machine Threat 세미나2014.08.30 Virtual Machine Threat 세미나
2014.08.30 Virtual Machine Threat 세미나
 
Share point-easy-setup
Share point-easy-setupShare point-easy-setup
Share point-easy-setup
 
Embedded Systems Conference 2014 Presentation
Embedded Systems Conference 2014 PresentationEmbedded Systems Conference 2014 Presentation
Embedded Systems Conference 2014 Presentation
 
Comando kvm terminal
Comando kvm terminalComando kvm terminal
Comando kvm terminal
 
Kvm virtualization platform
Kvm virtualization platformKvm virtualization platform
Kvm virtualization platform
 
Drive into kvm
Drive into kvmDrive into kvm
Drive into kvm
 
Linux-without-a-bootloader
Linux-without-a-bootloaderLinux-without-a-bootloader
Linux-without-a-bootloader
 
Virtualization
VirtualizationVirtualization
Virtualization
 
Using QEMU for cross development
Using QEMU for cross developmentUsing QEMU for cross development
Using QEMU for cross development
 
[Ruxcon] Breaking virtualization by switching the cpu to virtual 8086 mode
[Ruxcon] Breaking virtualization by switching the cpu to virtual 8086 mode[Ruxcon] Breaking virtualization by switching the cpu to virtual 8086 mode
[Ruxcon] Breaking virtualization by switching the cpu to virtual 8086 mode
 
VM - Talk
VM - TalkVM - Talk
VM - Talk
 

Viewers also liked

Security Onion - Brief
Security Onion - BriefSecurity Onion - Brief
Security Onion - BriefAshley Deuble
 
一种基于拟合函数的图形识别算法
一种基于拟合函数的图形识别算法一种基于拟合函数的图形识别算法
一种基于拟合函数的图形识别算法Lixun Peng
 
E-mosaics: agile learning for the workplace in 2012
E-mosaics: agile learning for the workplace in 2012 E-mosaics: agile learning for the workplace in 2012
E-mosaics: agile learning for the workplace in 2012 Brightwave Group
 
R3L+ project material: Reviving Limerick CDB City of Learning Strategy, Janua...
R3L+ project material: Reviving Limerick CDB City of Learning Strategy, Janua...R3L+ project material: Reviving Limerick CDB City of Learning Strategy, Janua...
R3L+ project material: Reviving Limerick CDB City of Learning Strategy, Janua...Randolph Preisinger-Kleine
 
Obowiązki gmin w zakresie gospodarki odpadami
Obowiązki gmin w zakresie gospodarki odpadamiObowiązki gmin w zakresie gospodarki odpadami
Obowiązki gmin w zakresie gospodarki odpadamiEkokonsultacje
 
Scotland Invitation
Scotland InvitationScotland Invitation
Scotland InvitationAlan Bassett
 
The Future of Digital Banking - Übergangslos, mobile, abschlussstark!
The Future of Digital Banking - Übergangslos, mobile, abschlussstark!The Future of Digital Banking - Übergangslos, mobile, abschlussstark!
The Future of Digital Banking - Übergangslos, mobile, abschlussstark!Namics – A Merkle Company
 
Quarter square log cabin tutorial
Quarter square log cabin tutorialQuarter square log cabin tutorial
Quarter square log cabin tutorialLaura Rieben
 
Lifting Matters Issue 11 Febuary 2010
Lifting Matters Issue 11 Febuary 2010Lifting Matters Issue 11 Febuary 2010
Lifting Matters Issue 11 Febuary 2010Alan Bassett
 
Namics Fachtagung Industrie im Web-The Solution for the biggest pains
Namics Fachtagung Industrie im Web-The Solution for the biggest painsNamics Fachtagung Industrie im Web-The Solution for the biggest pains
Namics Fachtagung Industrie im Web-The Solution for the biggest painsNamics – A Merkle Company
 
Content Quality Checklist By Heidi Cohen of Actionable Marketing Guide
Content Quality Checklist By Heidi Cohen of Actionable Marketing GuideContent Quality Checklist By Heidi Cohen of Actionable Marketing Guide
Content Quality Checklist By Heidi Cohen of Actionable Marketing GuideHeidi Cohen
 
Amatciems Latvija
Amatciems   LatvijaAmatciems   Latvija
Amatciems Latvijaverka 123
 

Viewers also liked (20)

Security Onion - Brief
Security Onion - BriefSecurity Onion - Brief
Security Onion - Brief
 
Security Onion
Security OnionSecurity Onion
Security Onion
 
一种基于拟合函数的图形识别算法
一种基于拟合函数的图形识别算法一种基于拟合函数的图形识别算法
一种基于拟合函数的图形识别算法
 
E-mosaics: agile learning for the workplace in 2012
E-mosaics: agile learning for the workplace in 2012 E-mosaics: agile learning for the workplace in 2012
E-mosaics: agile learning for the workplace in 2012
 
Basic design tip1
Basic design tip1Basic design tip1
Basic design tip1
 
Best of steve jobs
Best of steve jobsBest of steve jobs
Best of steve jobs
 
R3L+ project material: Reviving Limerick CDB City of Learning Strategy, Janua...
R3L+ project material: Reviving Limerick CDB City of Learning Strategy, Janua...R3L+ project material: Reviving Limerick CDB City of Learning Strategy, Janua...
R3L+ project material: Reviving Limerick CDB City of Learning Strategy, Janua...
 
Obowiązki gmin w zakresie gospodarki odpadami
Obowiązki gmin w zakresie gospodarki odpadamiObowiązki gmin w zakresie gospodarki odpadami
Obowiązki gmin w zakresie gospodarki odpadami
 
Svega Ima
Svega ImaSvega Ima
Svega Ima
 
Scotland Invitation
Scotland InvitationScotland Invitation
Scotland Invitation
 
The Future of Digital Banking - Übergangslos, mobile, abschlussstark!
The Future of Digital Banking - Übergangslos, mobile, abschlussstark!The Future of Digital Banking - Übergangslos, mobile, abschlussstark!
The Future of Digital Banking - Übergangslos, mobile, abschlussstark!
 
Quarter square log cabin tutorial
Quarter square log cabin tutorialQuarter square log cabin tutorial
Quarter square log cabin tutorial
 
Lifting Matters Issue 11 Febuary 2010
Lifting Matters Issue 11 Febuary 2010Lifting Matters Issue 11 Febuary 2010
Lifting Matters Issue 11 Febuary 2010
 
Kelly C. Ruggles
Kelly C.  RugglesKelly C.  Ruggles
Kelly C. Ruggles
 
Namics Fachtagung Industrie im Web-The Solution for the biggest pains
Namics Fachtagung Industrie im Web-The Solution for the biggest painsNamics Fachtagung Industrie im Web-The Solution for the biggest pains
Namics Fachtagung Industrie im Web-The Solution for the biggest pains
 
Content Quality Checklist By Heidi Cohen of Actionable Marketing Guide
Content Quality Checklist By Heidi Cohen of Actionable Marketing GuideContent Quality Checklist By Heidi Cohen of Actionable Marketing Guide
Content Quality Checklist By Heidi Cohen of Actionable Marketing Guide
 
Sunseeker Yacht34M
Sunseeker Yacht34MSunseeker Yacht34M
Sunseeker Yacht34M
 
Mhw2011leaflet
Mhw2011leafletMhw2011leaflet
Mhw2011leaflet
 
Kelly C. Ruggles
Kelly C. RugglesKelly C. Ruggles
Kelly C. Ruggles
 
Amatciems Latvija
Amatciems   LatvijaAmatciems   Latvija
Amatciems Latvija
 

Similar to Implements BIOS emulation support for BHyVe: A BSD Hypervisor

IT109 Microsoft Windows 7 Operating Systems Unit 02
IT109 Microsoft Windows 7 Operating Systems Unit 02IT109 Microsoft Windows 7 Operating Systems Unit 02
IT109 Microsoft Windows 7 Operating Systems Unit 02blusmurfydot1
 
Krenel Based Virtual Machine In Centos7
Krenel Based Virtual Machine In Centos7Krenel Based Virtual Machine In Centos7
Krenel Based Virtual Machine In Centos7a_ratra
 
Bootkits: past, present & future
Bootkits: past, present & futureBootkits: past, present & future
Bootkits: past, present & futureAlex Matrosov
 
Virtual Pc Seminar
Virtual Pc SeminarVirtual Pc Seminar
Virtual Pc Seminarguest5b5549
 
Virtualization technolegys for amdocs
Virtualization technolegys for amdocsVirtualization technolegys for amdocs
Virtualization technolegys for amdocsSamuel Dratwa
 
[HackInTheBox] Breaking virtualization by any means
[HackInTheBox] Breaking virtualization by any means[HackInTheBox] Breaking virtualization by any means
[HackInTheBox] Breaking virtualization by any meansMoabi.com
 
A510840101 24982 23_2020_lecture_2
A510840101 24982 23_2020_lecture_2A510840101 24982 23_2020_lecture_2
A510840101 24982 23_2020_lecture_2Krishna Kumar Singh
 
Virtualization (Distributed computing)
Virtualization (Distributed computing)Virtualization (Distributed computing)
Virtualization (Distributed computing)Sri Prasanna
 
Fullandparavirtualization.ppt
Fullandparavirtualization.pptFullandparavirtualization.ppt
Fullandparavirtualization.pptImXaib
 
virtualization and hypervisors
virtualization and hypervisorsvirtualization and hypervisors
virtualization and hypervisorsGaurav Suri
 
Joanna Rutkowska Subverting Vista Kernel
Joanna Rutkowska   Subverting Vista KernelJoanna Rutkowska   Subverting Vista Kernel
Joanna Rutkowska Subverting Vista Kernelguestf1a032
 
Running virtual box from the linux command line
Running virtual box from the linux command lineRunning virtual box from the linux command line
Running virtual box from the linux command lineEric Javier Espino Man
 
Virtualization
VirtualizationVirtualization
VirtualizationYansi Keim
 
Presentation cloud computing workshop - virtualization
Presentation   cloud computing workshop - virtualizationPresentation   cloud computing workshop - virtualization
Presentation cloud computing workshop - virtualizationxKinAnx
 
Linux virtualization
Linux virtualizationLinux virtualization
Linux virtualizationGoogle
 

Similar to Implements BIOS emulation support for BHyVe: A BSD Hypervisor (20)

IT109 Microsoft Windows 7 Operating Systems Unit 02
IT109 Microsoft Windows 7 Operating Systems Unit 02IT109 Microsoft Windows 7 Operating Systems Unit 02
IT109 Microsoft Windows 7 Operating Systems Unit 02
 
Krenel Based Virtual Machine In Centos7
Krenel Based Virtual Machine In Centos7Krenel Based Virtual Machine In Centos7
Krenel Based Virtual Machine In Centos7
 
Bootkits: past, present & future
Bootkits: past, present & futureBootkits: past, present & future
Bootkits: past, present & future
 
Virtual Pc Seminar
Virtual Pc SeminarVirtual Pc Seminar
Virtual Pc Seminar
 
Virtualization technolegys for amdocs
Virtualization technolegys for amdocsVirtualization technolegys for amdocs
Virtualization technolegys for amdocs
 
[HackInTheBox] Breaking virtualization by any means
[HackInTheBox] Breaking virtualization by any means[HackInTheBox] Breaking virtualization by any means
[HackInTheBox] Breaking virtualization by any means
 
Unit II.ppt
Unit II.pptUnit II.ppt
Unit II.ppt
 
Vcp6.7 episode 1
Vcp6.7 episode 1Vcp6.7 episode 1
Vcp6.7 episode 1
 
A510840101 24982 23_2020_lecture_2
A510840101 24982 23_2020_lecture_2A510840101 24982 23_2020_lecture_2
A510840101 24982 23_2020_lecture_2
 
Virtualization basics
Virtualization basics Virtualization basics
Virtualization basics
 
Virtualization (Distributed computing)
Virtualization (Distributed computing)Virtualization (Distributed computing)
Virtualization (Distributed computing)
 
Fullandparavirtualization.ppt
Fullandparavirtualization.pptFullandparavirtualization.ppt
Fullandparavirtualization.ppt
 
virtualization and hypervisors
virtualization and hypervisorsvirtualization and hypervisors
virtualization and hypervisors
 
Joanna Rutkowska Subverting Vista Kernel
Joanna Rutkowska   Subverting Vista KernelJoanna Rutkowska   Subverting Vista Kernel
Joanna Rutkowska Subverting Vista Kernel
 
5 kvm arm
5 kvm arm5 kvm arm
5 kvm arm
 
Running virtual box from the linux command line
Running virtual box from the linux command lineRunning virtual box from the linux command line
Running virtual box from the linux command line
 
Virtualization
VirtualizationVirtualization
Virtualization
 
The kvm virtualization way
The kvm virtualization wayThe kvm virtualization way
The kvm virtualization way
 
Presentation cloud computing workshop - virtualization
Presentation   cloud computing workshop - virtualizationPresentation   cloud computing workshop - virtualization
Presentation cloud computing workshop - virtualization
 
Linux virtualization
Linux virtualizationLinux virtualization
Linux virtualization
 

More from Takuya ASADA

Seastar in 歌舞伎座.tech#8「C++初心者会」
Seastar in 歌舞伎座.tech#8「C++初心者会」Seastar in 歌舞伎座.tech#8「C++初心者会」
Seastar in 歌舞伎座.tech#8「C++初心者会」Takuya ASADA
 
Seastar:高スループットなサーバアプリケーションの為の新しいフレームワーク
Seastar:高スループットなサーバアプリケーションの為の新しいフレームワークSeastar:高スループットなサーバアプリケーションの為の新しいフレームワーク
Seastar:高スループットなサーバアプリケーションの為の新しいフレームワークTakuya ASADA
 
高スループットなサーバアプリケーションの為の新しいフレームワーク
「Seastar」
高スループットなサーバアプリケーションの為の新しいフレームワーク
「Seastar」高スループットなサーバアプリケーションの為の新しいフレームワーク
「Seastar」
高スループットなサーバアプリケーションの為の新しいフレームワーク
「Seastar」Takuya ASADA
 
ヤマノススメ〜秋山郷 de ハッカソン〜
ヤマノススメ〜秋山郷 de ハッカソン〜ヤマノススメ〜秋山郷 de ハッカソン〜
ヤマノススメ〜秋山郷 de ハッカソン〜Takuya ASADA
 
UEFI時代のブートローダ
UEFI時代のブートローダUEFI時代のブートローダ
UEFI時代のブートローダTakuya ASADA
 
OSvのご紹介 in 
Java 8 HotSpot meeting
OSvのご紹介 in 
Java 8 HotSpot meetingOSvのご紹介 in 
Java 8 HotSpot meeting
OSvのご紹介 in 
Java 8 HotSpot meetingTakuya ASADA
 
OSvパンフレット v3
OSvパンフレット v3OSvパンフレット v3
OSvパンフレット v3Takuya ASADA
 
OSvのご紹介 in OSC2014 Tokyo/Fall
OSvのご紹介 in OSC2014 Tokyo/FallOSvのご紹介 in OSC2014 Tokyo/Fall
OSvのご紹介 in OSC2014 Tokyo/FallTakuya ASADA
 
OSvの概要と実装
OSvの概要と実装OSvの概要と実装
OSvの概要と実装Takuya ASADA
 
Linux network stack
Linux network stackLinux network stack
Linux network stackTakuya ASADA
 
Ethernetの受信処理
Ethernetの受信処理Ethernetの受信処理
Ethernetの受信処理Takuya ASADA
 
Presentation on your terminal
Presentation on your terminalPresentation on your terminal
Presentation on your terminalTakuya ASADA
 
僕のIntel nucが起動しないわけがない
僕のIntel nucが起動しないわけがない僕のIntel nucが起動しないわけがない
僕のIntel nucが起動しないわけがないTakuya ASADA
 
Interrupt Affinityについて
Interrupt AffinityについてInterrupt Affinityについて
Interrupt AffinityについてTakuya ASADA
 
OSvパンフレット
OSvパンフレットOSvパンフレット
OSvパンフレットTakuya ASADA
 
BHyVeでOSvを起動したい
〜BIOSがなくてもこの先生きのこるには〜
BHyVeでOSvを起動したい
〜BIOSがなくてもこの先生きのこるには〜BHyVeでOSvを起動したい
〜BIOSがなくてもこの先生きのこるには〜
BHyVeでOSvを起動したい
〜BIOSがなくてもこの先生きのこるには〜Takuya ASADA
 
「ハイパーバイザの作り方」読書会#2
「ハイパーバイザの作り方」読書会#2「ハイパーバイザの作り方」読書会#2
「ハイパーバイザの作り方」読書会#2Takuya ASADA
 
「ハイパーバイザの作り方」読書会#1
「ハイパーバイザの作り方」読書会#1「ハイパーバイザの作り方」読書会#1
「ハイパーバイザの作り方」読書会#1Takuya ASADA
 
10GbE時代のネットワークI/O高速化
10GbE時代のネットワークI/O高速化10GbE時代のネットワークI/O高速化
10GbE時代のネットワークI/O高速化Takuya ASADA
 

More from Takuya ASADA (20)

Seastar in 歌舞伎座.tech#8「C++初心者会」
Seastar in 歌舞伎座.tech#8「C++初心者会」Seastar in 歌舞伎座.tech#8「C++初心者会」
Seastar in 歌舞伎座.tech#8「C++初心者会」
 
Seastar:高スループットなサーバアプリケーションの為の新しいフレームワーク
Seastar:高スループットなサーバアプリケーションの為の新しいフレームワークSeastar:高スループットなサーバアプリケーションの為の新しいフレームワーク
Seastar:高スループットなサーバアプリケーションの為の新しいフレームワーク
 
高スループットなサーバアプリケーションの為の新しいフレームワーク
「Seastar」
高スループットなサーバアプリケーションの為の新しいフレームワーク
「Seastar」高スループットなサーバアプリケーションの為の新しいフレームワーク
「Seastar」
高スループットなサーバアプリケーションの為の新しいフレームワーク
「Seastar」
 
ヤマノススメ〜秋山郷 de ハッカソン〜
ヤマノススメ〜秋山郷 de ハッカソン〜ヤマノススメ〜秋山郷 de ハッカソン〜
ヤマノススメ〜秋山郷 de ハッカソン〜
 
UEFI時代のブートローダ
UEFI時代のブートローダUEFI時代のブートローダ
UEFI時代のブートローダ
 
OSvのご紹介 in 
Java 8 HotSpot meeting
OSvのご紹介 in 
Java 8 HotSpot meetingOSvのご紹介 in 
Java 8 HotSpot meeting
OSvのご紹介 in 
Java 8 HotSpot meeting
 
OSvパンフレット v3
OSvパンフレット v3OSvパンフレット v3
OSvパンフレット v3
 
OSvのご紹介 in OSC2014 Tokyo/Fall
OSvのご紹介 in OSC2014 Tokyo/FallOSvのご紹介 in OSC2014 Tokyo/Fall
OSvのご紹介 in OSC2014 Tokyo/Fall
 
OSv噺
OSv噺OSv噺
OSv噺
 
OSvの概要と実装
OSvの概要と実装OSvの概要と実装
OSvの概要と実装
 
Linux network stack
Linux network stackLinux network stack
Linux network stack
 
Ethernetの受信処理
Ethernetの受信処理Ethernetの受信処理
Ethernetの受信処理
 
Presentation on your terminal
Presentation on your terminalPresentation on your terminal
Presentation on your terminal
 
僕のIntel nucが起動しないわけがない
僕のIntel nucが起動しないわけがない僕のIntel nucが起動しないわけがない
僕のIntel nucが起動しないわけがない
 
Interrupt Affinityについて
Interrupt AffinityについてInterrupt Affinityについて
Interrupt Affinityについて
 
OSvパンフレット
OSvパンフレットOSvパンフレット
OSvパンフレット
 
BHyVeでOSvを起動したい
〜BIOSがなくてもこの先生きのこるには〜
BHyVeでOSvを起動したい
〜BIOSがなくてもこの先生きのこるには〜BHyVeでOSvを起動したい
〜BIOSがなくてもこの先生きのこるには〜
BHyVeでOSvを起動したい
〜BIOSがなくてもこの先生きのこるには〜
 
「ハイパーバイザの作り方」読書会#2
「ハイパーバイザの作り方」読書会#2「ハイパーバイザの作り方」読書会#2
「ハイパーバイザの作り方」読書会#2
 
「ハイパーバイザの作り方」読書会#1
「ハイパーバイザの作り方」読書会#1「ハイパーバイザの作り方」読書会#1
「ハイパーバイザの作り方」読書会#1
 
10GbE時代のネットワークI/O高速化
10GbE時代のネットワークI/O高速化10GbE時代のネットワークI/O高速化
10GbE時代のネットワークI/O高速化
 

Recently uploaded

Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 

Recently uploaded (20)

Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 

Implements BIOS emulation support for BHyVe: A BSD Hypervisor

  • 1. Implements BIOS emulation support for BHyVe: A BSD Hypervisor Abstract Current BHyVe only supports FreeBSD/amd64 as a GuestOS. One of the reason why BHyVe cannot support other OSes is lack of BIOS support. My project is implementing BIOS emulator on BHyVe, to remove these limitations. What is BHyVe? BHyVe is new project to implement a hypervisor witch will integrate in FreeBSD. The concept is similar to Linux KVM, it provides hypervisor driver to unmodified BSD kernel running on baremetal machine. With the driver, the kernel become a hypervisor, able to run GuestOS just like normal process on the kernel. Both hypervisors are designed for VT-x and AMD-V, hardware assisted virtualization, unlike Xen s paravirtualization and VMware s binary translation1. The kernel module only provides a feature to switch CPU modes between Host mode and Guest mode2, almost all device emulation is performed in userland process(Figure 1). Linux KVM uses modified QEMU3 as the userland part. It s good way to support large coverage of Guest OSes, because QEMU is highly developed emulator, many people already confirmed to run variety of OSes on it. KVM could support almost same features what QEMU has, and it just worked fine. BHyVe s approach is different. BHyVe implements minimum set of device support which required to run FreeBSD guest, from scratch. In the result, we could have completely GPL-free, BSD licensed, well coded hypervisor, but it only supports FreeBSD/amd64 as a Guest OS. One of the reason why BHyVe cannot support other OSes is lack of BIOS support. 1 Xen and VMware had provided hypervisors which use software technique to virtualize non VT-x x86 CPUs. KVM and BHyVe doesn t take care such old CPUs, designed for using the feature at first. 2 In Intel VT-x, it called VMX root mode and VMX non-root mode . 3 Original QEMU has full emulation of x86 CPU, but on KVM we want to use VT-x hardware assisted virtualization instead of CPU emulation. So they replace CPU emulation code to KVM driver call.
  • 2. BHyVe loads and executes FreeBSD kernel directly using custom OS loader runs on Host OS, instead of boot up from disk image. With this method, we need to implement OS loader for each OSes, and currently we don t have any loader other than FreeBSD. Also, it doesn t support some OSes which calls BIOS function while running. So I started the project to implementing BIOS emulator on BHyVe, to remove these limitations. /usr/sbin/bhyve BSD kernel vmm.ko ioctl(VM_RUN) guest kernel VMExit VMEntry user program Figure 1. BHyVe overview BIOS on real hardware BIOS call is implemented as software interrupt handler on real mode(Figure 2). CPU executes initialization code on BIOS ROM at the beginning of startup machine, the code initialize real mode interrupt vector, to handle number of software interrupts which are reserved for BIOS call(Figure 3). And BIOS call is not only for legacy OSes like MS-DOS, almost all boot loaders for mordan OSes are using BIOS call to access disks, display and keyboard. Software interrupt(INTx) CPU reads interrupt vector Execute BIOS call handler IO Hardware int 13h Figure 2. BIOS call mechanism on real hardware
  • 3. Interrupt vector lowmem Video RAM, etc ROM BIOS highmem 0000:0000 0000:0400 A000:0000 F000:0000 FFFF:0000 FFFF:000F ①Fetch interrupt handler address ②Jump to the handler address ③Handler accesses HW by IO instruction Figure 3. Memory map on real hardware BIOS on Linux KVM On Linux KVM, QEMU loads Real BIOS(called SeaBIOS) on guest memory area. Real BIOS means it also can install on some real motherboard, has full functionality just like other proprietary BIOSes which installed on real hardware. As I mentioned SeaBIOS support real motherboard, but usually used on hypervisors and emulators. KVM version of SeaBIOS s BIOS call handler accesses hardware by IO instruction, and that behavior is basically same as BIOS for real hardware. The difference is how the hardware access handled. On KVM, the hardware access will trapped by KVM hypervisor driver, and QEMU emulates hardware device, then KVM hypervisor driver resume a guest environment(Figure 4). In this implementation, KVM and QEMU does nothing about BIOS call, just implements hardware device emulation and load real BIOS on guest memory space(Figure 5).
  • 4. Software interrupt(INTx) CPU reads interrupt vector Execute BIOS call handler QEMU HW Emulation IO TrapSeaBIOS preforms IO to virtual HW QEMU emulates HW IO HyperVisor Guest int 13h Figure 4. BIOS call mechanism on KVM Interrupt vector lowmem Video RAM, etc SeaBIOS highmem 0000:0000 0000:0400 A000:0000 F000:0000 FFFF:0000 FFFF:000F ①Fetch interrupt handler address ②Jump to the handler address ③Handler accesses HW by IO instr QEMU emulates the IO Figure 5. Memory map on KVM How can we implement BIOS on BHyVe? Port SeaBIOS on BHyVe and implement hardware emulation is an option, and it s best way to improve compatibility of legacy code, but SeaBIOS is GPL d software, it s not comfortable to bring in FreeBSD code tree. And there s no implementation non-GPL real BIOS. Instead, there s BSD licensed DOS Emulator called doscmd . It s the software to run old DOS application on FreeBSD, the mechanism is described as follows: • Map page to 0x0 • Load DOS program • run DOS program by entering v8086 mode
  • 5. • DOS program calls BIOS call or DOS API by invoke INTx instruction • DOS Emulator traps software interrupt, emulate BIOS call or DOS API • Resuming v8086 mode So it has BIOS emulation code which runs on FreeBSD protected mode program. Then, we decided to port BIOS emulation code to BHyVe and trap BIOS call which executed on guest environment, instead of bring in real BIOS. Trapping BIOS call VT-x has functionality to trap various event on guest mode, it can be done by changing VT-x configuration structure called VMCS. And BHyVe kernel module can notify these events by IOCTL return. So we need to trap BIOS call by changing configuration on VMCS, but what event can be used for trap BIOS call? Looks like trapping software interrupt is the easiest way, but let s think carefully about protected mode. On protected mode, it uses different interrupt vector called IDT, even userland program calls INT 13H, BIOS INT 13H service won t called. Maybe we can detect mode change between real mode/protected mode, and enable/disable software interrupt trapping, but it s bit complicated. Pseudo BIOS Instead of implement complicated mode change detection, we decided to use VMCALL instruction. VMCALL instruction is the instruction which causes unconditional VMExit4. And we made really simple pseudo BIOS for it. Every software interrupt handler for BIOS call is like this: VMCALL IRET BHyVe make interrupt vector when initialize guest memory area for BIOS call handler, set pointer of the BIOS call handler described above. In this way, it doesn t take care about mode changes anymore. Conclusion We decided to choose different approach than Linux KVM, to getting BIOS support on BHyVe. Linux KVM uses real BIOS and perform hardware emulation, BHyVe emulates BIOS call it self(Figure 6). 4 Trap by hypervisor
  • 6. Software interrupt(INTx) CPU reads interrupt vector Execute pseudo BIOS call handler BHyVe BIOS Emulation VMCALL Trap Pseudo BIOS issue VMCALL instruction (Hypercall) BHyVe emulates BIOS call HyperVisor Guest int 13h Figure 6. BIOS call mechanism on BHyVe