Generic Buffer Sharing Mechanism for Mediated Devices

Similar documents
Live Migration with Mdev Device

VGPU ON KVM VFIO BASED MEDIATED DEVICE FRAMEWORK Neo Jia & Kirti Wankhede, 08/25/2016

Live Migration of vgpu

Live Migration of vgpu

Sync Points in the Intel Gfx Driver. Jesse Barnes Intel Open Source Technology Center

VDPA: VHOST-MDEV AS NEW VHOST PROTOCOL TRANSPORT

Platform Device Assignment to KVM-on-ARM Virtual Machines via VFIO

What is KVM? KVM patch. Modern hypervisors must do many things that are already done by OSs Scheduler, Memory management, I/O stacks

Hardware-Assisted Mediated Pass-Through with VFIO. Kevin Tian Principal Engineer, Intel

Exporting virtual memory as dmabuf. Nikhil Devshatwar Texas Instruments, India

MDev-NVMe: A NVMe Storage Virtualization Solution with Mediated Pass-Through

Virtualisation: The KVM Way. Amit Shah

Marek Szyprowski Samsung R&D Institute Poland

VIRTIO: VHOST DATA PATH ACCELERATION TORWARDS NFV CLOUD. CUNMING LIANG, Intel

Accelerating Storage with NVM Express SSDs and P2PDMA Stephen Bates, PhD Chief Technology Officer

Display Virtualization with KVM for Automotive Systems

VIRTIO-NET: VHOST DATA PATH ACCELERATION TORWARDS NFV CLOUD. CUNMING LIANG, Intel

A Userspace Packet Switch for Virtual Machines

VGA Assignment Using VFIO. Alex Williamson October 21 st, 2013

FPGA Acceleration and Virtualization Technology in DPDK ROSEN XU TIANFEI ZHANG

Methods to protect proprietary components in device drivers

ECE 598 Advanced Operating Systems Lecture 18

Accelerating NVMe I/Os in Virtual Machine via SPDK vhost* Solution Ziye Yang, Changpeng Liu Senior software Engineer Intel

HKG net_mdev: Fast-path userspace I/O. Ilias Apalodimas Mykyta Iziumtsev François-Frédéric Ozog

Red Hat Enterprise Virtualization Hypervisor Roadmap. Bhavna Sarathy Senior Technology Product Manager, Red Hat

KVM on Embedded Power Architecture Platforms

Shared Virtual Memory Virtualization. Liu, Yi L Raj, Ashok Pan, Jacob

Zhang Tianfei. Rosen Xu

Wayland IVI Extension

CS 550 Operating Systems Spring Introduction to Virtual Machines

EXPLICIT SYNCHRONIZATION

Lecture 7. Xen and the Art of Virtualization. Paul Braham, Boris Dragovic, Keir Fraser et al. 16 November, Advanced Operating Systems

DRM(Direct Rendering Manager) of Tizen Kernel Joonyoung Shim

Unix Device Memory. James Jones XDC 2016

Virtual Machines. Part 2: starting 19 years ago. Operating Systems In Depth IX 1 Copyright 2018 Thomas W. Doeppner. All rights reserved.

Porting Tizen-IVI 3.0 to an ARM based SoC Platform

Xen on ARM ARMv7 with virtualization extensions

LCA14-417: mmap, allocators & sharing buffers - userland experience. Thu 6 March, 4:10pm, S.Semwal, B.Gaignard

KVM as The NFV Hypervisor

Virtualization (II) SPD Course 17/03/2010 Massimo Coppola

GPU Memory Model Overview

Status Update About COLO FT

NETWORK PROGRAMMING. Instructor: Junaid Tariq, Lecturer, Department of Computer Science

Memory Management in Tizen. SW Platform Team, SW R&D Center

Painless switch from proprietary hypervisor to QEMU/KVM. Denis V. Lunev

Graphics Pass-through with VT-d

Virtualization Device Emulator Testing Technology. Speaker: Qinghao Tang Title 360 Marvel Team Leader

GRID SOFTWARE FOR HUAWEI UVP VERSION /370.12

Cloud environment with CentOS, OpenNebula and KVM

Disco: Running Commodity Operating Systems on Scalable Multiprocessors

EC H2020 dredbox: Seminar School at INSA Rennes

KVM Weather Report. Amit Shah SCALE 14x

The Linux graphics stack, Optimus and the Nouveau driver

Performance Implications Libiscsi RDMA support

Accelerating VM networking through XDP. Jason Wang Red Hat

VIRTUAL GPU SOFTWARE. DU _v5.0 through 5.2 Revision 05 March User Guide

Back To The Future: A Radical Insecure Design of KVM on ARM

Full Scalable Media Cloud Solution with Kubernetes Orchestration. Zhenyu Wang, Xin(Owen)Zhang

Who stole my CPU? Leonid Podolny Vineeth Remanan Pillai. Systems DigitalOcean

Vhost and VIOMMU. Jason Wang (Wei Xu Peter Xu

Mainline Explicit Fencing

Zhang Chen Zhang Chen Copyright 2017 FUJITSU LIMITED

Vhost dataplane in Qemu. Jason Wang Red Hat

Bharat Bhushan, Stuart Yoder

Xen Project 4.4: Features and Futures. Russell Pavlicek Xen Project Evangelist Citrix Systems

Porting Tizen-IVI 3.0 to an ARM based SoC Platform. Damian Hobson-Garcia, IGEL Co., Ltd.

GRID SOFTWARE FOR HUAWEI UVP VERSION /370.28

RMRR EXCLUSION. Technical Whitepaper. Alex Williamson Myron Stowe Laura Novich

VIRTUAL GPU SOFTWARE. DU _v6.0 through 6.1 Revision 02 June User Guide

Status Report 2015/09. Alexandre Courbot Martin Peres. Logo by Valeria Aguilera, CC BY-ND

Quo Vadis Virtio? Michael S. Tsirkin Red Hat

Khronos and the Mobile Ecosystem

The Challenges of X86 Hardware Virtualization. GCC- Virtualization: Rajeev Wankar 36

GRID SOFTWARE. DU _v4.6 January User Guide

Memory Externalization With userfaultfd Red Hat, Inc.

QEMU: Architecture and Internals Lecture for the Embedded Systems Course CSD, University of Crete (April 18, 2016)

Efficient Video Processing on Embedded GPU

NVIDIA GRID. Ralph Stocker, GRID Sales Specialist, Central Europe

ARM-KVM: Weather Report Korea Linux Forum

Bringing the Power of ebpf to Open vswitch. Linux Plumber 2018 William Tu, Joe Stringer, Yifeng Sun, Yi-Hung Wei VMware Inc. and Cilium.

SYSTEM CALL IMPLEMENTATION. CS124 Operating Systems Fall , Lecture 14

Nested Virtualization Update From Intel. Xiantao Zhang, Eddie Dong Intel Corporation

QtWayland. Creating Window Compositors with the QtWayland module

Hypervisor security. Evgeny Yakovlev, DEFCON NN, 2017

DPDK Roadmap. Tim O Driscoll & Chris Wright Open Networking Summit 2017

AHV + NVIDIA VGPU INTEGRATION Malcolm Crossley AHV GPU Architect

Improve VNF safety with Vhost-User/DPDK IOMMU support

DELIVERING HIGH-PERFORMANCE REMOTE GRAPHICS WITH NVIDIA GRID VIRTUAL GPU. Andy Currid NVIDIA

Bringing display and 3D to the C.H.I.P computer

Userspace NVMe Driver in QEMU

SHWETANK KUMAR GUPTA Only For Education Purpose

Introduction to creating 3D UI with BeagleBoard. ESC-341 Presented by Diego Dompe

Virtualization. ...or how adding another layer of abstraction is changing the world. CIS 399: Unix Skills University of Pennsylvania.

Input / Output. Kevin Webb Swarthmore College April 12, 2018

AMD Pacifica Virtualization Technology

Changpeng Liu. Cloud Storage Software Engineer. Intel Data Center Group

LINUX KVM FRANCISCO JAVIER VARGAS GARCIA-DONAS CLOUD COMPUTING 2017

Dave Shreiner, ARM March 2009

Bringing display and 3D to the C.H.I.P computer

I/O and virtualization

Transcription:

Generic Buffer Sharing Mechanism for Mediated Devices Tina Zhang tina.zhang@intel.com 1

Agenda Background Generic Buffer Sharing in MDEV Framework Status Summary 2

Virtual Function I/O Virtual Function I/O Secure, userspace driver framework Assigns physical I/O device to VMs 3

Mediated Device in VFIO Libvirt Mdev mgmt Create/Configure MDEV Host Linux Pass MDEV UUIDQemu VFIO VFIO Mdev Framework Get MDEV info I/O Trap Guest OS Device Driver Linux device driver MDEV driver Hypervisor Hardware 4

A KEY MDEV Usage Requirement in GPU Virtualization Is To Render Guest Framebuffer In The Host Side 5

Scenario-1: Remote Virtual Desktop Desktop#1 Desktop#2 Desktop#N 3D/Media Acceleration Remote Framebuffer Streaming Network 6

Scenario-2: Automotive Virtualization GPU Mediator Directly Configure VM Framebuffer to Display Panel 7

Scenario-3: Rich Virtual Client VM1 VM2 VM3 framebuffer framebuffer framebuffer Guest Framebuffers Composited by Host Compositor 8

Generic Buffer Sharing in MDEV Framework 9

Design Philosophy - Generic Based on dma-buf subsystem which Generic way provided by kernel to share DMA buffers Already been supported by many device drivers Supported by Linux graphics stacks Used by remote protocol (e.g. SPICE) ABIs proposed by different MDEVs in the same category 10

A Short Note On Dma-buf dma-buf The dma-buf Represents a sg_table (SGT) Exporter Buffer-user The exporter Producer of the dma-buf Implements dma_buf_ops Exports dma-buf as a file descriptor map Physical memory The buffer-user Imports the dma-buf Gets the scatterlist in SGT Maps buffer address 11

Buffer Sharing in MDEV Framework New Component Existing Component 12

Buffer Sharing in MDEV Framework Query Buffer Info New Component Existing Component 13

Buffer Sharing in MDEV Framework Ask for dma-buf fd of the buffer Return fd of the exposed buffer New Component Existing Component 14

Buffer Sharing in MDEV Framework Pass fd New Component Existing Component 15

Buffer Sharing in MDEV Framework Access the buffer through fd New Component Existing Component 16

Shared Guest Framebuffer Based on DMA-BUF(1/2) VFIO_DEVICE_QUERY_GFX_PLANE struct vfio_device_gfx_plane_info { /* in */ u32 drm_plane_type; /* type of plane: DRM_PLANE_TYPE_* */ /* out */ u32 width; /* width of plane */ u32 height; /* height of plane */ u32 stride; /* stride of plane */ u32 size; /* size of plane in bytes, align on page*/ s32 dmabuf_id; /* dma-buf id */ }; 17

Shared Guest Framebuffer Based on DMA-BUF(2/2) VFIO_DEVICE_GET_GFX_DMABUF struct vfio_device_gfx_dmabuf_fd { u32 argsz; u32 flags; /* in */ u32 dmabuf_id; /* out */ s32 dmabuf_fd; }; 18

Sharing vgpu Framebuffer For Remote Desktop 2 3 1 VM1 framebuffer VM2 framebuffer VM3 framebuffer Remote Framebuffer Streaming Network 19

Sharing vgpu Framebuffer For Direct Display 2 3 1 drmprimefdtohandle: dma-buf fd -> handle drmmodeaddfb2: handle -> framebuffer VM1 framebuffer VM2 framebuffer VM3 framebuffer drmmodesetcrtc: render the framebuffer to local display panel 20

Sharing vgpu Framebuffer For Composited Display eglcreateimagekhr: Dma-buf fd -> image glbindtexture: Bind image to texture 21

Implementation Details DMA-BUF Management Implements dma-buf operations Creates dma-buf object with an installed fd Caches the exposed DMA-BUF object SGT Management Allocates/Releases the SGT Gets address of the mediated device buffer Guest buffer Information Collection Gets the info by decoding values in the mediated device registers 22

Status PATCH v15: Tested with Linux kernel 4.13 Working with community for upstreaming Userspace: Qemu UI patch-set of start adding dma-buf support designed by Gerd Hoffman Qemu UI RFC patch-set of add display support designed by Gerd Hoffman 23

Summary The design is generic enough for I/O mediators. Based on DMA-BUF subsystem The implementation is generic for mediated vgpus. Welcome innovations based on this generic buffer sharing mechanism 24

https://github.com/01org/gvt-linux