SlideShare a Scribd company logo
OSb: OSv on BitVisor 
(2014/11/21 BitVisor Summit 3) 
Yushi Omote 
University of Tsukuba 
Takahiro Shinagawa 
The University of Tokyo 
Monday, November 24, 14
BitVisor 
App App App 
BitVisor 
Hardware 
OS 
http://www.justis.as-1.co.jp 
Monday, November 24, 14
OSv 
VMM 
Hardware 
App 
OSv 
http://medical-care.feed.jp 
Monday, November 24, 14
BitVisor 
Monday, November 24, 14
BitVisor OSv 
Monday, November 24, 14
BitVisor OSv 
http://www.root.ne.jp/nishide/shs/ 
Monday, November 24, 14
OSv on BitVisor 
BitVisor 
Hardware 
App 
OSv 
Monday, November 24, 14
OSv on BitVisor 
BitVisor 
Hardware 
App 
OSv 
OSb 
Monday, November 24, 14
OSv on BitVisor 
BitVisor 
Hardware 
App 
OSv 
What the fuck 
no Virtio ! 
OSb 
Physical interface 
sucks ! 
What the hell is 
PRO/1000 ! 
Monday, November 24, 14
OSv on BitVisor 
BitVisor 
Hardware 
App 
OSv 
What the fuck 
no Virtio ! 
OSb 
Physical interface 
sucks ! 
What the hell is 
PRO/1000 ! 
You have no 
choice. 
Virtio 
Monday, November 24, 14
~ The Road to OSb ~ 
Monday, November 24, 14
OSv Code Reading 
• Boot Process 
• Some Drivers 
- MBR 
- Read local disk with INT13/42. 
- Load command line, boot loader, OSv kernel. 
- Get memory map with INT15/E820. 
- Setup segment descriptors/page tables. 
- Switch to 64-bit mode. 
- premain() 
- main() 
... 
- Serial / VGA output. 
- SATA. 
- Virtio NIC/BLK/RNG/SCSI. 
- ACPI. 
- APIC. 
... 
OSv may run on 
physical machine. 
(=BitVisor) 
Monday, November 24, 14
Only one thing to fix 
drivers/acpi.cc: 
// Copy the root table list to dynamic memory 
if (!is_bitvisor()) { 
status = AcpiReallocateRootTable(); 
if (ACPI_FAILURE(status)) { 
acpi_e("AcpiReallocateRootTable failed: %sn", 
AcpiFormatException(status)); 
return; 
} 
} 
Triple fault 
Skip on BitVisor 
Monday, November 24, 14
Hello world ! 
Monday, November 24, 14
OSb 
On BitVisor, 
Whenever updating OSv images, 
you update the entire Physical Disk. 
http://a.fsdn.com/sd/articles/14/11/12/1946208-1.jpg http://www.dreamstime.com 
Troublesome... 
(especially for development) 
Monday, November 24, 14
Network-boot of OSb 
./scripts/run.py 
Monday, November 24, 14
Network-boot of OSb 
Hardware 
./scripts/run.py 
Monday, November 24, 14
Network-boot of OSb 
Hardware 
./scripts/run.py 
Image 
Update 
Monday, November 24, 14
Network-boot of OSb 
Hardware 
./scripts/run.py 
Image 
Update 
IPMI 
Monday, November 24, 14
Network-boot of OSb 
Hardware 
./scripts/run.py 
Image 
Update 
PXE Boot 
IPMI 
Monday, November 24, 14
Network-boot of OSb 
Hardware 
./scripts/run.py 
Image 
Update 
PXE Boot 
IPMI 
BitVisor 
Monday, November 24, 14
Network-boot of OSb 
Hardware 
./scripts/run.py 
Image 
Update 
PXE Boot 
IPMI 
BitVisor 
OSv 
Network Boot 
Monday, November 24, 14
Network-boot of OSb 
Hardware 
./scripts/run.py 
Image 
Update 
PXE Boot 
IPMI 
BitVisor 
OSv 
Network Boot 
App 
Monday, November 24, 14
Network-boot of OSb 
BitVisor 
Hardware 
App 
OSv 
Network Boot 
IPMI 
./scripts/run.py 
TTY 
Image 
Update 
PXE Boot 
Monday, November 24, 14
Performance? 
26.00 
19.50 
13.00 
6.50 
0 
OSb Linux (Host, Bare-metal) 
Elapsed Time (sec) 
for (12-billion times) val++; 
Monday, November 24, 14
Virtio NIC 
BitVisor 
Hardware 
App 
OSv 
No PRO/1000... 
Virtio NIC please... 
PRO/1000... 
Monday, November 24, 14
Virtio NIC 
BitVisor 
Hardware 
App 
OSv 
Virtio NIC 
No PRO/1000... 
Virtio NIC please... 
Implementing Virtio 
PRO/1000... 
Monday, November 24, 14
How to implement? 
BitVisor 
Hardware 
App 
OSv 
Virtio NIC 
Finally, Our 
Virtualization? 
Monday, November 24, 14
How to implement? 
BitVisor 
Hardware 
App 
OSv 
Virtio NIC 
Finally, Our 
Virtualization? 
No, 
BitVisor’s Way! 
Monday, November 24, 14
Para Pass-through 
Virtio 
BitVisor 
Hardware 
Intercept only interesting I/Os! 
Virtio Ring 
PRO/1000 Ring 
App 
OSv 
MSI-X etc. 
PCI Functions 
Pass-through! 
Monday, November 24, 14
Faking PCI IDs 0x1AF4 
(Virtio Device) 
0x1000 
(Virtio NIC) 
0 (Legacy Virtio) 
1 (Virtio NIC) 
Monday, November 24, 14
Faking PCI BARs 
BAR0: IO space 
for Virtio = PRO/1000 IO space 
Everything else 
Pass-through 
(e.g. MSI-X) 
Monday, November 24, 14
Virtio NIC Operations 
• Virtio Ring 
• Packet Transmission 
• Packet Reception 
Monday, November 24, 14
Virtio Ring 
Guest selects rings: 
* Transmission Ring 
* Reception Ring 
BAR0 
(IO) 
BitVisor emulates 
these registers 
Memory space 
Virtio Ring (Available + Used) 
Req. Req. Req. 
Monday, November 24, 14
Packet Transmission 
OSv 
(Driver) 
BitVisor 
(Virtio NIC) 
Transmission Ring 
Req. 
PRO/1000 
Req. 
Req. 
Req. Req. Req. 
Transmission Ring 
Notify! 
(PIO) 
Req. 
Req. 
Reuse 
VMExit 
Monday, November 24, 14
Packet Reception 
OSv 
(Driver) 
BitVisor 
(Virtio NIC) 
Reception Ring 
Req. 
PRO/1000 
Req. 
Req. 
Req. Req. Req. 
Reception Ring 
Interrupt 
Req. 
Req. 
Reuse 
VMExit 
Monday, November 24, 14
Netperf TCP_STREAM 
1000.00 
750.00 
500.00 
250.00 
0 
941.39 
816.78 
OSb Linux (Host, Bare-metal) 
Throughput (Mbps) 
Monday, November 24, 14
VMExits are Costly... 
OSv 
(Driver) 
Notify! 
(PIO) VMExit 
BitVisor 
(Virtio NIC) 
PRO/1000 
Interrupt 
VMExit 
Guest 
mode 
Host 
mode 
Switching 
Overhead 
Monday, November 24, 14
Exitless Virtio with 
Dedicated Core 
Req. Req. Req. Transmission 
Ring 
Req. Req. Req. Reception 
Ring 
ELVIS [Har’El et al. ATC’13] 
Req. Req. Req. 
Req. Req. Req. 
Interrupt (IPI) 
Always 
Guest 
Mode 
Always 
Host 
Mode 
Polling 
Monday, November 24, 14
Implementation 
Summary 
• Core Concealing 
• Modifying ACPI MADT Table 
• Notification PIO Pass-through 
• Pass-through to ineffective PIO 
• Interrupt 
• Get vector # from MSI-X table and Send IPI 
• (Or ask PRO/1000 to trigger) 
Monday, November 24, 14
Netperf TCP_STREAM 
(Exitless Virtio) 
950.00 
712.50 
475.00 
237.50 
0 
921.83 941.39 
OSb Linux (Host, Bare-metal) 
Throughput (Mbps) 
Monday, November 24, 14
Ping 
(Exitless Virtio) 
0.16 
0.12 
0.08 
0.04 
0 
0.16 
0.12 
OSb Linux (Host, Bare-metal) 
Latency (msec) 
Monday, November 24, 14
Still Under 
Optimization 
• TODOs 
• Interrupt Moderation 
• Zero Copy/VMDq 
• Advanced PRO/1000 Descriptor 
• TCP Offloading 
Monday, November 24, 14
Summary & 
Future Work 
• Summary 
• Running OSv on BitVisor 
• Virtio NIC + Optimization 
• Future work 
• Further Optimization & Evaluation 
• Other Virtio Devices (BLK, RNG...) 
Monday, November 24, 14
Thank you ! 
http://www.root.ne.jp/nishide/shs/ 
Monday, November 24, 14

More Related Content

What's hot

Unveiling EMUX - ARM and MIPS IoT Emulation Framework
Unveiling EMUX - ARM and MIPS IoT Emulation FrameworkUnveiling EMUX - ARM and MIPS IoT Emulation Framework
Unveiling EMUX - ARM and MIPS IoT Emulation Framework
Saumil Shah
 
Hack.LU 2018 ARM IoT Firmware Emulation Workshop
Hack.LU 2018 ARM IoT Firmware Emulation WorkshopHack.LU 2018 ARM IoT Firmware Emulation Workshop
Hack.LU 2018 ARM IoT Firmware Emulation Workshop
Saumil Shah
 
INSIDE ARM-X Cansecwest 2020
INSIDE ARM-X Cansecwest 2020INSIDE ARM-X Cansecwest 2020
INSIDE ARM-X Cansecwest 2020
Saumil Shah
 
Introducing ARM-X
Introducing ARM-XIntroducing ARM-X
Introducing ARM-X
Saumil Shah
 
What's New in ES6 for Web Devs
What's New in ES6 for Web DevsWhat's New in ES6 for Web Devs
What's New in ES6 for Web Devs
Rami Sayar
 
Stm32 develop tool introduction
Stm32 develop tool introductionStm32 develop tool introduction
Stm32 develop tool introduction
冠宇 陳
 
IoT Chess 16th April Berlin
IoT Chess 16th April BerlinIoT Chess 16th April Berlin
IoT Chess 16th April Berlin
Lars Gregori
 
Retrospective: Seven VM Engineering Years
Retrospective: Seven VM Engineering YearsRetrospective: Seven VM Engineering Years
Retrospective: Seven VM Engineering Years
ESUG
 
Kernel Recipes 2013 - kconfig-frontends, a packaging of the kconfig parser an...
Kernel Recipes 2013 - kconfig-frontends, a packaging of the kconfig parser an...Kernel Recipes 2013 - kconfig-frontends, a packaging of the kconfig parser an...
Kernel Recipes 2013 - kconfig-frontends, a packaging of the kconfig parser an...
Anne Nicolas
 
Control-M 800 - Infrastructure Example
Control-M 800 - Infrastructure ExampleControl-M 800 - Infrastructure Example
Control-M 800 - Infrastructure Example
Ohio University
 
ARM IoT Firmware Emulation Workshop
ARM IoT Firmware Emulation WorkshopARM IoT Firmware Emulation Workshop
ARM IoT Firmware Emulation Workshop
Saumil Shah
 
Internet Technology for the Commodore 64
Internet Technology for the Commodore 64Internet Technology for the Commodore 64
Internet Technology for the Commodore 64
Leif Bloomquist
 
Vm ware fuzzing - defcon russia 20
Vm ware fuzzing  - defcon russia 20Vm ware fuzzing  - defcon russia 20
Vm ware fuzzing - defcon russia 20
DefconRussia
 
DOD 2016 - Ignat Korchagin - Managing Server Secrets at Scale
DOD 2016 - Ignat Korchagin - Managing Server Secrets at ScaleDOD 2016 - Ignat Korchagin - Managing Server Secrets at Scale
DOD 2016 - Ignat Korchagin - Managing Server Secrets at Scale
PROIDEA
 
Mikhail Belopuhov: OpenBSD: Where is crypto headed?
Mikhail Belopuhov: OpenBSD: Where is crypto headed?Mikhail Belopuhov: OpenBSD: Where is crypto headed?
Mikhail Belopuhov: OpenBSD: Where is crypto headed?
Yandex
 
【Manifes2018】私が考えるPCの"最新"学習方法
【Manifes2018】私が考えるPCの"最新"学習方法【Manifes2018】私が考えるPCの"最新"学習方法
【Manifes2018】私が考えるPCの"最新"学習方法
竹田 大将
 
Cubie board
Cubie boardCubie board
Cubie board
Gerardo Di Iorio
 

What's hot (17)

Unveiling EMUX - ARM and MIPS IoT Emulation Framework
Unveiling EMUX - ARM and MIPS IoT Emulation FrameworkUnveiling EMUX - ARM and MIPS IoT Emulation Framework
Unveiling EMUX - ARM and MIPS IoT Emulation Framework
 
Hack.LU 2018 ARM IoT Firmware Emulation Workshop
Hack.LU 2018 ARM IoT Firmware Emulation WorkshopHack.LU 2018 ARM IoT Firmware Emulation Workshop
Hack.LU 2018 ARM IoT Firmware Emulation Workshop
 
INSIDE ARM-X Cansecwest 2020
INSIDE ARM-X Cansecwest 2020INSIDE ARM-X Cansecwest 2020
INSIDE ARM-X Cansecwest 2020
 
Introducing ARM-X
Introducing ARM-XIntroducing ARM-X
Introducing ARM-X
 
What's New in ES6 for Web Devs
What's New in ES6 for Web DevsWhat's New in ES6 for Web Devs
What's New in ES6 for Web Devs
 
Stm32 develop tool introduction
Stm32 develop tool introductionStm32 develop tool introduction
Stm32 develop tool introduction
 
IoT Chess 16th April Berlin
IoT Chess 16th April BerlinIoT Chess 16th April Berlin
IoT Chess 16th April Berlin
 
Retrospective: Seven VM Engineering Years
Retrospective: Seven VM Engineering YearsRetrospective: Seven VM Engineering Years
Retrospective: Seven VM Engineering Years
 
Kernel Recipes 2013 - kconfig-frontends, a packaging of the kconfig parser an...
Kernel Recipes 2013 - kconfig-frontends, a packaging of the kconfig parser an...Kernel Recipes 2013 - kconfig-frontends, a packaging of the kconfig parser an...
Kernel Recipes 2013 - kconfig-frontends, a packaging of the kconfig parser an...
 
Control-M 800 - Infrastructure Example
Control-M 800 - Infrastructure ExampleControl-M 800 - Infrastructure Example
Control-M 800 - Infrastructure Example
 
ARM IoT Firmware Emulation Workshop
ARM IoT Firmware Emulation WorkshopARM IoT Firmware Emulation Workshop
ARM IoT Firmware Emulation Workshop
 
Internet Technology for the Commodore 64
Internet Technology for the Commodore 64Internet Technology for the Commodore 64
Internet Technology for the Commodore 64
 
Vm ware fuzzing - defcon russia 20
Vm ware fuzzing  - defcon russia 20Vm ware fuzzing  - defcon russia 20
Vm ware fuzzing - defcon russia 20
 
DOD 2016 - Ignat Korchagin - Managing Server Secrets at Scale
DOD 2016 - Ignat Korchagin - Managing Server Secrets at ScaleDOD 2016 - Ignat Korchagin - Managing Server Secrets at Scale
DOD 2016 - Ignat Korchagin - Managing Server Secrets at Scale
 
Mikhail Belopuhov: OpenBSD: Where is crypto headed?
Mikhail Belopuhov: OpenBSD: Where is crypto headed?Mikhail Belopuhov: OpenBSD: Where is crypto headed?
Mikhail Belopuhov: OpenBSD: Where is crypto headed?
 
【Manifes2018】私が考えるPCの"最新"学習方法
【Manifes2018】私が考えるPCの"最新"学習方法【Manifes2018】私が考えるPCの"最新"学習方法
【Manifes2018】私が考えるPCの"最新"学習方法
 
Cubie board
Cubie boardCubie board
Cubie board
 

Similar to OSb: OSv on BitVisor (2)

OSb: OSv on BitVisor
OSb: OSv on BitVisorOSb: OSv on BitVisor
OSb: OSv on BitVisor
Yushi Omote
 
QEMU Disk IO Which performs Better: Native or threads?
QEMU Disk IO Which performs Better: Native or threads?QEMU Disk IO Which performs Better: Native or threads?
QEMU Disk IO Which performs Better: Native or threads?
Pradeep Kumar
 
[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
Moabi.com
 
WalB: Real-time and Incremental Backup System for Block Devices
WalB: Real-time and Incremental Backup System for Block DevicesWalB: Real-time and Incremental Backup System for Block Devices
WalB: Real-time and Incremental Backup System for Block Devices
uchan_nos
 
Using Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systemsUsing Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systems
Serge Stinckwich
 
Introduction to ARM mbed-OS 3.0 uvisor
Introduction to ARM mbed-OS 3.0 uvisorIntroduction to ARM mbed-OS 3.0 uvisor
Introduction to ARM mbed-OS 3.0 uvisor
Viller Hsiao
 
BMCArmor: A Hardware Protection Scheme for Bare-metal Clouds
BMCArmor: A Hardware Protection Scheme for Bare-metal CloudsBMCArmor: A Hardware Protection Scheme for Bare-metal Clouds
BMCArmor: A Hardware Protection Scheme for Bare-metal Clouds
Shinagawa Laboratory, The University of Tokyo
 
Project ACRN hypervisor introduction
Project ACRN hypervisor introduction Project ACRN hypervisor introduction
Project ACRN hypervisor introduction
Project ACRN
 
44CON 2014 - Stupid PCIe Tricks, Joe Fitzpatrick
44CON 2014 - Stupid PCIe Tricks, Joe Fitzpatrick44CON 2014 - Stupid PCIe Tricks, Joe Fitzpatrick
44CON 2014 - Stupid PCIe Tricks, Joe Fitzpatrick
44CON
 
Project ACRN expose and pass through platform hidden PCIe devices to SOS
Project ACRN expose and pass through platform hidden PCIe devices to SOSProject ACRN expose and pass through platform hidden PCIe devices to SOS
Project ACRN expose and pass through platform hidden PCIe devices to SOS
Project ACRN
 
Derailed chef update-oct2010
Derailed chef update-oct2010Derailed chef update-oct2010
Derailed chef update-oct2010
jtimberman
 
Low-level Accesses
Low-level AccessesLow-level Accesses
Low-level Accesses
Anil Kumar Pugalia
 
JavaOne 2015 : How I Rediscovered My Coding Mojo by Building an IoT/Robotics ...
JavaOne 2015 : How I Rediscovered My Coding Mojo by Building an IoT/Robotics ...JavaOne 2015 : How I Rediscovered My Coding Mojo by Building an IoT/Robotics ...
JavaOne 2015 : How I Rediscovered My Coding Mojo by Building an IoT/Robotics ...
Mark West
 
Kernel Recipes 2017 - The Serial Device Bus - Johan Hovold
Kernel Recipes 2017 - The Serial Device Bus - Johan HovoldKernel Recipes 2017 - The Serial Device Bus - Johan Hovold
Kernel Recipes 2017 - The Serial Device Bus - Johan Hovold
Anne Nicolas
 
Consideration for Building a Private Cloud
Consideration for Building a Private CloudConsideration for Building a Private Cloud
Consideration for Building a Private Cloud
OpenStack Foundation
 
Web (dis)assembly
Web (dis)assemblyWeb (dis)assembly
Web (dis)assembly
Shakacon
 
VMware Studio & vAPP-s
VMware Studio & vAPP-sVMware Studio & vAPP-s
VMware Studio & vAPP-s
Jaroslav Mraz
 
Linux on RISC-V with Open Source Hardware (Open Source Summit Japan 2020)
Linux on RISC-V with Open Source Hardware (Open Source Summit Japan 2020)Linux on RISC-V with Open Source Hardware (Open Source Summit Japan 2020)
Linux on RISC-V with Open Source Hardware (Open Source Summit Japan 2020)
Drew Fustini
 
Livio slides-libflexsc-usenix-atc11
Livio slides-libflexsc-usenix-atc11Livio slides-libflexsc-usenix-atc11
Livio slides-libflexsc-usenix-atc11
Livio Soares
 
Gameboy emulator in rust and web assembly
Gameboy emulator in rust and web assemblyGameboy emulator in rust and web assembly
Gameboy emulator in rust and web assembly
Yodalee
 

Similar to OSb: OSv on BitVisor (2) (20)

OSb: OSv on BitVisor
OSb: OSv on BitVisorOSb: OSv on BitVisor
OSb: OSv on BitVisor
 
QEMU Disk IO Which performs Better: Native or threads?
QEMU Disk IO Which performs Better: Native or threads?QEMU Disk IO Which performs Better: Native or threads?
QEMU Disk IO Which performs Better: Native or threads?
 
[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
 
WalB: Real-time and Incremental Backup System for Block Devices
WalB: Real-time and Incremental Backup System for Block DevicesWalB: Real-time and Incremental Backup System for Block Devices
WalB: Real-time and Incremental Backup System for Block Devices
 
Using Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systemsUsing Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systems
 
Introduction to ARM mbed-OS 3.0 uvisor
Introduction to ARM mbed-OS 3.0 uvisorIntroduction to ARM mbed-OS 3.0 uvisor
Introduction to ARM mbed-OS 3.0 uvisor
 
BMCArmor: A Hardware Protection Scheme for Bare-metal Clouds
BMCArmor: A Hardware Protection Scheme for Bare-metal CloudsBMCArmor: A Hardware Protection Scheme for Bare-metal Clouds
BMCArmor: A Hardware Protection Scheme for Bare-metal Clouds
 
Project ACRN hypervisor introduction
Project ACRN hypervisor introduction Project ACRN hypervisor introduction
Project ACRN hypervisor introduction
 
44CON 2014 - Stupid PCIe Tricks, Joe Fitzpatrick
44CON 2014 - Stupid PCIe Tricks, Joe Fitzpatrick44CON 2014 - Stupid PCIe Tricks, Joe Fitzpatrick
44CON 2014 - Stupid PCIe Tricks, Joe Fitzpatrick
 
Project ACRN expose and pass through platform hidden PCIe devices to SOS
Project ACRN expose and pass through platform hidden PCIe devices to SOSProject ACRN expose and pass through platform hidden PCIe devices to SOS
Project ACRN expose and pass through platform hidden PCIe devices to SOS
 
Derailed chef update-oct2010
Derailed chef update-oct2010Derailed chef update-oct2010
Derailed chef update-oct2010
 
Low-level Accesses
Low-level AccessesLow-level Accesses
Low-level Accesses
 
JavaOne 2015 : How I Rediscovered My Coding Mojo by Building an IoT/Robotics ...
JavaOne 2015 : How I Rediscovered My Coding Mojo by Building an IoT/Robotics ...JavaOne 2015 : How I Rediscovered My Coding Mojo by Building an IoT/Robotics ...
JavaOne 2015 : How I Rediscovered My Coding Mojo by Building an IoT/Robotics ...
 
Kernel Recipes 2017 - The Serial Device Bus - Johan Hovold
Kernel Recipes 2017 - The Serial Device Bus - Johan HovoldKernel Recipes 2017 - The Serial Device Bus - Johan Hovold
Kernel Recipes 2017 - The Serial Device Bus - Johan Hovold
 
Consideration for Building a Private Cloud
Consideration for Building a Private CloudConsideration for Building a Private Cloud
Consideration for Building a Private Cloud
 
Web (dis)assembly
Web (dis)assemblyWeb (dis)assembly
Web (dis)assembly
 
VMware Studio & vAPP-s
VMware Studio & vAPP-sVMware Studio & vAPP-s
VMware Studio & vAPP-s
 
Linux on RISC-V with Open Source Hardware (Open Source Summit Japan 2020)
Linux on RISC-V with Open Source Hardware (Open Source Summit Japan 2020)Linux on RISC-V with Open Source Hardware (Open Source Summit Japan 2020)
Linux on RISC-V with Open Source Hardware (Open Source Summit Japan 2020)
 
Livio slides-libflexsc-usenix-atc11
Livio slides-libflexsc-usenix-atc11Livio slides-libflexsc-usenix-atc11
Livio slides-libflexsc-usenix-atc11
 
Gameboy emulator in rust and web assembly
Gameboy emulator in rust and web assemblyGameboy emulator in rust and web assembly
Gameboy emulator in rust and web assembly
 

Recently uploaded

原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
ydzowc
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Sinan KOZAK
 
Rainfall intensity duration frequency curve statistical analysis and modeling...
Rainfall intensity duration frequency curve statistical analysis and modeling...Rainfall intensity duration frequency curve statistical analysis and modeling...
Rainfall intensity duration frequency curve statistical analysis and modeling...
bijceesjournal
 
An Introduction to the Compiler Designss
An Introduction to the Compiler DesignssAn Introduction to the Compiler Designss
An Introduction to the Compiler Designss
ElakkiaU
 
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURSCompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
RamonNovais6
 
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.pptUnit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
KrishnaveniKrishnara1
 
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
171ticu
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
Yasser Mahgoub
 
People as resource Grade IX.pdf minimala
People as resource Grade IX.pdf minimalaPeople as resource Grade IX.pdf minimala
People as resource Grade IX.pdf minimala
riddhimaagrawal986
 
Mechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdfMechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdf
21UME003TUSHARDEB
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
kandramariana6
 
Curve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods RegressionCurve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods Regression
Nada Hikmah
 
Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...
bijceesjournal
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
Hitesh Mohapatra
 
Welding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdfWelding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdf
AjmalKhan50578
 
Applications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdfApplications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdf
Atif Razi
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
IJECEIAES
 
Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...
Prakhyath Rai
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
VICTOR MAESTRE RAMIREZ
 
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
Gino153088
 

Recently uploaded (20)

原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
 
Rainfall intensity duration frequency curve statistical analysis and modeling...
Rainfall intensity duration frequency curve statistical analysis and modeling...Rainfall intensity duration frequency curve statistical analysis and modeling...
Rainfall intensity duration frequency curve statistical analysis and modeling...
 
An Introduction to the Compiler Designss
An Introduction to the Compiler DesignssAn Introduction to the Compiler Designss
An Introduction to the Compiler Designss
 
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURSCompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
CompEx~Manual~1210 (2).pdf COMPEX GAS AND VAPOURS
 
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.pptUnit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
 
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
 
People as resource Grade IX.pdf minimala
People as resource Grade IX.pdf minimalaPeople as resource Grade IX.pdf minimala
People as resource Grade IX.pdf minimala
 
Mechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdfMechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdf
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
 
Curve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods RegressionCurve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods Regression
 
Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
 
Welding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdfWelding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdf
 
Applications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdfApplications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdf
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
 
Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
 
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
 

OSb: OSv on BitVisor (2)

  • 1. OSb: OSv on BitVisor (2014/11/21 BitVisor Summit 3) Yushi Omote University of Tsukuba Takahiro Shinagawa The University of Tokyo Monday, November 24, 14
  • 2. BitVisor App App App BitVisor Hardware OS http://www.justis.as-1.co.jp Monday, November 24, 14
  • 3. OSv VMM Hardware App OSv http://medical-care.feed.jp Monday, November 24, 14
  • 5. BitVisor OSv Monday, November 24, 14
  • 7. OSv on BitVisor BitVisor Hardware App OSv Monday, November 24, 14
  • 8. OSv on BitVisor BitVisor Hardware App OSv OSb Monday, November 24, 14
  • 9. OSv on BitVisor BitVisor Hardware App OSv What the fuck no Virtio ! OSb Physical interface sucks ! What the hell is PRO/1000 ! Monday, November 24, 14
  • 10. OSv on BitVisor BitVisor Hardware App OSv What the fuck no Virtio ! OSb Physical interface sucks ! What the hell is PRO/1000 ! You have no choice. Virtio Monday, November 24, 14
  • 11. ~ The Road to OSb ~ Monday, November 24, 14
  • 12. OSv Code Reading • Boot Process • Some Drivers - MBR - Read local disk with INT13/42. - Load command line, boot loader, OSv kernel. - Get memory map with INT15/E820. - Setup segment descriptors/page tables. - Switch to 64-bit mode. - premain() - main() ... - Serial / VGA output. - SATA. - Virtio NIC/BLK/RNG/SCSI. - ACPI. - APIC. ... OSv may run on physical machine. (=BitVisor) Monday, November 24, 14
  • 13. Only one thing to fix drivers/acpi.cc: // Copy the root table list to dynamic memory if (!is_bitvisor()) { status = AcpiReallocateRootTable(); if (ACPI_FAILURE(status)) { acpi_e("AcpiReallocateRootTable failed: %sn", AcpiFormatException(status)); return; } } Triple fault Skip on BitVisor Monday, November 24, 14
  • 14. Hello world ! Monday, November 24, 14
  • 15. OSb On BitVisor, Whenever updating OSv images, you update the entire Physical Disk. http://a.fsdn.com/sd/articles/14/11/12/1946208-1.jpg http://www.dreamstime.com Troublesome... (especially for development) Monday, November 24, 14
  • 16. Network-boot of OSb ./scripts/run.py Monday, November 24, 14
  • 17. Network-boot of OSb Hardware ./scripts/run.py Monday, November 24, 14
  • 18. Network-boot of OSb Hardware ./scripts/run.py Image Update Monday, November 24, 14
  • 19. Network-boot of OSb Hardware ./scripts/run.py Image Update IPMI Monday, November 24, 14
  • 20. Network-boot of OSb Hardware ./scripts/run.py Image Update PXE Boot IPMI Monday, November 24, 14
  • 21. Network-boot of OSb Hardware ./scripts/run.py Image Update PXE Boot IPMI BitVisor Monday, November 24, 14
  • 22. Network-boot of OSb Hardware ./scripts/run.py Image Update PXE Boot IPMI BitVisor OSv Network Boot Monday, November 24, 14
  • 23. Network-boot of OSb Hardware ./scripts/run.py Image Update PXE Boot IPMI BitVisor OSv Network Boot App Monday, November 24, 14
  • 24. Network-boot of OSb BitVisor Hardware App OSv Network Boot IPMI ./scripts/run.py TTY Image Update PXE Boot Monday, November 24, 14
  • 25. Performance? 26.00 19.50 13.00 6.50 0 OSb Linux (Host, Bare-metal) Elapsed Time (sec) for (12-billion times) val++; Monday, November 24, 14
  • 26. Virtio NIC BitVisor Hardware App OSv No PRO/1000... Virtio NIC please... PRO/1000... Monday, November 24, 14
  • 27. Virtio NIC BitVisor Hardware App OSv Virtio NIC No PRO/1000... Virtio NIC please... Implementing Virtio PRO/1000... Monday, November 24, 14
  • 28. How to implement? BitVisor Hardware App OSv Virtio NIC Finally, Our Virtualization? Monday, November 24, 14
  • 29. How to implement? BitVisor Hardware App OSv Virtio NIC Finally, Our Virtualization? No, BitVisor’s Way! Monday, November 24, 14
  • 30. Para Pass-through Virtio BitVisor Hardware Intercept only interesting I/Os! Virtio Ring PRO/1000 Ring App OSv MSI-X etc. PCI Functions Pass-through! Monday, November 24, 14
  • 31. Faking PCI IDs 0x1AF4 (Virtio Device) 0x1000 (Virtio NIC) 0 (Legacy Virtio) 1 (Virtio NIC) Monday, November 24, 14
  • 32. Faking PCI BARs BAR0: IO space for Virtio = PRO/1000 IO space Everything else Pass-through (e.g. MSI-X) Monday, November 24, 14
  • 33. Virtio NIC Operations • Virtio Ring • Packet Transmission • Packet Reception Monday, November 24, 14
  • 34. Virtio Ring Guest selects rings: * Transmission Ring * Reception Ring BAR0 (IO) BitVisor emulates these registers Memory space Virtio Ring (Available + Used) Req. Req. Req. Monday, November 24, 14
  • 35. Packet Transmission OSv (Driver) BitVisor (Virtio NIC) Transmission Ring Req. PRO/1000 Req. Req. Req. Req. Req. Transmission Ring Notify! (PIO) Req. Req. Reuse VMExit Monday, November 24, 14
  • 36. Packet Reception OSv (Driver) BitVisor (Virtio NIC) Reception Ring Req. PRO/1000 Req. Req. Req. Req. Req. Reception Ring Interrupt Req. Req. Reuse VMExit Monday, November 24, 14
  • 37. Netperf TCP_STREAM 1000.00 750.00 500.00 250.00 0 941.39 816.78 OSb Linux (Host, Bare-metal) Throughput (Mbps) Monday, November 24, 14
  • 38. VMExits are Costly... OSv (Driver) Notify! (PIO) VMExit BitVisor (Virtio NIC) PRO/1000 Interrupt VMExit Guest mode Host mode Switching Overhead Monday, November 24, 14
  • 39. Exitless Virtio with Dedicated Core Req. Req. Req. Transmission Ring Req. Req. Req. Reception Ring ELVIS [Har’El et al. ATC’13] Req. Req. Req. Req. Req. Req. Interrupt (IPI) Always Guest Mode Always Host Mode Polling Monday, November 24, 14
  • 40. Implementation Summary • Core Concealing • Modifying ACPI MADT Table • Notification PIO Pass-through • Pass-through to ineffective PIO • Interrupt • Get vector # from MSI-X table and Send IPI • (Or ask PRO/1000 to trigger) Monday, November 24, 14
  • 41. Netperf TCP_STREAM (Exitless Virtio) 950.00 712.50 475.00 237.50 0 921.83 941.39 OSb Linux (Host, Bare-metal) Throughput (Mbps) Monday, November 24, 14
  • 42. Ping (Exitless Virtio) 0.16 0.12 0.08 0.04 0 0.16 0.12 OSb Linux (Host, Bare-metal) Latency (msec) Monday, November 24, 14
  • 43. Still Under Optimization • TODOs • Interrupt Moderation • Zero Copy/VMDq • Advanced PRO/1000 Descriptor • TCP Offloading Monday, November 24, 14
  • 44. Summary & Future Work • Summary • Running OSv on BitVisor • Virtio NIC + Optimization • Future work • Further Optimization & Evaluation • Other Virtio Devices (BLK, RNG...) Monday, November 24, 14
  • 45. Thank you ! http://www.root.ne.jp/nishide/shs/ Monday, November 24, 14