SlideShare uma empresa Scribd 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

Mais conteúdo relacionado

Mais procurados

QEMU - Binary Translation
QEMU - Binary Translation QEMU - Binary Translation
QEMU - Binary Translation
Jiann-Fuh Liaw
 
Linux Network Stack
Linux Network StackLinux Network Stack
Linux Network Stack
Adrien Mahieux
 
Embedded linux network device driver development
Embedded linux network device driver developmentEmbedded linux network device driver development
Embedded linux network device driver development
Amr Ali (ISTQB CTAL Full, CSM, ITIL Foundation)
 
The linux networking architecture
The linux networking architectureThe linux networking architecture
The linux networking architecture
hugo lu
 
仮想化環境におけるパケットフォワーディング
仮想化環境におけるパケットフォワーディング仮想化環境におけるパケットフォワーディング
仮想化環境におけるパケットフォワーディング
Takuya ASADA
 
Virtualization Architecture & KVM
Virtualization Architecture & KVMVirtualization Architecture & KVM
Virtualization Architecture & KVM
Pradeep Kumar
 
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
Linaro
 
Linux Kernel MMC Storage driver Overview
Linux Kernel MMC Storage driver OverviewLinux Kernel MMC Storage driver Overview
Linux Kernel MMC Storage driver Overview
RajKumar Rampelli
 
Network Drivers
Network DriversNetwork Drivers
Network Drivers
Anil Kumar Pugalia
 
I/O仮想化最前線〜ネットワークI/Oを中心に〜
I/O仮想化最前線〜ネットワークI/Oを中心に〜I/O仮想化最前線〜ネットワークI/Oを中心に〜
I/O仮想化最前線〜ネットワークI/Oを中心に〜
Ryousei Takano
 
The TCP/IP Stack in the Linux Kernel
The TCP/IP Stack in the Linux KernelThe TCP/IP Stack in the Linux Kernel
The TCP/IP Stack in the Linux Kernel
Divye Kapoor
 
LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3
LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3
LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3
Linaro
 
Performance Tuning EC2 Instances
Performance Tuning EC2 InstancesPerformance Tuning EC2 Instances
Performance Tuning EC2 Instances
Brendan Gregg
 
Kernel_Crash_Dump_Analysis
Kernel_Crash_Dump_AnalysisKernel_Crash_Dump_Analysis
Kernel_Crash_Dump_Analysis
Buland Singh
 
The Linux Kernel Scheduler (For Beginners) - SFO17-421
The Linux Kernel Scheduler (For Beginners) - SFO17-421The Linux Kernel Scheduler (For Beginners) - SFO17-421
The Linux Kernel Scheduler (For Beginners) - SFO17-421
Linaro
 
Linux Internals - Part II
Linux Internals - Part IILinux Internals - Part II
Linux Internals - Part II
Emertxe Information Technologies Pvt Ltd
 
Linux Crash Dump Capture and Analysis
Linux Crash Dump Capture and AnalysisLinux Crash Dump Capture and Analysis
Linux Crash Dump Capture and Analysis
Paul V. Novarese
 
VLANs in the Linux Kernel
VLANs in the Linux KernelVLANs in the Linux Kernel
VLANs in the Linux Kernel
Kernel TLV
 
Linux device drivers
Linux device drivers Linux device drivers
systemd
systemdsystemd
systemd
nussbauml
 

Mais procurados (20)

QEMU - Binary Translation
QEMU - Binary Translation QEMU - Binary Translation
QEMU - Binary Translation
 
Linux Network Stack
Linux Network StackLinux Network Stack
Linux Network Stack
 
Embedded linux network device driver development
Embedded linux network device driver developmentEmbedded linux network device driver development
Embedded linux network device driver development
 
The linux networking architecture
The linux networking architectureThe linux networking architecture
The linux networking architecture
 
仮想化環境におけるパケットフォワーディング
仮想化環境におけるパケットフォワーディング仮想化環境におけるパケットフォワーディング
仮想化環境におけるパケットフォワーディング
 
Virtualization Architecture & KVM
Virtualization Architecture & KVMVirtualization Architecture & KVM
Virtualization Architecture & KVM
 
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
 
Linux Kernel MMC Storage driver Overview
Linux Kernel MMC Storage driver OverviewLinux Kernel MMC Storage driver Overview
Linux Kernel MMC Storage driver Overview
 
Network Drivers
Network DriversNetwork Drivers
Network Drivers
 
I/O仮想化最前線〜ネットワークI/Oを中心に〜
I/O仮想化最前線〜ネットワークI/Oを中心に〜I/O仮想化最前線〜ネットワークI/Oを中心に〜
I/O仮想化最前線〜ネットワークI/Oを中心に〜
 
The TCP/IP Stack in the Linux Kernel
The TCP/IP Stack in the Linux KernelThe TCP/IP Stack in the Linux Kernel
The TCP/IP Stack in the Linux Kernel
 
LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3
LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3
LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3
 
Performance Tuning EC2 Instances
Performance Tuning EC2 InstancesPerformance Tuning EC2 Instances
Performance Tuning EC2 Instances
 
Kernel_Crash_Dump_Analysis
Kernel_Crash_Dump_AnalysisKernel_Crash_Dump_Analysis
Kernel_Crash_Dump_Analysis
 
The Linux Kernel Scheduler (For Beginners) - SFO17-421
The Linux Kernel Scheduler (For Beginners) - SFO17-421The Linux Kernel Scheduler (For Beginners) - SFO17-421
The Linux Kernel Scheduler (For Beginners) - SFO17-421
 
Linux Internals - Part II
Linux Internals - Part IILinux Internals - Part II
Linux Internals - Part II
 
Linux Crash Dump Capture and Analysis
Linux Crash Dump Capture and AnalysisLinux Crash Dump Capture and Analysis
Linux Crash Dump Capture and Analysis
 
VLANs in the Linux Kernel
VLANs in the Linux KernelVLANs in the Linux Kernel
VLANs in the Linux Kernel
 
Linux device drivers
Linux device drivers Linux device drivers
Linux device drivers
 
systemd
systemdsystemd
systemd
 

Semelhante a 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 computing
Arka 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 computing
Arka Ghosh
 
Vpu technology &gpgpu computing
Vpu technology &gpgpu computingVpu technology &gpgpu computing
Vpu technology &gpgpu computing
Arka Ghosh
 
Vpu technology &gpgpu computing
Vpu technology &gpgpu computingVpu technology &gpgpu computing
Vpu technology &gpgpu computing
Arka 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 Name
Positive Hack Days
 

Semelhante a 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
 

Mais de 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
 

Mais de 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
 

Último

HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
fredae14
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
Webinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data WarehouseWebinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data Warehouse
Federico Razzoli
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
Wouter Lemaire
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 

Último (20)

HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
Webinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data WarehouseWebinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data Warehouse
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 

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