SlideShare a Scribd company logo
Reconnaissance of Virtio: What’s new 
and how it’s all connected? 
© 2013 SAMSUNG Electronics Co. 
Mario Smarduch 
Senior Virtualization Architect 
Open Source Group 
Samsung Research America (Silicon Valley) 
m.smarduch@samsung.comSmarduch 
Senior Virtualization Architect 
Open Source Group 
Samsung Research America (Silicon Valley) 
m.smarduch@samsung.com
2 
© 2013 SAMSUNG Electronics Co. 
Agenda 
 QEMU/Guest Machine Model  IO Overview 
 Concepts - transport/backend – recent re-factoring 
 PCI transport and most recent virtio-mmio transport 
 Virtio and Device Passthrough, virtio performance
LTTPMeawaevbgomele elosry BACKEND FRONTEND WDT IDE/SCSI ………. BACKEND 
KVM mmio-TRANSPORT 
3 
© 2013 SAMSUNG Electronics Co. 
Machine Model 
Host 
QEMU Guest 
ISnPtRe rVruvirCptPtu, aUTliizmaetiro,n ISnPtRe rVruivrptCtu,P aTUliizmaetiro,n CONSOLENIC Drivers -FRONTEND 
TTAUPN/ LSITBDCIO ECmOuNlSaOtioLnE ENmICulation 
• Like host, unmodified guest expects real hardware 
• Machine model – combination of hw extensions, KVM, QEMU, GUest 
 Interrupt Local and Distributor – hw virt extensions + kvm 
 Special Purpose Register – i.e. enable/disable MMU, discover CPU features – hw virt ext + kvm 
 Timer – hw virt extensions + kvm 
 Memory – hw virt + kvm 
 Drivers/Devices – (i) mmio (ii) para-virtualized (iii) dev passthrough 
 Machine Model - defines hw – CPU, Peripherals, HW address map 
• Some Terms 
 Transport – way Guest to (i) probe, discover backend – resources; (ii) configure backend 
 Frontend – guest driver 
 Backend – whole QEMU I/O emulation + host device
LTTPMeawaevbgomele elosry BACKEND FRONTEND WDT IDE/SCSI ………. BACKEND 
4 
© 2013 SAMSUNG Electronics Co. 
MMIO Example 
QEMU Guest 
ISnPtRe rVruvirCptPtu, aUTliizmaetiro,n ISnPtRe rVruivrptCtu,P aTUliizmaetiro,n CONSOLENIC Drivers -FRONTEND 
TTAUPN/ LSITBDCIO ECmOuNlSaOtioLnE ENmICulation 
Host 
KVM mmio-TRANSPORT 
• Typing a charter – ‘-nographic’ 
 Keyboard stroke – QEMU backend (IO thread) reads from stdio 
 Finds Qemu Frontend – console emulation device passes character 
 Console device injects interrupt via KVM, guest exit/resume 
 Console interrupt handler – mmio read of device buffer 
o guest exits, decodes regs to packages addr/data size 
o Returns from vCPU KVM_RUN loop to QEMU 
o QEMU finds console device handler from addr (GPA) 
o Console handler returns data at address 
o Return to KVM, data placed in dest register 
o Resume guest 
• MMIO a lot of overhead!
5 
© 2013 SAMSUNG Electronics Co. 
Vision and Practice 
• QEMU/Guest - Vision 
 Portability any backend plugs into any transport – no clue about transport 
o Typically one transport configured 
o ‘- virtio_xxx_device’ option – no hint of transport – plug into first available one 
 Guest virtio driver unaware of transport 
o All transports can probe, discover backend 
o Indirect transport interface – i.e. virtio-net does not know what transport 
 Example 
QEMU Guest 
PCI transport virtio-vmirtmio-ionett-ransport vdiertviioc-enet- device EnumeErantuemerate virtiov-pirctiio-mmPrioobe vdirritvioer-net
6 
© 2013 SAMSUNG Electronics Co. 
Vision and Practice 
• In Practice – PCI preferred transport 
 Transport/backends ‘fused’ 
 Backend plugged into PCI 
 Prior knowledge of machine model required 
o Command line – specify transport 
o No Portability 
QEMU 
PCvdI ierttvriioac-nensept-ort 
virtio-net-pci 
Guest 
virtiov-pirctiio-mmPrioobe vdirritvioer-net
7 
© 2013 SAMSUNG Electronics Co. 
Virtio – moving data 
• virtio – ring buffers accessed from several contexts 
• Must deal with different addresses when moving data to/from virtio device 
QEMU 
TTAUBPNA/CKENLSITBDDCIOBACKENCODNFRONNTIECND GMueemsto ry • Between Guest  QEMU – QEMU view 
• Host mmap() address – QEMU VA – HVA 
• To get HVA from GPA 
 Find memory region section 
 Offset = GPA – MemoryRegion base 
 Add HVA base in RAMBlock add offset 
• To get GPA from HVA 
 From RAMBlock find MemoryRegion 
 Offset = HVA address – HVA base 
 Add to MemoryRegion base address
8 
© 2013 SAMSUNG Electronics Co. 
Virtio – moving data 
GMueemsto ry 
• Between Guest  QEMU or host – Guest view 
 Guest knows nothing abut HVA 
 Current hw supports two level page tables 
 2nd level page table maps GPA  HPA
VVVrrriiinnngggDDDeeesssccc===TTTxxxGGGPPPAAA++ VVVrrriiinnngggDDDeeesssccc===GGGPPPAAA++…… TTTxxxGGGPPPAAA++DDeesscc+ Avail Rx....GPA GUEST 
• Performance achieved through direct memory access (see Rusty Russels spec) 
9 
© 2013 SAMSUNG Electronics Co. 
Virtio – moving data 
IO Thread Virtqueue Virtqueue 
fTNdoe/tsfwerlooemrckt 
QEMU GUEST 
TxQueue VraindgdrDesRcx Queue 
 
VVrrffv…iillrnnaa.i.ggngggss__,,au_ vuiisnnaesddideGleedPxx_,Ae rl;e inlmegn[[,]] …ring 
VraindgdrDesc 
 
VVrrffv…iillrnnaa.i.ggngggss__,,au_ vuiisnnaesddideGleedPxx_,Ae rl;e inlmegn[[,]] …ring 
1 - virtio_net_hdr (skb-cb[]) 
2 – skb-data[] 
Scatterlist 
1 – page_link = page – of virtio_net_hdr 
offset = offset within page 
length = sizeof virtio_net_hdr 
2 – page_link = page – of skb-data 
offset = … 
length = skb-len 
Simple pkt – no fragments 
Vring descriptor 
1 – GPA addr of virtio_net_Hdr 
length 
2 – GPA addr of skb-data 
length 
NOTIFY
VVVrrriiinnngggDDDeeesssccc===TTTxxxGGGPPPAAA++ VVVrrriiinnngggDDDeeesssccc===GGGPPPAAA++…… TTTxxxGGGPPPAAA++DDeesscc+ Avail Rx....GPA QEMU 
10 
© 2013 SAMSUNG Electronics Co. 
IO Thread Virtqueue Virtqueue 
fTNdoe/tsfwerlooemrckt 
QEMU GUEST 
TxQueue VraindgdrDesRcx Queue 
 
VVrrffv…iillrnnaa.i.ggngggss__,,au_ vuiisnnaesddideGleedPxx_,Ae rl;e inlmegn[[,]] …ring 
VraindgdrDesc 
 
VVrrffv…iillrnnaa.i.ggngggss__,,au_ vuiisnnaesddideGleedPxx_,Ae rl;e inlmegn[[,]] …ring 
VirtQueueElement 
1. out_addr = GPA virtio_net_hdr 
out_sg.iov_len = virtio_net_hdr length 
2. out_addr = GPA skb-data 
out_sg.iov_len = skb-len VirtQueueElement 
1. out_sg.iov_base = HVA virtio_net_hdr 
out_sg.iov_len = virtio_net_hdr length 
2. out_sg.iov_base= HVA skb-data 
out_sg.iov_len = skb-len 
qemu_sendv_packet_async 
(…, out_sg, out_len, … 
virtio_net_tx_coplete) 
Virtio – moving data
11 
© 2013 SAMSUNG Electronics Co. 
Virtio – moving data 
Guest – convert GVA - HPA Host GPA - HVA, HVA - GPA 
Tx-GPA 
1v0r[__0i__2_vrisn-_n6u_]_4.g_un41 u*_1 e6 tgr__uu__1aa6x vdv6ft c1uut6s3e ra rl=daiifning1rlla;ggs, g_;_[[ _v2fdrl iaindgg;s s1d1_u;0_] e._;_ 3_u__su_u2ns_21c4eu 6]xl1 e n eu3d12_6 el t6n=e;2i dx, tx…; eliednmx;;ring[] 
Tx-GPA+0x4000 TX-Vring Tx-GPA+0x5000 
VRing vring; 
{ 
unsinged int num=… 
hwaddr desc = Desc Tx-GPA 
hwaddr avail = Desc Tx-GPA + ofst 
hwaddr used = Tx-GPA + ofst 
} /* VRing */ 
Guest Vring Operations 
xmssggi---…t___ss…sssseegggktt---b__(bb…lopuuefa)ffgf((gsnsseecctt_aah ltt=ittn…ee kprrlla=iissgtt ep** assogggfe,,f s……et,, svkirbti-o_dnaetta_h)dr) vvvv…qqqq-.----mvvnvmrrroiiiinnntoigggfyw...ddd(vreeeiqtssse)ccc [[[–iii]]]...aafVlddaIRgddTsrr IO=== _ sG…xgxPx-A_Q leoUnfE gpUtahEg_NeOTIFY 
Host Vring Operations 
virvtiioihrt_w=qn uaevG-deti_rudhtVferqlwu_uAdaspehedo us_d-ptecrx(__q(ppg…- aaeG. )tt==_xVh _vevvAqaqqd-- , (Bvvvqearri,l nisenvgmeqg.a- .)dv+aelai slsc(t+p;_ aaovfa f–isle_itnGodfP(eVxAR+i)+ng)Avail, ring[i]) Chflawogpraensa-dt vud==rerre ntvddurr eelirtndsns cguc t_l__wdopdpu_a eapwGs+=hc_ _Vy psfvsihlAqza(ypeg-soas(()fvpd(rVaeinR)sgcin_.dgpeDas,e cis)c) * i+ offsetof(VringDesc, flags) eeCll…eeomm..n--vooeuurttt__ saGgd[d…Pr[]Ae.iole v–m_l-eno=vu rtv_irnninugmg__]d d=ees vcs_rcilen-ng(_ddaeesdscc_d_parad, tdi)or(d GesVc_Apa, i) Convert GPA – vring_desc-addr to GVA 
--…e.TNl.exomoti-fuyt ogBuuatec_ksstge n[–…dT].xioivn_tbearrsuep=t ccopmu_pplehtyiosnical_memory_map(elem-out_addr[…], …)
Virtio and Device Pass-through 
12 
© 2013 SAMSUNG Electronics Co. 
Basic Operation - Backend/Guest direct access to 
shared Vring buffers - PIO 
- Switching at software level 
- Management Flexibility – internal 
SDN support 
ovs-vsctladd-port br0 ofctl–control flowsphys-intfc -vSwitch - IRQ bottleneck – 
inject Kernel –injectQ dEiMrecUt l–ycall into kvm 
- Direct access to hw memory regions 
- DMA Support 
- Switching at hw level – SR-IOV 
depends on #of Queues 
- Management Flexibility – external 
SDN capable 
- IRQ bottleneck – hw enhancements, 
posted interrupts, exitless EOI 
improve things – closer to native 
Migration - Virtio lockless 
- Saves device state, tracks dirty 
pages 
- QEMU sets ‘unmigratable’, or installs 
migration blocker 
- Guest can be holding a lock – 
deadlock, hw state, …. 
Scalability - Practical limitations – primarily per 
formance 
- Number of Devices limited, limits 
#VMs 
- SR-IOV - #of VF - # of queues 
Network 
Performance 
- Soft switching – bridge, vSwitch 
- Several IO HOPS 
- Can approach near native – 10Ge 
for few bridged Guest 
- Switching done at HW level – hw 
queues 
- Performance scales with # of Guests 
- DMA support 
- IRQ Passthrough still a problem 
Host 
Performance 
- PIO – takes cpu cycles 
- Exits – few but still 
- Guest pages swapable 
- Guest pinned – can’t swap 
- Fewer exits 
- Less PIO 
Cloud 
Environment 
- Cloud friendly – migration, SDN, 
paging 
- Not Cloud friendly, great for NFV/RT 
DPDK, run to completion
13 
© 2013 SAMSUNG Electronics Co. 
Virtio PCI Architecture 
• virtio-net example with QEMU backend – virtio-pci 
Guest 
ISnPtRe rVruvirCptPtu, aUTliizmaetiro,n ISnPtRe rVruivrptCtu,P aTUliizmaetiro,n 
QEMU 
BACBKAECNKDEND FRONTEND 
TUN/TAP tvriar12Mtn..i osMPVp-CpioIrOcIrt iti oEAndOudmptvrreieaarrtnsraiasost pt-iRiomooanrnmtnsgioe RAM Addresvdsir riRtvieoarn-ngeet 
cvoirntifoig_p_ocip_s --VirvreetvdvIOisniiroPobtPrnCui_C,oiI sdPcI-,l randoBseesxuvyt_sid RViinrtgio Buffers • Virtio device – combination of mmio  paravirt device 
PCI Config 
• Before Guest Runs …. QEMU does 
 creates proxy that plugs into PCI Bus 
 During instantiation of VirtIOPCIProxy its 
o PCIDevice vendor id, device id, class, … are set 
 Instantiates virtio-net – bus_type = TYPE_VIRTIO_BUS 
o Plugs into VirtIOPCIProxy bus – TYPE_VIRTIO_BUS 
o Fills in PCI BAR0 type PIO 
o Associates virtio_pci_config_ops with B/D/F BAR0 
• Guest 
 Enumarates PCI Bus – discovers virtio-net – via mmio 
 Loads virtio-pci, creates virtio-net device 
 virtio-net driver loads probes virtio-net backend – via mmio
QEMU Object Model 
• QEMU Class, Object view of ‘–device virtio-net-pci’ 
 First instantiate Class – C++ Class definition 
 Next the Object – C++ Declare Class variable 
 Realize it– C++ constructor default or defined 
14 
VirtioBusState 
© 2013 SAMSUNG Electronics Co. 
TYPE_DEVICE 
TYPE_PCI_DEVICE 
TYPE_VIRTIO_PCI 
.init/realizefn 
TYPE_VIRTIO_NET_PCI 
.instance_init 
TYPE_BUS 
TYPE_VIRTIO_BUS 
VirtIONet 
TYPE_DEVICE 
TYPE_VIRTIO_DEVICE 
- bus_type = TYPE_VIRTIO_BUS 
TYPE_VIRTIO_NET 
PCI Bus 
Object View 
VirtIONetPCI 
- VirtIOPCIProxy dev 
- PCIDevice pdev 
config[] – vednor, device id, 
- VirtioBusState bus 
- VirtIONet vdev 
TYPE_VIRTIO_NET_PCI 
TYPE_VIRTIO_BUS 
TYPE_VIRTIO_NET 
Class View
15 
© 2013 SAMSUNG Electronics Co. 
virtio-mmio transport 
• virtio-net example with QEMU backend – virtio-mmio 
• Discovery/Probing … like PCI 
• Primarily ARM – with Guest QEMU/Guest PCI support – virtio-mmio less use 
• Some Use cases 
 Want your own Machine Model – don’t want PCI, have Device Tree support 
 Lots of Embedded Devices – simplified machine model 
o Automotive, Edge Network, Set top Box 
 virtio-mmio another option
• Virtio-mmio – example similar to PCI 
TYPE_DEVICE ‘pvliurgtigoe-db udsy’ ncaremvaiitcreatdilol yb-DeviceState 
macmkeinod/virtio-mmiodevconfig12M.. TYPE_TYPE_MVMiIrMOti IoOAdO BUS 
Edpnreeursmast VirtioBusState 
VIRTIO_BUS 
aiRoraantnsiogne 16 
© 2013 SAMSUNG Electronics Co. 
Virtio MMIO Architecture 
Guest 
ISnPtRe rVruvirCptPtu, aUTliizmaetiro,n ISnPtRe rVruivrptCtu,P aTUliizmaetiro,n 
QEMU 
BACBKAECNKDEND FRONTEND 
TUN/TAP tvriartniosp-mormtio tvriartniosp-pocrit RAM Addresvdsir riRtvieoarn-ngeet 
_voirptiso_memVirmtIOaiMbnu_MssIyOsPteromxy_bus 1. Instantiate multiple virtio-mmio devices – no qemuRViinartgio rBugffesrsimplicitly done 
TYPE_SYS_BUS_DEVICE SysBusDevice 
TYPE_VIRTIO_MMIO VirtIOMMIOProxy 
…. 
VirtioBustState bus 
.init/.realizefn 
2. Associate resources with each virtio-mmio range 
• MMIO address range a page, interrupt # - only machine models what resources
Virtio MMIO Architecture 
VirtioBusState 
VirtIONet 
17 
Guest 
ISnPtRe rVruvirCptPtu, aUTliizmaetiro,n ISnPtRe rVruivrptCtu,P aTUliizmaetiro,n 
© 2013 SAMSUNG Electronics Co. 
QEMU 
BACBKAECNKDEND FRONTEND 
TUN/TAP tvriartniosp-mormtio tvriartniosp-pocrit RAM Addresvdsir riRtvieoarn-ngeet 
_voirptiso_memVirmtvIOairiMbntui_Moss-IyOnsPteertomxy_bus virtio-mmio/virtio-mmiodevconfig12M.. MVMiIrMOti IoOAdO Edpnreeursmast aiRoraantnsiogne RViinrtgio Buffers 
3. ‘-virtio-net-device’ – instantiates/plugs TYPE_VIRTIO_NET 
• No transport specified any backend (virtio-net, virtio-blk,…) plug into transport 
• Virtio-net inherits VirtIODevice which sets ‘bus_type = TYPE_VIRTIO_BUS’ 
• Finds matching bus VirtIOMMIOproxy-bus, plugs TYPE_VIRTIO_NET 
• Finds and binds to QEMU backend – f.e. –netdev type=tap …. 
TYPE_DEVICE 
TYPE_VIRTIO_DEVICE 
- bus_type = TYPE_VIRTIO_BUS 
TYPE_VIRTIO_NET 
TYPE_DEVICE DeviceState 
TYPE_SYS_BUS_DEVICE SysBusDevice 
TYPE_VIRTIO_MMIO VirtIOMMIOProxy 
…. 
VirtioBustState bus 
VirtIONet vdev 
.init/.realizefn 
TYPE_BUS 
TYPE_VIRTIO_BUS
Guest virtio discovery framework – virtio-mmio view 
• Transparent to Guest – enable virtio and mmio 
• Device Tree used 
18 
© 2013 SAMSUNG Electronics Co. 
QEMU 
- Machine Initialization 
- creates virtio-mmio transports 
plugs into system bus 
- specific machine model knows 
resources 
- modifes Guest FDT with mmio 
addr/size, Intr 
QEMU 
- Backend Initialization 
- ‘-virtio-xxx-device’ specified 
- device instanitated 
- searches for ‘virtio-bus’ class 
here virtio-mmio plugs in 
Guest 
- virtio-mmio driver probe 
- OF instantiates platform_device 
for ‘virtio-mmio’ 
- virtio-mmio – driver called probes 
transports 
- sanity checks virtio-mmio transport 
Guest 
- Discover Backend 
- check if transport plugged? 
- probe device – vendor, device id 
- register virtio device 
Guest 
- Virtio driver probe 
- probe device indirectly through 
virtio-mmio transport 
- create queues, program backend 
- present interface to kernel 
- more next slide ….
Guest virtio discovery framework – virtio-mmio view 
Machine Initialization 
TYPE_DEVICE DeviceState 
TYPE_SYS_BUS_DEVICE SysBusDevice 
TYPE_VIRTIO_MMIO VirtIOMMIOProxy 
of_platform_populate(…, of_device_id match[], …) 
DT Node 
virtio-mmio { 
addr, size, irq; 
} 
19 
platform_device { 
…. 
} 
© 2013 SAMSUNG Electronics Co. 
sysbus_create_simple(“virtio-mmio’, base, pic[irq]) 
…. 
…. …. 
VirtioBustState bus 
.init/.realizefn 
VirtioBusState 
TYPE_BUS 
TYPE_VIRTIO_BUS 
add_virtio_mmio_node(fdt, …, mmio addr, irq pin) 
Backend Initialization 
……. 
QEMU option … ‘-virtio-net-device’ 
device_init_func(opts, ….) 
VirtIONet 
TYPE_DEVICE 
TYPE_VIRTIO_DEVICE 
- bus_type = TYPE_VIRTIO_BUS 
TYPE_VIRTIO_NET 
virtio-mmio driver probe 
… virtio_mmio_driver = { 
.probe = virtio_mmio_probe, 
… 
} 
virtio_mmio_probe(*pdef) 
- virtio_mmio_vdev *vm_dev 
vm_dev-base = ioremap(virtio-mmio – GPA, size) 
virtio_device transport interface, PCI has one too 
vm_dev-vdev.config = virtio_mmio_config_ops 
sanity check – mmio to ‘virtio_mem_ops’ handlers 
magic = readl(vm_dev-base + VIRTIO_MMIO_MAGIC_VALUE) 
version = readl (…..)
Guest virtio discovery framework – virtio-mmio view 
20 
© 2013 SAMSUNG Electronics Co. 
Discover Backend 
Identify if device plugged, if yes identify device 
register the device 
) 
vm_register_dev-virtio_vdev.id.device(device= vendor= readl(structvirtio_readl(….) vm_dev-devicedev=base + vm_dev-VIRTIO_vdev 
MMIO_DEVICE_ID) Ack device found by transport, use transport interface 
-dev-config-set_status( … get_stattus() | VIRTIO_CONFIG_S_ACKNOWLEDGE) find matching driver on virtio bus 
-b-uvsi_rftoior__edaecvh_m_dartvc(…h(.d)ev, drv) Ack driver found for device 
Fe---a-Gdwtueieafrvtl ek s-b uNdapcrceopikvgnoeeofrdrittg e fif-aedeta aisstotueeuntrtr e_ ev–s sdtt aate–htbvuelb-esse( e… _f- efgaeacreatheutte_ urkscerteeksays ti uf=p sb e(d)ar cef| okvVer-ImnRdcTao InOsncu_fepiCg pOf-eoNargtFtsueI Gtr–_e_fbSse_eaD_tufRerIaeVtsEu(vRrde)sevb)it set --scabea))ll elb dcdartri cvi vkefeeerrna ftdpeu arrfoteeubsar ete–u s–rv endvsoie rntvt no-seut tcps_ouppnporfopritgboe-erdt( e)fb diny a bblyiaz cedk_rfeiveneadrt u ddroeosnn(’’vttd ggeeevtt- sseefelleeacctttueerddes[]) virtio driver probe 
instantiate network device interface 
d…e.v= alloc_etherdev_mq(…, # of queues) Various performance features – primarily offload, big packets 
-----CVhdITBneeeaiclvtclik- kab elsianczucoedpk n peq–fnoiugsdree-t uetGsedf Fsi GnN f–edP a_Aoatvf luql aorVsnec(rds…ain t)–GegdPfar Aonb mdyin gbdvuuedefxefseevts-r icnfoetuoan tDut refeosscr r –iepastceohtr sdq, euAvev-uaeihl awb_lefe, aUtsuereds ring.
21 
© 2013 SAMSUNG Electronics Co. 
Virtio Performance 
• When transport/backend are not ‘fused’ performance features not exported 
 Due to way QEMU instantiates objects – properties set at TYPE_DEVICE class 
 After device plugged – properties not set 
 If transport/backend not fused – properties/performance features not used 
 Created patch for virtio-mmio – applies when backend plugged 
o https://github.com/mjsmar/virtio_net_fix.git
22 
© 2013 SAMSUNG Electronics Co. 
Virtio Performance 
• Performance features 
 Red Hat multi-queue tap 
o tap arg – ‘queues=n’ for scalability 
o Creates multiple queue virtio/tap tx/rx queue pairs 
o vCPU scaling for tx/rx, serializes flows - TCP sessions, UDP connections 
 tx=timer,x-txtimer=nuS 
o Host kicks the backend periodically – limit exits 
o you can adjust how often backend polls tx virtqueue – tune latency vs. CPU 
 Offload – bigger pkts few exits, offload to host 
o Ring descriptors have – 1 for virtio_net_hdr other for data 
o probe tun/tap for vnet hdr support – for offloads - IFF_VNET_HDR 
o Probe tun/tap for GSO – TCP,UDP, - TSO, UFO 
o Options eventually make it to virtio-net net_device ‘features’ 
 virtio_net_hdr – flags for CSUM  define range 
 check skb fragments for for GSO – set vnet_hdr_net gso_type, size
Reconnaissance of Virtio: What’s new 
and how it’s all connected? 
© 2013 SAMSUNG Electronics Co. 
Q  A
Thank you. 
© 2013 SAMSUNG Electronics Co. 
Mario Smarduch 
Senior Virtualization Architect 
Open Source Group 
Samsung Research America (Silicon Valley) 
m.smarduch@samsung.com

More Related Content

What's hot

Dpdk applications
Dpdk applicationsDpdk applications
Dpdk applications
Vipin Varghese
 
VMworld 2013: ESXi Native Networking Driver Model - Delivering on Simplicity ...
VMworld 2013: ESXi Native Networking Driver Model - Delivering on Simplicity ...VMworld 2013: ESXi Native Networking Driver Model - Delivering on Simplicity ...
VMworld 2013: ESXi Native Networking Driver Model - Delivering on Simplicity ...
VMworld
 
Linux Performance Analysis and Tools
Linux Performance Analysis and ToolsLinux Performance Analysis and Tools
Linux Performance Analysis and Tools
Brendan Gregg
 
Introduction to Linux Kernel by Quontra Solutions
Introduction to Linux Kernel by Quontra SolutionsIntroduction to Linux Kernel by Quontra Solutions
Introduction to Linux Kernel by Quontra Solutions
QUONTRASOLUTIONS
 
Introduction to Modern U-Boot
Introduction to Modern U-BootIntroduction to Modern U-Boot
Introduction to Modern U-Boot
GlobalLogic Ukraine
 
Device Tree for Dummies (ELC 2014)
Device Tree for Dummies (ELC 2014)Device Tree for Dummies (ELC 2014)
Device Tree for Dummies (ELC 2014)
Thomas Petazzoni
 
High-Performance Networking Using eBPF, XDP, and io_uring
High-Performance Networking Using eBPF, XDP, and io_uringHigh-Performance Networking Using eBPF, XDP, and io_uring
High-Performance Networking Using eBPF, XDP, and io_uring
ScyllaDB
 
Kernel Recipes 2017: Using Linux perf at Netflix
Kernel Recipes 2017: Using Linux perf at NetflixKernel Recipes 2017: Using Linux perf at Netflix
Kernel Recipes 2017: Using Linux perf at Netflix
Brendan Gregg
 
Intel DPDK Step by Step instructions
Intel DPDK Step by Step instructionsIntel DPDK Step by Step instructions
Intel DPDK Step by Step instructions
Hisaki Ohara
 
[232] 성능어디까지쥐어짜봤니 송태웅
[232] 성능어디까지쥐어짜봤니 송태웅[232] 성능어디까지쥐어짜봤니 송태웅
[232] 성능어디까지쥐어짜봤니 송태웅
NAVER D2
 
U Boot or Universal Bootloader
U Boot or Universal BootloaderU Boot or Universal Bootloader
U Boot or Universal Bootloader
Satpal Parmar
 
Linux Initialization Process (2)
Linux Initialization Process (2)Linux Initialization Process (2)
Linux Initialization Process (2)
shimosawa
 
eBPF Basics
eBPF BasicseBPF Basics
eBPF Basics
Michael Kehoe
 
Understanding DPDK
Understanding DPDKUnderstanding DPDK
Understanding DPDK
Denys Haryachyy
 
Virtualization with KVM (Kernel-based Virtual Machine)
Virtualization with KVM (Kernel-based Virtual Machine)Virtualization with KVM (Kernel-based Virtual Machine)
Virtualization with KVM (Kernel-based Virtual Machine)
Novell
 
Linux Kernel - Virtual File System
Linux Kernel - Virtual File SystemLinux Kernel - Virtual File System
Linux Kernel - Virtual File System
Adrian Huang
 
Qemu Introduction
Qemu IntroductionQemu Introduction
Qemu Introduction
Chiawei Wang
 
The Linux Block Layer - Built for Fast Storage
The Linux Block Layer - Built for Fast StorageThe Linux Block Layer - Built for Fast Storage
The Linux Block Layer - Built for Fast Storage
Kernel TLV
 

What's hot (20)

Qemu
QemuQemu
Qemu
 
Dpdk applications
Dpdk applicationsDpdk applications
Dpdk applications
 
VMworld 2013: ESXi Native Networking Driver Model - Delivering on Simplicity ...
VMworld 2013: ESXi Native Networking Driver Model - Delivering on Simplicity ...VMworld 2013: ESXi Native Networking Driver Model - Delivering on Simplicity ...
VMworld 2013: ESXi Native Networking Driver Model - Delivering on Simplicity ...
 
Linux Performance Analysis and Tools
Linux Performance Analysis and ToolsLinux Performance Analysis and Tools
Linux Performance Analysis and Tools
 
Introduction to Linux Kernel by Quontra Solutions
Introduction to Linux Kernel by Quontra SolutionsIntroduction to Linux Kernel by Quontra Solutions
Introduction to Linux Kernel by Quontra Solutions
 
Introduction to Modern U-Boot
Introduction to Modern U-BootIntroduction to Modern U-Boot
Introduction to Modern U-Boot
 
Device Tree for Dummies (ELC 2014)
Device Tree for Dummies (ELC 2014)Device Tree for Dummies (ELC 2014)
Device Tree for Dummies (ELC 2014)
 
High-Performance Networking Using eBPF, XDP, and io_uring
High-Performance Networking Using eBPF, XDP, and io_uringHigh-Performance Networking Using eBPF, XDP, and io_uring
High-Performance Networking Using eBPF, XDP, and io_uring
 
Kernel Recipes 2017: Using Linux perf at Netflix
Kernel Recipes 2017: Using Linux perf at NetflixKernel Recipes 2017: Using Linux perf at Netflix
Kernel Recipes 2017: Using Linux perf at Netflix
 
Intel DPDK Step by Step instructions
Intel DPDK Step by Step instructionsIntel DPDK Step by Step instructions
Intel DPDK Step by Step instructions
 
[232] 성능어디까지쥐어짜봤니 송태웅
[232] 성능어디까지쥐어짜봤니 송태웅[232] 성능어디까지쥐어짜봤니 송태웅
[232] 성능어디까지쥐어짜봤니 송태웅
 
U Boot or Universal Bootloader
U Boot or Universal BootloaderU Boot or Universal Bootloader
U Boot or Universal Bootloader
 
Linux Initialization Process (2)
Linux Initialization Process (2)Linux Initialization Process (2)
Linux Initialization Process (2)
 
eBPF Basics
eBPF BasicseBPF Basics
eBPF Basics
 
Understanding DPDK
Understanding DPDKUnderstanding DPDK
Understanding DPDK
 
Character Drivers
Character DriversCharacter Drivers
Character Drivers
 
Virtualization with KVM (Kernel-based Virtual Machine)
Virtualization with KVM (Kernel-based Virtual Machine)Virtualization with KVM (Kernel-based Virtual Machine)
Virtualization with KVM (Kernel-based Virtual Machine)
 
Linux Kernel - Virtual File System
Linux Kernel - Virtual File SystemLinux Kernel - Virtual File System
Linux Kernel - Virtual File System
 
Qemu Introduction
Qemu IntroductionQemu Introduction
Qemu Introduction
 
The Linux Block Layer - Built for Fast Storage
The Linux Block Layer - Built for Fast StorageThe Linux Block Layer - Built for Fast Storage
The Linux Block Layer - Built for Fast Storage
 

Similar to Reconnaissance of Virtio: What’s new and how it’s all connected?

DPDK Summit 2015 - RIFT.io - Tim Mortsolf
DPDK Summit 2015 - RIFT.io - Tim MortsolfDPDK Summit 2015 - RIFT.io - Tim Mortsolf
DPDK Summit 2015 - RIFT.io - Tim Mortsolf
Jim St. Leger
 
State of the Union: Open Source Network Function Virtualization
State of the Union: Open Source Network Function VirtualizationState of the Union: Open Source Network Function Virtualization
State of the Union: Open Source Network Function Virtualization
Samsung Open Source Group
 
Android Things Linux Day 2017
Android Things Linux Day 2017 Android Things Linux Day 2017
Android Things Linux Day 2017
Stefano Sanna
 
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
 
Reverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande ModemReverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande Modem
Cyber Security Alliance
 
Vpu technology &gpgpu computing
Vpu technology &gpgpu computingVpu technology &gpgpu computing
Vpu technology &gpgpu computingArka Ghosh
 
Osol Pgsql
Osol PgsqlOsol Pgsql
Osol Pgsql
Emanuel Calvo
 
Ganglia Monitoring Tool
Ganglia Monitoring ToolGanglia Monitoring Tool
Ganglia Monitoring Tool
sudhirpg
 
Achieving the Ultimate Performance with KVM
Achieving the Ultimate Performance with KVMAchieving the Ultimate Performance with KVM
Achieving the Ultimate Performance with KVM
data://disrupted®
 
Achieving the Ultimate Performance with KVM
Achieving the Ultimate Performance with KVMAchieving the Ultimate Performance with KVM
Achieving the Ultimate Performance with KVM
DevOps.com
 
Vpu technology &gpgpu computing
Vpu technology &gpgpu computingVpu technology &gpgpu computing
Vpu technology &gpgpu computingArka Ghosh
 
Vpu technology &gpgpu computing
Vpu technology &gpgpu computingVpu technology &gpgpu computing
Vpu technology &gpgpu computingArka Ghosh
 
Vpu technology &gpgpu computing
Vpu technology &gpgpu computingVpu technology &gpgpu computing
Vpu technology &gpgpu computingArka Ghosh
 
Skydive, real-time network analyzer, container integration
Skydive, real-time network analyzer, container integrationSkydive, real-time network analyzer, container integration
Skydive, real-time network analyzer, container integration
Sylvain Afchain
 
Debugging Ruby
Debugging RubyDebugging Ruby
Debugging Ruby
Aman Gupta
 
Labs_BT_20221017.pptx
Labs_BT_20221017.pptxLabs_BT_20221017.pptx
Labs_BT_20221017.pptx
ssuserb4d806
 
Containers with systemd-nspawn
Containers with systemd-nspawnContainers with systemd-nspawn
Containers with systemd-nspawn
Gábor Nyers
 
SiteGround Tech TeamBuilding
SiteGround Tech TeamBuildingSiteGround Tech TeamBuilding
SiteGround Tech TeamBuilding
Marian Marinov
 
20171206 PGconf.ASIA LT gstore_fdw
20171206 PGconf.ASIA LT gstore_fdw20171206 PGconf.ASIA LT gstore_fdw
20171206 PGconf.ASIA LT gstore_fdw
Kohei KaiGai
 
SCADA Strangelove: Hacking in the Name
SCADA Strangelove: Hacking in the NameSCADA Strangelove: Hacking in the Name
SCADA Strangelove: Hacking in the NamePositive Hack Days
 

Similar to Reconnaissance of Virtio: What’s new and how it’s all connected? (20)

DPDK Summit 2015 - RIFT.io - Tim Mortsolf
DPDK Summit 2015 - RIFT.io - Tim MortsolfDPDK Summit 2015 - RIFT.io - Tim Mortsolf
DPDK Summit 2015 - RIFT.io - Tim Mortsolf
 
State of the Union: Open Source Network Function Virtualization
State of the Union: Open Source Network Function VirtualizationState of the Union: Open Source Network Function Virtualization
State of the Union: Open Source Network Function Virtualization
 
Android Things Linux Day 2017
Android Things Linux Day 2017 Android Things Linux Day 2017
Android Things Linux Day 2017
 
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
 
Reverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande ModemReverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande Modem
 
Vpu technology &gpgpu computing
Vpu technology &gpgpu computingVpu technology &gpgpu computing
Vpu technology &gpgpu computing
 
Osol Pgsql
Osol PgsqlOsol Pgsql
Osol Pgsql
 
Ganglia Monitoring Tool
Ganglia Monitoring ToolGanglia Monitoring Tool
Ganglia Monitoring Tool
 
Achieving the Ultimate Performance with KVM
Achieving the Ultimate Performance with KVMAchieving the Ultimate Performance with KVM
Achieving the Ultimate Performance with KVM
 
Achieving the Ultimate Performance with KVM
Achieving the Ultimate Performance with KVMAchieving the Ultimate Performance with KVM
Achieving the Ultimate Performance with KVM
 
Vpu technology &gpgpu computing
Vpu technology &gpgpu computingVpu technology &gpgpu computing
Vpu technology &gpgpu computing
 
Vpu technology &gpgpu computing
Vpu technology &gpgpu computingVpu technology &gpgpu computing
Vpu technology &gpgpu computing
 
Vpu technology &gpgpu computing
Vpu technology &gpgpu computingVpu technology &gpgpu computing
Vpu technology &gpgpu computing
 
Skydive, real-time network analyzer, container integration
Skydive, real-time network analyzer, container integrationSkydive, real-time network analyzer, container integration
Skydive, real-time network analyzer, container integration
 
Debugging Ruby
Debugging RubyDebugging Ruby
Debugging Ruby
 
Labs_BT_20221017.pptx
Labs_BT_20221017.pptxLabs_BT_20221017.pptx
Labs_BT_20221017.pptx
 
Containers with systemd-nspawn
Containers with systemd-nspawnContainers with systemd-nspawn
Containers with systemd-nspawn
 
SiteGround Tech TeamBuilding
SiteGround Tech TeamBuildingSiteGround Tech TeamBuilding
SiteGround Tech TeamBuilding
 
20171206 PGconf.ASIA LT gstore_fdw
20171206 PGconf.ASIA LT gstore_fdw20171206 PGconf.ASIA LT gstore_fdw
20171206 PGconf.ASIA LT gstore_fdw
 
SCADA Strangelove: Hacking in the Name
SCADA Strangelove: Hacking in the NameSCADA Strangelove: Hacking in the Name
SCADA Strangelove: Hacking in the Name
 

More from Samsung Open Source Group

The Complex IoT Equation (and FLOSS solutions)
The Complex IoT Equation (and FLOSS solutions)The Complex IoT Equation (and FLOSS solutions)
The Complex IoT Equation (and FLOSS solutions)
Samsung Open Source Group
 
Easy IoT with JavaScript
Easy IoT with JavaScriptEasy IoT with JavaScript
Easy IoT with JavaScript
Samsung Open Source Group
 
Spawny: A New Approach to Logins
Spawny: A New Approach to LoginsSpawny: A New Approach to Logins
Spawny: A New Approach to Logins
Samsung Open Source Group
 
Rapid SPi Device Driver Development over USB
Rapid SPi Device Driver Development over USBRapid SPi Device Driver Development over USB
Rapid SPi Device Driver Development over USB
Samsung Open Source Group
 
Tizen RT: A Lightweight RTOS Platform for Low-End IoT Devices
Tizen RT: A Lightweight RTOS Platform for Low-End IoT DevicesTizen RT: A Lightweight RTOS Platform for Low-End IoT Devices
Tizen RT: A Lightweight RTOS Platform for Low-End IoT Devices
Samsung Open Source Group
 
IoTivity: Smart Home to Automotive and Beyond
IoTivity: Smart Home to Automotive and BeyondIoTivity: Smart Home to Automotive and Beyond
IoTivity: Smart Home to Automotive and Beyond
Samsung Open Source Group
 
IoTivity for Automotive: meta-ocf-automotive tutorial
IoTivity for Automotive: meta-ocf-automotive tutorialIoTivity for Automotive: meta-ocf-automotive tutorial
IoTivity for Automotive: meta-ocf-automotive tutorial
Samsung Open Source Group
 
GENIVI + OCF Cooperation
GENIVI + OCF CooperationGENIVI + OCF Cooperation
GENIVI + OCF Cooperation
Samsung Open Source Group
 
Framework for IoT Interoperability
Framework for IoT InteroperabilityFramework for IoT Interoperability
Framework for IoT Interoperability
Samsung Open Source Group
 
Open Source Metrics to Inform Corporate Strategy
Open Source Metrics to Inform Corporate StrategyOpen Source Metrics to Inform Corporate Strategy
Open Source Metrics to Inform Corporate Strategy
Samsung Open Source Group
 
IoTivity for Automotive IoT Interoperability
IoTivity for Automotive IoT InteroperabilityIoTivity for Automotive IoT Interoperability
IoTivity for Automotive IoT Interoperability
Samsung Open Source Group
 
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Thin...
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Thin...JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Thin...
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Thin...
Samsung Open Source Group
 
Adding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux Device
Adding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux DeviceAdding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux Device
Adding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux Device
Samsung Open Source Group
 
IoTivity: From Devices to the Cloud
IoTivity: From Devices to the CloudIoTivity: From Devices to the Cloud
IoTivity: From Devices to the Cloud
Samsung Open Source Group
 
SOSCON 2016 JerryScript
SOSCON 2016 JerryScriptSOSCON 2016 JerryScript
SOSCON 2016 JerryScript
Samsung Open Source Group
 
IoT: From Arduino Microcontrollers to Tizen Products using IoTivity
IoT: From Arduino Microcontrollers to Tizen Products using IoTivityIoT: From Arduino Microcontrollers to Tizen Products using IoTivity
IoT: From Arduino Microcontrollers to Tizen Products using IoTivity
Samsung Open Source Group
 
Run Your Own 6LoWPAN Based IoT Network
Run Your Own 6LoWPAN Based IoT NetworkRun Your Own 6LoWPAN Based IoT Network
Run Your Own 6LoWPAN Based IoT Network
Samsung Open Source Group
 
Practical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under Linux
Practical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under LinuxPractical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under Linux
Practical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under Linux
Samsung Open Source Group
 
IoTivity Tutorial: Prototyping IoT Devices on GNU/Linux
IoTivity Tutorial: Prototyping IoT Devices on GNU/LinuxIoTivity Tutorial: Prototyping IoT Devices on GNU/Linux
IoTivity Tutorial: Prototyping IoT Devices on GNU/Linux
Samsung Open Source Group
 
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Things
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of ThingsJerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Things
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Things
Samsung Open Source Group
 

More from Samsung Open Source Group (20)

The Complex IoT Equation (and FLOSS solutions)
The Complex IoT Equation (and FLOSS solutions)The Complex IoT Equation (and FLOSS solutions)
The Complex IoT Equation (and FLOSS solutions)
 
Easy IoT with JavaScript
Easy IoT with JavaScriptEasy IoT with JavaScript
Easy IoT with JavaScript
 
Spawny: A New Approach to Logins
Spawny: A New Approach to LoginsSpawny: A New Approach to Logins
Spawny: A New Approach to Logins
 
Rapid SPi Device Driver Development over USB
Rapid SPi Device Driver Development over USBRapid SPi Device Driver Development over USB
Rapid SPi Device Driver Development over USB
 
Tizen RT: A Lightweight RTOS Platform for Low-End IoT Devices
Tizen RT: A Lightweight RTOS Platform for Low-End IoT DevicesTizen RT: A Lightweight RTOS Platform for Low-End IoT Devices
Tizen RT: A Lightweight RTOS Platform for Low-End IoT Devices
 
IoTivity: Smart Home to Automotive and Beyond
IoTivity: Smart Home to Automotive and BeyondIoTivity: Smart Home to Automotive and Beyond
IoTivity: Smart Home to Automotive and Beyond
 
IoTivity for Automotive: meta-ocf-automotive tutorial
IoTivity for Automotive: meta-ocf-automotive tutorialIoTivity for Automotive: meta-ocf-automotive tutorial
IoTivity for Automotive: meta-ocf-automotive tutorial
 
GENIVI + OCF Cooperation
GENIVI + OCF CooperationGENIVI + OCF Cooperation
GENIVI + OCF Cooperation
 
Framework for IoT Interoperability
Framework for IoT InteroperabilityFramework for IoT Interoperability
Framework for IoT Interoperability
 
Open Source Metrics to Inform Corporate Strategy
Open Source Metrics to Inform Corporate StrategyOpen Source Metrics to Inform Corporate Strategy
Open Source Metrics to Inform Corporate Strategy
 
IoTivity for Automotive IoT Interoperability
IoTivity for Automotive IoT InteroperabilityIoTivity for Automotive IoT Interoperability
IoTivity for Automotive IoT Interoperability
 
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Thin...
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Thin...JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Thin...
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Thin...
 
Adding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux Device
Adding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux DeviceAdding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux Device
Adding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux Device
 
IoTivity: From Devices to the Cloud
IoTivity: From Devices to the CloudIoTivity: From Devices to the Cloud
IoTivity: From Devices to the Cloud
 
SOSCON 2016 JerryScript
SOSCON 2016 JerryScriptSOSCON 2016 JerryScript
SOSCON 2016 JerryScript
 
IoT: From Arduino Microcontrollers to Tizen Products using IoTivity
IoT: From Arduino Microcontrollers to Tizen Products using IoTivityIoT: From Arduino Microcontrollers to Tizen Products using IoTivity
IoT: From Arduino Microcontrollers to Tizen Products using IoTivity
 
Run Your Own 6LoWPAN Based IoT Network
Run Your Own 6LoWPAN Based IoT NetworkRun Your Own 6LoWPAN Based IoT Network
Run Your Own 6LoWPAN Based IoT Network
 
Practical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under Linux
Practical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under LinuxPractical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under Linux
Practical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under Linux
 
IoTivity Tutorial: Prototyping IoT Devices on GNU/Linux
IoTivity Tutorial: Prototyping IoT Devices on GNU/LinuxIoTivity Tutorial: Prototyping IoT Devices on GNU/Linux
IoTivity Tutorial: Prototyping IoT Devices on GNU/Linux
 
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Things
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of ThingsJerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Things
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Things
 

Recently uploaded

When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 

Recently uploaded (20)

When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 

Reconnaissance of Virtio: What’s new and how it’s all connected?

  • 1. Reconnaissance of Virtio: What’s new and how it’s all connected? © 2013 SAMSUNG Electronics Co. Mario Smarduch Senior Virtualization Architect Open Source Group Samsung Research America (Silicon Valley) m.smarduch@samsung.comSmarduch Senior Virtualization Architect Open Source Group Samsung Research America (Silicon Valley) m.smarduch@samsung.com
  • 2. 2 © 2013 SAMSUNG Electronics Co. Agenda QEMU/Guest Machine Model IO Overview Concepts - transport/backend – recent re-factoring PCI transport and most recent virtio-mmio transport Virtio and Device Passthrough, virtio performance
  • 3. LTTPMeawaevbgomele elosry BACKEND FRONTEND WDT IDE/SCSI ………. BACKEND KVM mmio-TRANSPORT 3 © 2013 SAMSUNG Electronics Co. Machine Model Host QEMU Guest ISnPtRe rVruvirCptPtu, aUTliizmaetiro,n ISnPtRe rVruivrptCtu,P aTUliizmaetiro,n CONSOLENIC Drivers -FRONTEND TTAUPN/ LSITBDCIO ECmOuNlSaOtioLnE ENmICulation • Like host, unmodified guest expects real hardware • Machine model – combination of hw extensions, KVM, QEMU, GUest Interrupt Local and Distributor – hw virt extensions + kvm Special Purpose Register – i.e. enable/disable MMU, discover CPU features – hw virt ext + kvm Timer – hw virt extensions + kvm Memory – hw virt + kvm Drivers/Devices – (i) mmio (ii) para-virtualized (iii) dev passthrough Machine Model - defines hw – CPU, Peripherals, HW address map • Some Terms Transport – way Guest to (i) probe, discover backend – resources; (ii) configure backend Frontend – guest driver Backend – whole QEMU I/O emulation + host device
  • 4. LTTPMeawaevbgomele elosry BACKEND FRONTEND WDT IDE/SCSI ………. BACKEND 4 © 2013 SAMSUNG Electronics Co. MMIO Example QEMU Guest ISnPtRe rVruvirCptPtu, aUTliizmaetiro,n ISnPtRe rVruivrptCtu,P aTUliizmaetiro,n CONSOLENIC Drivers -FRONTEND TTAUPN/ LSITBDCIO ECmOuNlSaOtioLnE ENmICulation Host KVM mmio-TRANSPORT • Typing a charter – ‘-nographic’ Keyboard stroke – QEMU backend (IO thread) reads from stdio Finds Qemu Frontend – console emulation device passes character Console device injects interrupt via KVM, guest exit/resume Console interrupt handler – mmio read of device buffer o guest exits, decodes regs to packages addr/data size o Returns from vCPU KVM_RUN loop to QEMU o QEMU finds console device handler from addr (GPA) o Console handler returns data at address o Return to KVM, data placed in dest register o Resume guest • MMIO a lot of overhead!
  • 5. 5 © 2013 SAMSUNG Electronics Co. Vision and Practice • QEMU/Guest - Vision Portability any backend plugs into any transport – no clue about transport o Typically one transport configured o ‘- virtio_xxx_device’ option – no hint of transport – plug into first available one Guest virtio driver unaware of transport o All transports can probe, discover backend o Indirect transport interface – i.e. virtio-net does not know what transport Example QEMU Guest PCI transport virtio-vmirtmio-ionett-ransport vdiertviioc-enet- device EnumeErantuemerate virtiov-pirctiio-mmPrioobe vdirritvioer-net
  • 6. 6 © 2013 SAMSUNG Electronics Co. Vision and Practice • In Practice – PCI preferred transport Transport/backends ‘fused’ Backend plugged into PCI Prior knowledge of machine model required o Command line – specify transport o No Portability QEMU PCvdI ierttvriioac-nensept-ort virtio-net-pci Guest virtiov-pirctiio-mmPrioobe vdirritvioer-net
  • 7. 7 © 2013 SAMSUNG Electronics Co. Virtio – moving data • virtio – ring buffers accessed from several contexts • Must deal with different addresses when moving data to/from virtio device QEMU TTAUBPNA/CKENLSITBDDCIOBACKENCODNFRONNTIECND GMueemsto ry • Between Guest QEMU – QEMU view • Host mmap() address – QEMU VA – HVA • To get HVA from GPA Find memory region section Offset = GPA – MemoryRegion base Add HVA base in RAMBlock add offset • To get GPA from HVA From RAMBlock find MemoryRegion Offset = HVA address – HVA base Add to MemoryRegion base address
  • 8. 8 © 2013 SAMSUNG Electronics Co. Virtio – moving data GMueemsto ry • Between Guest QEMU or host – Guest view Guest knows nothing abut HVA Current hw supports two level page tables 2nd level page table maps GPA HPA
  • 9. VVVrrriiinnngggDDDeeesssccc===TTTxxxGGGPPPAAA++ VVVrrriiinnngggDDDeeesssccc===GGGPPPAAA++…… TTTxxxGGGPPPAAA++DDeesscc+ Avail Rx....GPA GUEST • Performance achieved through direct memory access (see Rusty Russels spec) 9 © 2013 SAMSUNG Electronics Co. Virtio – moving data IO Thread Virtqueue Virtqueue fTNdoe/tsfwerlooemrckt QEMU GUEST TxQueue VraindgdrDesRcx Queue VVrrffv…iillrnnaa.i.ggngggss__,,au_ vuiisnnaesddideGleedPxx_,Ae rl;e inlmegn[[,]] …ring VraindgdrDesc VVrrffv…iillrnnaa.i.ggngggss__,,au_ vuiisnnaesddideGleedPxx_,Ae rl;e inlmegn[[,]] …ring 1 - virtio_net_hdr (skb-cb[]) 2 – skb-data[] Scatterlist 1 – page_link = page – of virtio_net_hdr offset = offset within page length = sizeof virtio_net_hdr 2 – page_link = page – of skb-data offset = … length = skb-len Simple pkt – no fragments Vring descriptor 1 – GPA addr of virtio_net_Hdr length 2 – GPA addr of skb-data length NOTIFY
  • 10. VVVrrriiinnngggDDDeeesssccc===TTTxxxGGGPPPAAA++ VVVrrriiinnngggDDDeeesssccc===GGGPPPAAA++…… TTTxxxGGGPPPAAA++DDeesscc+ Avail Rx....GPA QEMU 10 © 2013 SAMSUNG Electronics Co. IO Thread Virtqueue Virtqueue fTNdoe/tsfwerlooemrckt QEMU GUEST TxQueue VraindgdrDesRcx Queue VVrrffv…iillrnnaa.i.ggngggss__,,au_ vuiisnnaesddideGleedPxx_,Ae rl;e inlmegn[[,]] …ring VraindgdrDesc VVrrffv…iillrnnaa.i.ggngggss__,,au_ vuiisnnaesddideGleedPxx_,Ae rl;e inlmegn[[,]] …ring VirtQueueElement 1. out_addr = GPA virtio_net_hdr out_sg.iov_len = virtio_net_hdr length 2. out_addr = GPA skb-data out_sg.iov_len = skb-len VirtQueueElement 1. out_sg.iov_base = HVA virtio_net_hdr out_sg.iov_len = virtio_net_hdr length 2. out_sg.iov_base= HVA skb-data out_sg.iov_len = skb-len qemu_sendv_packet_async (…, out_sg, out_len, … virtio_net_tx_coplete) Virtio – moving data
  • 11. 11 © 2013 SAMSUNG Electronics Co. Virtio – moving data Guest – convert GVA - HPA Host GPA - HVA, HVA - GPA Tx-GPA 1v0r[__0i__2_vrisn-_n6u_]_4.g_un41 u*_1 e6 tgr__uu__1aa6x vdv6ft c1uut6s3e ra rl=daiifning1rlla;ggs, g_;_[[ _v2fdrl iaindgg;s s1d1_u;0_] e._;_ 3_u__su_u2ns_21c4eu 6]xl1 e n eu3d12_6 el t6n=e;2i dx, tx…; eliednmx;;ring[] Tx-GPA+0x4000 TX-Vring Tx-GPA+0x5000 VRing vring; { unsinged int num=… hwaddr desc = Desc Tx-GPA hwaddr avail = Desc Tx-GPA + ofst hwaddr used = Tx-GPA + ofst } /* VRing */ Guest Vring Operations xmssggi---…t___ss…sssseegggktt---b__(bb…lopuuefa)ffgf((gsnsseecctt_aah ltt=ittn…ee kprrlla=iissgtt ep** assogggfe,,f s……et,, svkirbti-o_dnaetta_h)dr) vvvv…qqqq-.----mvvnvmrrroiiiinnntoigggfyw...ddd(vreeeiqtssse)ccc [[[–iii]]]...aafVlddaIRgddTsrr IO=== _ sG…xgxPx-A_Q leoUnfE gpUtahEg_NeOTIFY Host Vring Operations virvtiioihrt_w=qn uaevG-deti_rudhtVferqlwu_uAdaspehedo us_d-ptecrx(__q(ppg…- aaeG. )tt==_xVh _vevvAqaqqd-- , (Bvvvqearri,l nisenvgmeqg.a- .)dv+aelai slsc(t+p;_ aaovfa f–isle_itnGodfP(eVxAR+i)+ng)Avail, ring[i]) Chflawogpraensa-dt vud==rerre ntvddurr eelirtndsns cguc t_l__wdopdpu_a eapwGs+=hc_ _Vy psfvsihlAqza(ypeg-soas(()fvpd(rVaeinR)sgcin_.dgpeDas,e cis)c) * i+ offsetof(VringDesc, flags) eeCll…eeomm..n--vooeuurttt__ saGgd[d…Pr[]Ae.iole v–m_l-eno=vu rtv_irnninugmg__]d d=ees vcs_rcilen-ng(_ddaeesdscc_d_parad, tdi)or(d GesVc_Apa, i) Convert GPA – vring_desc-addr to GVA --…e.TNl.exomoti-fuyt ogBuuatec_ksstge n[–…dT].xioivn_tbearrsuep=t ccopmu_pplehtyiosnical_memory_map(elem-out_addr[…], …)
  • 12. Virtio and Device Pass-through 12 © 2013 SAMSUNG Electronics Co. Basic Operation - Backend/Guest direct access to shared Vring buffers - PIO - Switching at software level - Management Flexibility – internal SDN support ovs-vsctladd-port br0 ofctl–control flowsphys-intfc -vSwitch - IRQ bottleneck – inject Kernel –injectQ dEiMrecUt l–ycall into kvm - Direct access to hw memory regions - DMA Support - Switching at hw level – SR-IOV depends on #of Queues - Management Flexibility – external SDN capable - IRQ bottleneck – hw enhancements, posted interrupts, exitless EOI improve things – closer to native Migration - Virtio lockless - Saves device state, tracks dirty pages - QEMU sets ‘unmigratable’, or installs migration blocker - Guest can be holding a lock – deadlock, hw state, …. Scalability - Practical limitations – primarily per formance - Number of Devices limited, limits #VMs - SR-IOV - #of VF - # of queues Network Performance - Soft switching – bridge, vSwitch - Several IO HOPS - Can approach near native – 10Ge for few bridged Guest - Switching done at HW level – hw queues - Performance scales with # of Guests - DMA support - IRQ Passthrough still a problem Host Performance - PIO – takes cpu cycles - Exits – few but still - Guest pages swapable - Guest pinned – can’t swap - Fewer exits - Less PIO Cloud Environment - Cloud friendly – migration, SDN, paging - Not Cloud friendly, great for NFV/RT DPDK, run to completion
  • 13. 13 © 2013 SAMSUNG Electronics Co. Virtio PCI Architecture • virtio-net example with QEMU backend – virtio-pci Guest ISnPtRe rVruvirCptPtu, aUTliizmaetiro,n ISnPtRe rVruivrptCtu,P aTUliizmaetiro,n QEMU BACBKAECNKDEND FRONTEND TUN/TAP tvriar12Mtn..i osMPVp-CpioIrOcIrt iti oEAndOudmptvrreieaarrtnsraiasost pt-iRiomooanrnmtnsgioe RAM Addresvdsir riRtvieoarn-ngeet cvoirntifoig_p_ocip_s --VirvreetvdvIOisniiroPobtPrnCui_C,oiI sdPcI-,l randoBseesxuvyt_sid RViinrtgio Buffers • Virtio device – combination of mmio paravirt device PCI Config • Before Guest Runs …. QEMU does creates proxy that plugs into PCI Bus During instantiation of VirtIOPCIProxy its o PCIDevice vendor id, device id, class, … are set Instantiates virtio-net – bus_type = TYPE_VIRTIO_BUS o Plugs into VirtIOPCIProxy bus – TYPE_VIRTIO_BUS o Fills in PCI BAR0 type PIO o Associates virtio_pci_config_ops with B/D/F BAR0 • Guest Enumarates PCI Bus – discovers virtio-net – via mmio Loads virtio-pci, creates virtio-net device virtio-net driver loads probes virtio-net backend – via mmio
  • 14. QEMU Object Model • QEMU Class, Object view of ‘–device virtio-net-pci’ First instantiate Class – C++ Class definition Next the Object – C++ Declare Class variable Realize it– C++ constructor default or defined 14 VirtioBusState © 2013 SAMSUNG Electronics Co. TYPE_DEVICE TYPE_PCI_DEVICE TYPE_VIRTIO_PCI .init/realizefn TYPE_VIRTIO_NET_PCI .instance_init TYPE_BUS TYPE_VIRTIO_BUS VirtIONet TYPE_DEVICE TYPE_VIRTIO_DEVICE - bus_type = TYPE_VIRTIO_BUS TYPE_VIRTIO_NET PCI Bus Object View VirtIONetPCI - VirtIOPCIProxy dev - PCIDevice pdev config[] – vednor, device id, - VirtioBusState bus - VirtIONet vdev TYPE_VIRTIO_NET_PCI TYPE_VIRTIO_BUS TYPE_VIRTIO_NET Class View
  • 15. 15 © 2013 SAMSUNG Electronics Co. virtio-mmio transport • virtio-net example with QEMU backend – virtio-mmio • Discovery/Probing … like PCI • Primarily ARM – with Guest QEMU/Guest PCI support – virtio-mmio less use • Some Use cases Want your own Machine Model – don’t want PCI, have Device Tree support Lots of Embedded Devices – simplified machine model o Automotive, Edge Network, Set top Box virtio-mmio another option
  • 16. • Virtio-mmio – example similar to PCI TYPE_DEVICE ‘pvliurgtigoe-db udsy’ ncaremvaiitcreatdilol yb-DeviceState macmkeinod/virtio-mmiodevconfig12M.. TYPE_TYPE_MVMiIrMOti IoOAdO BUS Edpnreeursmast VirtioBusState VIRTIO_BUS aiRoraantnsiogne 16 © 2013 SAMSUNG Electronics Co. Virtio MMIO Architecture Guest ISnPtRe rVruvirCptPtu, aUTliizmaetiro,n ISnPtRe rVruivrptCtu,P aTUliizmaetiro,n QEMU BACBKAECNKDEND FRONTEND TUN/TAP tvriartniosp-mormtio tvriartniosp-pocrit RAM Addresvdsir riRtvieoarn-ngeet _voirptiso_memVirmtIOaiMbnu_MssIyOsPteromxy_bus 1. Instantiate multiple virtio-mmio devices – no qemuRViinartgio rBugffesrsimplicitly done TYPE_SYS_BUS_DEVICE SysBusDevice TYPE_VIRTIO_MMIO VirtIOMMIOProxy …. VirtioBustState bus .init/.realizefn 2. Associate resources with each virtio-mmio range • MMIO address range a page, interrupt # - only machine models what resources
  • 17. Virtio MMIO Architecture VirtioBusState VirtIONet 17 Guest ISnPtRe rVruvirCptPtu, aUTliizmaetiro,n ISnPtRe rVruivrptCtu,P aTUliizmaetiro,n © 2013 SAMSUNG Electronics Co. QEMU BACBKAECNKDEND FRONTEND TUN/TAP tvriartniosp-mormtio tvriartniosp-pocrit RAM Addresvdsir riRtvieoarn-ngeet _voirptiso_memVirmtvIOairiMbntui_Moss-IyOnsPteertomxy_bus virtio-mmio/virtio-mmiodevconfig12M.. MVMiIrMOti IoOAdO Edpnreeursmast aiRoraantnsiogne RViinrtgio Buffers 3. ‘-virtio-net-device’ – instantiates/plugs TYPE_VIRTIO_NET • No transport specified any backend (virtio-net, virtio-blk,…) plug into transport • Virtio-net inherits VirtIODevice which sets ‘bus_type = TYPE_VIRTIO_BUS’ • Finds matching bus VirtIOMMIOproxy-bus, plugs TYPE_VIRTIO_NET • Finds and binds to QEMU backend – f.e. –netdev type=tap …. TYPE_DEVICE TYPE_VIRTIO_DEVICE - bus_type = TYPE_VIRTIO_BUS TYPE_VIRTIO_NET TYPE_DEVICE DeviceState TYPE_SYS_BUS_DEVICE SysBusDevice TYPE_VIRTIO_MMIO VirtIOMMIOProxy …. VirtioBustState bus VirtIONet vdev .init/.realizefn TYPE_BUS TYPE_VIRTIO_BUS
  • 18. Guest virtio discovery framework – virtio-mmio view • Transparent to Guest – enable virtio and mmio • Device Tree used 18 © 2013 SAMSUNG Electronics Co. QEMU - Machine Initialization - creates virtio-mmio transports plugs into system bus - specific machine model knows resources - modifes Guest FDT with mmio addr/size, Intr QEMU - Backend Initialization - ‘-virtio-xxx-device’ specified - device instanitated - searches for ‘virtio-bus’ class here virtio-mmio plugs in Guest - virtio-mmio driver probe - OF instantiates platform_device for ‘virtio-mmio’ - virtio-mmio – driver called probes transports - sanity checks virtio-mmio transport Guest - Discover Backend - check if transport plugged? - probe device – vendor, device id - register virtio device Guest - Virtio driver probe - probe device indirectly through virtio-mmio transport - create queues, program backend - present interface to kernel - more next slide ….
  • 19. Guest virtio discovery framework – virtio-mmio view Machine Initialization TYPE_DEVICE DeviceState TYPE_SYS_BUS_DEVICE SysBusDevice TYPE_VIRTIO_MMIO VirtIOMMIOProxy of_platform_populate(…, of_device_id match[], …) DT Node virtio-mmio { addr, size, irq; } 19 platform_device { …. } © 2013 SAMSUNG Electronics Co. sysbus_create_simple(“virtio-mmio’, base, pic[irq]) …. …. …. VirtioBustState bus .init/.realizefn VirtioBusState TYPE_BUS TYPE_VIRTIO_BUS add_virtio_mmio_node(fdt, …, mmio addr, irq pin) Backend Initialization ……. QEMU option … ‘-virtio-net-device’ device_init_func(opts, ….) VirtIONet TYPE_DEVICE TYPE_VIRTIO_DEVICE - bus_type = TYPE_VIRTIO_BUS TYPE_VIRTIO_NET virtio-mmio driver probe … virtio_mmio_driver = { .probe = virtio_mmio_probe, … } virtio_mmio_probe(*pdef) - virtio_mmio_vdev *vm_dev vm_dev-base = ioremap(virtio-mmio – GPA, size) virtio_device transport interface, PCI has one too vm_dev-vdev.config = virtio_mmio_config_ops sanity check – mmio to ‘virtio_mem_ops’ handlers magic = readl(vm_dev-base + VIRTIO_MMIO_MAGIC_VALUE) version = readl (…..)
  • 20. Guest virtio discovery framework – virtio-mmio view 20 © 2013 SAMSUNG Electronics Co. Discover Backend Identify if device plugged, if yes identify device register the device ) vm_register_dev-virtio_vdev.id.device(device= vendor= readl(structvirtio_readl(….) vm_dev-devicedev=base + vm_dev-VIRTIO_vdev MMIO_DEVICE_ID) Ack device found by transport, use transport interface -dev-config-set_status( … get_stattus() | VIRTIO_CONFIG_S_ACKNOWLEDGE) find matching driver on virtio bus -b-uvsi_rftoior__edaecvh_m_dartvc(…h(.d)ev, drv) Ack driver found for device Fe---a-Gdwtueieafrvtl ek s-b uNdapcrceopikvgnoeeofrdrittg e fif-aedeta aisstotueeuntrtr e_ ev–s sdtt aate–htbvuelb-esse( e… _f- efgaeacreatheutte_ urkscerteeksays ti uf=p sb e(d)ar cef| okvVer-ImnRdcTao InOsncu_fepiCg pOf-eoNargtFtsueI Gtr–_e_fbSse_eaD_tufRerIaeVtsEu(vRrde)sevb)it set --scabea))ll elb dcdartri cvi vkefeeerrna ftdpeu arrfoteeubsar ete–u s–rv endvsoie rntvt no-seut tcps_ouppnporfopritgboe-erdt( e)fb diny a bblyiaz cedk_rfeiveneadrt u ddroeosnn(’’vttd ggeeevtt- sseefelleeacctttueerddes[]) virtio driver probe instantiate network device interface d…e.v= alloc_etherdev_mq(…, # of queues) Various performance features – primarily offload, big packets -----CVhdITBneeeaiclvtclik- kab elsianczucoedpk n peq–fnoiugsdree-t uetGsedf Fsi GnN f–edP a_Aoatvf luql aorVsnec(rds…ain t)–GegdPfar Aonb mdyin gbdvuuedefxefseevts-r icnfoetuoan tDut refeosscr r –iepastceohtr sdq, euAvev-uaeihl awb_lefe, aUtsuereds ring.
  • 21. 21 © 2013 SAMSUNG Electronics Co. Virtio Performance • When transport/backend are not ‘fused’ performance features not exported Due to way QEMU instantiates objects – properties set at TYPE_DEVICE class After device plugged – properties not set If transport/backend not fused – properties/performance features not used Created patch for virtio-mmio – applies when backend plugged o https://github.com/mjsmar/virtio_net_fix.git
  • 22. 22 © 2013 SAMSUNG Electronics Co. Virtio Performance • Performance features Red Hat multi-queue tap o tap arg – ‘queues=n’ for scalability o Creates multiple queue virtio/tap tx/rx queue pairs o vCPU scaling for tx/rx, serializes flows - TCP sessions, UDP connections tx=timer,x-txtimer=nuS o Host kicks the backend periodically – limit exits o you can adjust how often backend polls tx virtqueue – tune latency vs. CPU Offload – bigger pkts few exits, offload to host o Ring descriptors have – 1 for virtio_net_hdr other for data o probe tun/tap for vnet hdr support – for offloads - IFF_VNET_HDR o Probe tun/tap for GSO – TCP,UDP, - TSO, UFO o Options eventually make it to virtio-net net_device ‘features’ virtio_net_hdr – flags for CSUM define range check skb fragments for for GSO – set vnet_hdr_net gso_type, size
  • 23. Reconnaissance of Virtio: What’s new and how it’s all connected? © 2013 SAMSUNG Electronics Co. Q A
  • 24. Thank you. © 2013 SAMSUNG Electronics Co. Mario Smarduch Senior Virtualization Architect Open Source Group Samsung Research America (Silicon Valley) m.smarduch@samsung.com