[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: Re: [virtio-comment] About adding a new device type virtio-nvme
On Thu, 19 Jan 2023 11:38:51 +0800ïJason Wang wrote: >å 2023/1/18 10:15, äèä åé: >> On Tue, 17 Jan 2023 10:34:09 -0500, Stefan wrote: >> >> On Tue, Jan 17, 2023 at 05:41:57PM +0800, äèä wrote: >>>> On Tue, 17 Jan 2023 09:32:05 +0100ïDavid wroteï >>>> On 17.01.23 03:04, äèä wrote: >>>> >>>> >>>>>> virtio-nvmeÂadvantages : >>>>>> 1) live migration >>>>>> 2) support remote storage >>>> >>>> >>>>> At least 1) is an implementation detail in the NVME implementation in >>>> the hypervisor. I suspect 2) in a similar way, or is there a fundamental >>>>> issue with that? >>>> >>>> >>>>> One problematic thing about the NVME implementation in QEMU is that it >>>>> will pin (via vfio) all guest RAM. Could that be avoided using >>>>> virtio-NVME, or what exactly would be the difference between virtio-nvme >>>>> and ordinary NVME? >>>> >>>> >>>> In the virtualization scenario where devices are offload to hardwareï >>>> >>>> >>>> NVMEï >>>> --------------------------------------------------------------------------------------------------------------------- >>>> Â _____________________________________________________________________________ >>>> Â | ___________________________________________________________ | >>>> Â | | _____________________________________________________ | | >>>> Â | | | | | | >>>> Â | | | __________________________________ | | | >>>> Â | | | | ______ | | | | ______ >>>> Â | | | User | | Mem |-----------------------|----|-|----|-----> | | >>>> Â | | | | |______| SPDK | | | | (gVA) |______| >>>> Â | | | | (gVA) | | | | | | >>>> Â | | | |______|___________________________| | | | | | >>>> Â | | |--GuestOS----------|--------------------------------| | | | | >>>> Â | | | ______\/__________________________ | | | | | >>>> Â | | VM | | VFIO | | | | | | >>>> Â | User | | Kernel |___________ __________________| | | | | | >>>> Â | | | | vfio-pci | | | | | | | | >>>> Â | | | | (gIOVA) | | vfio_iommu_type1 | | | | | | >>>> Software | | | |______|____|___|__________________| | | | | | >>>> Â | | |___________________|________________________________| | | | | >>>> Â | | ___________________|________________________________ | | | | >>>> Â | | | ______|____ __________________ | | | \/ \/ >>>> Â | | | | \/ | | | | | | ______ >>>> Â | | | | NVME | | vIOMMU | | | | | | >>>> Â | | | QEMU | Instance | | --|----|-|----|-----> |______| >>>> Â | | | | (gIOVA) | | (gIOVA-->gPA) | | | | (gPA) | | >>>> Â | | | |_____|_____| |__________________| | | | | | >>>> Â | | |__________________|_________________________________| | | | | >>>> Â | |_______________________|___________________________________| | | | >>>> Â |---HostOS---------------------------|----------------------------------------| | | >>>> Â | _______________________|___________________________________ | | | >>>> Â | | | | | | | >>>> Â | | | VFIO | | | | >>>> Â | Kernel |_______________________|_____ _________________________| | | | >>>> Â | | \/ | | | | | | >>>> Â | | vfio-pci | | vfio_iommu_type1 | | | | >>>> Â | | | | | | | | | >>>> Â | |_______________________|_____|___|_________________________| | | | >>>> Â |____________________________________|________________________________________| | | >>>> -----------------------------------------------|-------------------------------------------------|----|-------------- >>>> Â ____________________________________\/____ _________________________ ___\/___\/___________ >>>> Â | | | | | | | | | | >>>> Hardware | | | DMA (gIOVA) --|---|-> IOMMU --|---------|->|______| | >>>> Â | | |_____________________________| | (gIOVA-->hPA) | (hPA) | Physical Memory | >>>> Â | DPU | | |_________________________| |_____________________| >>>> Â | | NVME-of | >>>> Â | |__________________________________| >>>> Â | | | >>>> Â |___________________________|______________| >>>> --------------------------------------|------------------------------------------------------------------------------ >>>> Â | TCP (RDMA, and so on) >>>> Â ______________v__________ >>>> Â | | >>>> Remote storage | | >>>> Â | Network Storage | >>>> Â | | >>>> Â |_________________________| >>>> >>>> --------------------------------------------------------------------------------------------------------------------- >>>> >>>> >>>> It is difficult to implement PCIe passthrough live migration. >> >> >> >>> Linux commit 115dcec65f61d53e25e1bed5e380468b30f98b14 ("vfio: Define >>> device migration protocol v2") defines the VFIO migration API and it's >>> implemented by several drivers in the kernel. >> >> Yes, this commit supports VFIO live migration, but the feature is a work in progress, >> recent submission: https://lore.kernel.org/all/20230116141135.12021-10-avihaih@nvidia.com/ >> >> >>> Can you explain the difficulty of implementing PCIe passthrough live >>> migration in more detail? >> VFIO live migration requires IOMMU to support dirty page tracking. Currently, >> no IOMMU device supports this feature. So, VFIO live migration will take a long time. >> Detailed information referenceïhttps://www.qemu.org/docs/master/devel/vfio-migration.html >> >> >> >> >>>> virtio-nvme: >>>> --------------------------------------------------------------------------------------------------------------------- >>>> Â _____________________________________________________________________________ >>>> Â | ___________________________________________________________ | >>>> Â | | _____________________________________________________ | | >>>> Â | | | | | | >>>> Â | | | __________________________________ | | | >>>> Â | | | | ______ | | | | ______ >>>> Â | | | User | | Mem |-----------------------|----|-|----|-----> | | >>>> Â | | | | |______| SPDK | | | | (gVA) |______| >>>> Â | | | | (gVA) | | | | | | >>>> Â | | | |______|___________________________| | | | | | >>>> Â | | |--GuestOS----------|--------------------------------| | | | | >>>> Â | | | ______v___________________________ | | | | | >>>> Â | | VM | | VFIO | | | | | | >>>> Â | User | | Kernel |___________ __________________| | | | | | >>>> Â | | | | vfio-pci | | | | | | | | >>>> Â | | | | (gIOVA) | | vfio_iommu_type1 | | | | | | >>>> Software | | | |______|____|___|__________________| | | | | | >>>> Â | | |___________________|________________________________| | | | | >>>> Â | | ___________________|________________________________ | | | | >>>> Â | | | ______v____ __________________ | | | v v >>>> Â | | | |virtio-NVME| | | | | | ______ >>>> Â | | | | Instance | | vIOMMU | | | | | | >>>> Â | | | QEMU | | | --|----|-|----|-----> |______| >>>> Â | | | | vhost-vdpa| | (gIOVA-->gPA) | | | | (gPA) | | >>>> Â | | | |__(gIOVA)__| |__________________| | | | | | >>>> Â | | |__________________|_________________________________| | | | | >>>> Â | |_______________________|___________________________________| | | | >>>> Â |---HostOS---------------------------|----------------------------------------| | | >>>> Â | _______________________|___________________________________ | | | >>>> Â | | | | | | | >>>> Â | | | vDPA | | | | >>>> Â | Kernel |_______________________v_____ _________________________| | | | >>>> Â | | | | | | | | | >>>> Â | | vdpa-device | | | | | | | >>>> Â | | (Virtual device) | | | | | | | >>>> Â | |_______________________|_____|___|_________________________| | | | >>>> Â |____________________________________|________________________________________| | | >>>> -----------------------------------------------|-------------------------------------------------|----|-------------- >>>> Â ____________________________________v_____ _________________________ ___v____v____________ >>>> Â | | | | | | | | | | >>>> Hardware | | | DMA (gIOVA) --|---|-> IOMMU --|---------|->|______| | >>>> Â | | |_____________________________| | (gIOVA-->hPA) | (hPA) | Physical Memory | >>>> Â | DPU | | |_________________________| |_____________________| >>>> Â | | virtio-nvme-of | >>>> Â | |__________________________________| >>>> Â | | | >>>> Â |___________________________|______________| >>>> --------------------------------------|------------------------------------------------------------------------------ >>>> Â | TCP (RDMA, and so on) >>>> Â ______________v__________ >>>> Â | | >>>> Remote storage | | >>>> Â | Network Storage | >>>> Â | | >>>> Â |_________________________| >>>> >>>> --------------------------------------------------------------------------------------------------------------------- >>>> Based on the vDPA framework, it supports live migration. >> >> >> >> >>> The two diagrams are quite similar. Did you want to highlight a >>> difference between the two approaches in the diagram? >> The biggest difference is the VFIO and vDPA frameworks. The vDPA (virtio data path acceleration) kernel framework >> is a pillar in productizing the end-to-end vDPA solution and it enables NIC vendors to integrate their vDPA NIC kernel >> drivers into the framework as part of their productization efforts. >> Detailed information referenceïhttps://www.redhat.com/en/blog/introduction-vdpa-kernel-framework > > >Note that vDPA is not solely software concept but also a hardware one. >And with vDPA kernel support the device can talks to kernel I/O >subsystem via virtio-vDPA bus drivers. Yes, I'm not being precise enough. vDPA is created for virtio devices to be offloading to hardware. Hardware is also part of vDPA.   Â
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]