CN114281252A - Virtualization method and device for NVMe (network video recorder) device of nonvolatile high-speed transmission bus - Google Patents

Virtualization method and device for NVMe (network video recorder) device of nonvolatile high-speed transmission bus Download PDF

Info

Publication number
CN114281252A
CN114281252A CN202111510109.6A CN202111510109A CN114281252A CN 114281252 A CN114281252 A CN 114281252A CN 202111510109 A CN202111510109 A CN 202111510109A CN 114281252 A CN114281252 A CN 114281252A
Authority
CN
China
Prior art keywords
queue
nvme
virtual
virtual machine
request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111510109.6A
Other languages
Chinese (zh)
Inventor
葛旭阳
刘奖
邬宗勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba China Co Ltd
Original Assignee
Alibaba China Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba China Co Ltd filed Critical Alibaba China Co Ltd
Priority to CN202111510109.6A priority Critical patent/CN114281252A/en
Publication of CN114281252A publication Critical patent/CN114281252A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Bus Control (AREA)

Abstract

The embodiment of the application provides a virtualization method and device for NVMe (non-volatile high-speed transport) equipment, wherein the virtualization method comprises the following steps: acquiring an equipment establishing request, wherein the equipment establishing request is used for establishing virtual NVMe equipment corresponding to the NVMe equipment in a virtual machine; determining a first input/output (IO) queue for establishing virtual NVMe equipment, wherein the first IO queue corresponds to a second IO queue in the NVMe equipment; and establishing virtual NVMe equipment corresponding to the NVMe equipment in the virtual machine based on the first IO queue and the equipment establishing request, wherein the virtual NVMe equipment is used for realizing communication connection between the virtual machine and the NVMe equipment. According to the technical scheme, the IO queue between the virtual machine and the NVMe equipment can be directly communicated through the established virtual NVMe equipment, so that the performance and the efficiency of data processing are effectively improved, and the utilization rate of hardware resources is guaranteed.

Description

Virtualization method and device for NVMe (network video recorder) device of nonvolatile high-speed transmission bus
Technical Field
The application relates to the technical field of storage, in particular to a virtualization method and device for a non-volatile high-speed transmission bus NVMe device.
Background
A Non-Volatile Memory Express (NVMe) is a logical device interface specification, which can be used as a storage protocol of a Solid State Drive (SSD).
In the prior art, data communication is realized between a Virtual Machine and NVMe storage equipment through a Virtual Machine Manager (VMM for short), specifically, the Virtual Machine may send a generated data read-write request to the VMM, and then the VMM may forward the data read-write request to the NVMe storage equipment to realize data read-write operation. However, since the data read-write operation needs to be forwarded through the VMM, the performance and efficiency of data processing are reduced, which is not beneficial to improving the utilization rate of hardware resources in the NVMe storage device.
Disclosure of Invention
The embodiment of the application provides a virtualization method and device for a non-volatile high-speed transmission bus NVMe device, and direct communication between the NVMe device and a virtual machine through the virtual NVMe device is achieved, so that the performance and efficiency of data processing are improved, and the utilization rate of hardware resources is guaranteed.
In a first aspect, an embodiment of the present application provides a virtualization method for a non-volatile fast transmission bus NVMe device, which is applied to a virtual machine, and the method includes:
acquiring an equipment establishing request, wherein the equipment establishing request is used for establishing virtual NVMe equipment corresponding to the NVMe equipment in the virtual machine;
determining a first input/output (IO) queue for establishing the virtual NVMe equipment, wherein the first IO queue corresponds to a second IO queue in the NVMe equipment;
based on the first IO queue and the device establishment request, establishing a virtual NVMe device corresponding to the NVMe device in the virtual machine, wherein the virtual NVMe device is used for realizing communication connection between the virtual machine and the NVMe device.
In a second aspect, an embodiment of the present application provides a virtualization apparatus for a non-volatile fast transmission bus NVMe device, including:
a first obtaining module, configured to obtain a device establishment request, where the device establishment request is used to establish a virtual NVMe device corresponding to an NVMe device in the virtual machine;
a first determining module, configured to determine a first input/output (IO) queue used for establishing the virtual NVMe device, where the first IO queue corresponds to a second IO queue in the NVMe device;
a first processing module, configured to establish, in the virtual machine, a virtual NVMe device corresponding to the NVMe device based on the first IO queue and the device establishment request, where the virtual NVMe device is configured to implement communication connection between the virtual machine and the NVMe device.
In a third aspect, an embodiment of the present application provides an electronic device, including: a memory, a processor; wherein the memory is configured to store one or more computer instructions, and the one or more computer instructions, when executed by the processor, implement the virtualization method of the NVMe device according to the first aspect.
In a fourth aspect, an embodiment of the present invention provides a computer storage medium for storing a computer program, where the computer program is configured to, when executed, implement the virtualization method for the NVMe device of the first aspect.
In a fifth aspect, an embodiment of the present invention provides a computer program product, including: computer instructions which, when executed by one or more processors, cause the one or more processors to perform the steps in the method of virtualizing a non-volatile transport cache bus NVMe device as shown in the first aspect above.
In a sixth aspect, an embodiment of the present invention provides a virtualization method for a non-volatile high-speed transmission bus NVMe device, which is applied to a management node, where the method includes:
acquiring an access request of a virtual machine;
determining at least one second IO queue provided by the NVMe device based on the access request;
and sending at least one second IO queue to the virtual machine to serve as a first IO queue, so as to establish a virtual NVMe device corresponding to the NVMe device in the virtual machine based on the first IO queue.
In a seventh aspect, an embodiment of the present application provides a virtualization apparatus for a non-volatile fast transmission bus NVMe device, including:
the second acquisition module is used for acquiring the access request of the virtual machine;
a second determining module, configured to determine, based on the access request, at least one second IO queue provided by the NVMe device;
and the second processing module is used for sending at least one second IO queue to the virtual machine as a first IO queue so as to establish a virtual NVMe device corresponding to the NVMe device in the virtual machine based on the first IO queue.
In an eighth aspect, an embodiment of the present application provides an electronic device, including: a memory, a processor; wherein the memory is configured to store one or more computer instructions, and the one or more computer instructions, when executed by the processor, implement the virtualization method for the NVMe device according to the sixth aspect.
In a ninth aspect, an embodiment of the present invention provides a computer storage medium for storing a computer program, where the computer program is used to enable a computer to execute the method for virtualizing the non-volatile fast transmission bus NVMe device shown in the sixth aspect.
In a tenth aspect, an embodiment of the present invention provides a computer program product, including: computer instructions which, when executed by one or more processors, cause the one or more processors to perform the steps in the method for virtualizing a non-volatile transport bus NVMe device of the sixth aspect.
In an eleventh aspect, an embodiment of the present invention provides a virtualization system for a non-volatile fast transmission bus NVMe device, including:
virtual machine: the access request corresponding to the NVMe device is generated;
the management node is in communication connection with the virtual machine and is used for acquiring the access request, determining at least one second input/output (I0) queue provided by the NVMe device based on the access request and sending the at least one second IO queue to the virtual machine to serve as a first IO queue;
the virtual machine is used for determining a first IO queue for establishing virtual NVMe equipment, wherein the first IO queue corresponds to a second IO queue in the NVMe equipment; establishing a virtual NVMe device corresponding to the NVMe device in the virtual machine based on the first IO queue and the access request, wherein the virtual NVMe device is used for realizing communication connection between the virtual machine and the NVMe device.
According to the technical scheme, the first input/output IO queue used for establishing the virtual NVMe device is determined by obtaining the device establishing request, the obtained first IO queue corresponds to the second IO queue in the NVMe device, then the virtual NVMe device corresponding to the NVMe device can be established in the virtual machine based on the first IO queue and the device establishing request, so that the virtualization operation of the NVMe device is effectively achieved, then the IO request direct communication between the virtual machine and the NVMe device can be achieved through the established virtual NVMe device, therefore, the number of nodes required to pass through in a data transmission link is reduced, the performance and the efficiency of data processing are improved, the utilization rate of hardware resources is further guaranteed, the practicability of the method is improved, and market popularization and application are facilitated.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic diagram of a virtualization method of a non-volatile transport bus NVMe device provided in an embodiment of the present application;
fig. 2 is a schematic diagram of allocating an IO queue to a virtual machine according to an embodiment of the present application;
fig. 3 is an interaction diagram for initializing a virtual NVME device provided in an embodiment of the present application;
fig. 4 is a schematic flowchart of a virtualization method for a non-volatile fast transmission bus NVMe device according to an embodiment of the present application;
fig. 5 is a schematic flowchart illustrating a process of determining a first input/output IO queue for establishing a virtual NVMe device according to an embodiment of the present application;
fig. 6 is a schematic flowchart of a process of establishing, based on the first IO queue and the device establishment request, a virtual NVMe device corresponding to the NVMe device in the virtual machine according to the embodiment of the present application;
fig. 7 is a schematic flowchart of another virtualization method for a non-volatile fast transmission bus NVMe device according to an embodiment of the present application;
fig. 8 is a schematic flowchart of a virtualization method for a non-volatile fast transmission bus NVMe device according to an embodiment of the present application;
fig. 9 is a schematic flowchart of a virtualization method for a non-volatile fast transmission bus NVMe device according to an embodiment of the present application;
fig. 10 is a schematic flowchart of another virtualization method for a non-volatile fast transmission bus NVMe device according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of a virtualization apparatus of a non-volatile fast transmission bus NVMe device according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of an electronic device corresponding to the virtualization apparatus of the non-volatile fast transmission bus NVMe device shown in fig. 11;
fig. 13 is a schematic structural diagram of a virtualization apparatus of a non-volatile fast transmission bus NVMe device according to an embodiment of the present application;
fig. 14 is a schematic structural diagram of an electronic device corresponding to the virtualization apparatus of the non-volatile fast transmission bus NVMe device shown in fig. 13;
fig. 15 is a schematic structural diagram of a virtualization system of a non-volatile fast transmission bus NVMe device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the examples of this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise, and "a" and "an" typically include at least two, but do not exclude the presence of at least one.
It should be understood that the term "and/or" as used herein is merely one type of association that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
The words "if", as used herein, may be interpreted as "at … …" or "at … …" or "in response to a determination" or "in response to a detection", depending on the context. Similarly, the phrases "if determined" or "if detected (a stated condition or event)" may be interpreted as "when determined" or "in response to a determination" or "when detected (a stated condition or event)" or "in response to a detection (a stated condition or event)", depending on the context.
It is also noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a good or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such good or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a commodity or system that includes the element.
In addition, the sequence of steps in each method embodiment described below is only an example and is not strictly limited.
Definition of terms:
non-volatile high-speed transfer bus: Non-Volatile Memory Express, NVMe for short, a storage protocol specially designed for SSD.
Solid state disk: solid-state disk, SSD for short.
The virtual machine management program: virtual Machine Manager, VMM for short.
IOMMU: an Input/Output Memory Management Unit, a physical Memory Management hardware, is used to connect an I/O bus with DMA capability and a main Memory. Conventional memory management units translate virtual addresses accessed by the CPU into actual physical addresses. The IOMMU translates virtual addresses accessed by devices (devices) into physical addresses.
VFIO: virtual Function I/O is a user-state driven framework.
Doorbell: a register is used to inform hardware that data is ready and that the hardware can perform a read operation.
Queue pass-through: and directly connecting the queue of the equipment to the virtual machine.
Equipment straight-through: and directly connecting the whole equipment to the virtual machine.
Interrupting the injection: an interrupt is sent to the client Guest by software means.
post interrupt: an interrupt processing mode is used for improving the efficiency of a VMM (virtual machine monitor) for processing the interrupt of a direct connection device under virtualization.
CQ: completion Queue, a Queue for storing information of completed work requests (data send or receive requests, etc.).
SQ: submissionqueue, a Queue for storing information of Submission requests.
SRIOV: single Root I/O Virtualization, a hardware-based Virtualization solution, can improve performance and scalability. A PCIe device with SRIOV enabled and appropriate hardware and OS support may appear as multiple separate physical devices, each of which may be used exclusively by a different virtual machine in a manner that is pass-through to a PCI device.
Guest Kernel: a kernel module running in a virtualized environment.
Host Kernel: a kernel module running in the host.
Admin Queue: a queue for issuing management requests.
IO Queue: a queue for issuing IOs.
And qid: a queue identity queue identifier.
virtio: an I/O para-virtualization solution is a set of programs for virtualization of general I/O devices, and is an abstraction of a group of general I/O devices in a para-virtualization Hypervisor.
virtio-blk: an implementation of a virtual disk.
And v host: a high-performance virtio back-end implementation scheme is provided, generally, a virtio back-end driver is implemented in qemu of a user space, and vhost is implemented in a host kernel, so that unnecessary context switching and data copying can be reduced.
GPA: guest Physical Address, virtual machine Physical Address.
HPA: host Physical Address, Host Physical Address.
In order to facilitate those skilled in the art to understand the technical solutions provided in the embodiments of the present application, the following description is provided for the related technologies:
with the rapid development of scientific technology, users have higher and higher requirements on the performance of storage devices, and in some scenes requiring high-performance storage, a local SSD disk of an NVMe device is generally used for data storage, so that the local disk not only can provide higher storage performance, but also has greater advantage in data storage cost compared with a cloud disk.
In order to further improve the utilization rate of hardware resources, a plurality of application data can be mixed in one machine, and the application data can generally run in a container or a safety container because the two application data cannot interfere with each other or interfere with each other as little as possible. For the container, sharing the local disk is convenient to implement, but for the secure container, because the isolation of the secure container is high, at this time, data access is performed between the Virtual Machine and the NVMe device through a software implementation manner (for example, Virtual-blk), specifically, data communication is performed between the Virtual Machine and the NVMe storage device through a Virtual Machine Manager (VMM), however, since the data read-write operation needs to be forwarded through the VMM, performance and efficiency of data processing are reduced. In addition, if direct communication is performed between the NVMe devices and the virtual machine, since one NVMe device can only be connected to one secure container by communication, one NVMe device cannot share the devices, which is not beneficial to improving the utilization rate of hardware resources in the NVMe devices.
In order to solve the above technical problems, the related art provides a technical solution for implementing the SRIOV function through the NVMe Switch chip, however, the above technical solution needs to add additional hardware devices, and especially when a plurality of NVMe storage devices need to be deployed in a plurality of computer rooms, one NVMe Switch chip needs to be configured in each computer room, which not only increases the hardware cost, but also increases the complexity of deploying the NVMe storage devices, and is poor in practicability.
In order to solve the above technical problem, the embodiment provides a virtualization method for a non-volatile high-speed transmission bus NVMe device, where the virtualization method for the NVMe device can establish a virtual NVMe device corresponding to the NVMe device in a virtual machine, implement a virtualization operation of the NVMe device, and then can implement a queue pass-through operation between the NVMe device and the virtual machine by using the virtual NVMe device, so that not only is a performance advantage of hardware queue pass-through ensured, but also since the virtual NVMe device is located in a security container in the virtual machine, hardware resources are isolated.
Specifically, the execution subject of the virtualization method may include a virtual machine and a management node, and is shown in fig. 1:
the management node is configured to manage and control an NVMe queue in the NVMe device, and in some scenarios, the management node may be implemented as a Host Kernel module (i.e., Host Kernel), and the management node may be connected to the NVMe device through a PCIe bus. Specifically, the management node may include:
the blk driving module is used for driving the NVMe equipment;
the PCI NVMe driving module is used for realizing PCI device initialization and NVMe device initialization, and when the PCI device is initialized, a plurality of IO queues can be created in the NVMe device so as to realize IO access operation based on the created IO queues;
the NVMe-VFIO module is used for packaging and abstracting the NVMe queue in the NVMe equipment, specifically, the IO queue can be separated from management driven by the NVMe, and then the separated IO queue is organized and packaged again. Meanwhile, IO queue information is transmitted to a user mode by using the NVMe VFIO module, so that a virtual machine management module in the virtual machine can access and use the queues, and the IO queue information can comprise address information, length information, depth information, doorbell register addresses, queue ID information and the like.
In addition, the management node may further include an IOMMU driver module, where the IOMMU driver module is configured to manage a preconfigured IOMMU mapping table, the IOMMU mapping table may be obtained by performing resource configuration operation on an IO queue separated by the management node, the IOMMU mapping table is configured to allocate different IO queues to different virtual machines, GPAs corresponding to different IO queues are different, and the IOMMU mapping table may include a mapping relationship between a GPA in the same IO queue and an HPA.
For example, 128I 0 queues may be included in the NVMe device, usage and access operations of a small part (2 or 3) of the 128 IO queues may be retained at the management node, and other IO queues (about 100 or 120) may be allocated to the virtual machines, specifically, different IO queues may be allocated to different virtual machines based on the IOMMU mapping table, for example: allocate 24 IO queues for virtual machine 1, 48 IO queues for virtual machine 2, and so on.
It should be noted that the number of NVMe-VFIO modules in a management node may be one or more, when the number of NVMe-VFIO modules is one, one NVMe-VFIO module may correspond to one or more virtual machine instances, and when the number of NVMe-VFIO modules is multiple, multiple NVMe-VFIO modules may correspond to multiple virtual machine instances, respectively.
The virtual machine can be in communication connection with the management node, the enhanced PCI NVMe drive module is obtained by modifying the NVMe drive module, and then virtual NVMe equipment (namely NVMe simulation equipment) can be established in the scene of the security container through the enhanced PCI NVMe drive module. Specifically, the virtual machine may include: the virtual machine management module is used for realizing the establishing operation of the virtual NVMe device, and the enhanced PCI NVMe driving module is used for driving the virtual NVMe device to run.
Specifically, when the virtual machine management module implements the establishing operation of the virtual NVMe device, the NVMe queue provided by the management node needs to be encapsulated into a complete NVMe device, so that a PCIe configuration space and an NVMe controller register need to be simulated, and processing of the NVMe management queue and the command needs to be simulated. And finally, providing a complete abstraction of the NVMe device for the virtual machine. In addition
When the virtual NVMe drive is established, hardware configuration information of the NVMe device may be acquired, where the hardware configuration information may include a space size, and a virtual NVMe device corresponding to the NVMe device is established based on the space size, and specifically, the space size of the established virtual NVMe device may be consistent with a space size allocated to the virtual machine by the NVMe device.
Based on the virtual machine and the management node, the virtualization method of the NVMe device of the nonvolatile high-speed transmission bus in this embodiment may include:
step 1: the method comprises the steps that a blk driving module and a PCI NVMe driving module in a management node are used for controlling NVMe equipment to carry out initialization operation, so that the NVMe equipment creates an IO queue and a management queue.
When the initialization operation of the PCI configuration space is performed in the NVMe device, the number of IO queues created in the NVMe device may be multiple, for example, as shown in fig. 1, the multiple IO queues may include three IO queues.
Step 2: and obtaining IO queues capable of being provided in the NVMe equipment by using the NVMe-VFIO module, and carrying out encapsulation operation on the IO queues so that a virtual machine management module in the virtual machine can access and use the queues.
And step 3: and performing a queue allocation operation on the obtained IO queue and all the virtual machines based on an IOMMU mapping table configured in advance by the IOMMU driving module.
For example, for the existing IO queue 1, IO queue 2, and IO queue 3, the IO queue 2 may be allocated as the virtual machine 1 through the IOMMU mapping table, and the IO queue 3 may be allocated to the virtual machine 2, so that the allocation operation of all the IO queues and all the virtual machines that can be provided by the NVMe device through one IOMMU mapping table is effectively realized, and thus all the hardware resources of the NVMe device are conveniently managed.
It should be noted that, because the IOMMU mapping table may use a uniformly coded Address, in the process of issuing an IO request, one NVMe device may receive an IO request of a management node or multiple virtual machines, where the IO request uses a virtual machine Physical Address (GPA) or a Host Physical Address (HPA), and then may operate a memory of the management node or memories of different virtual machines.
For the GPAs or HPAs described above, in some scenarios, there may be an overlapping region between the GPAs or HPAs corresponding to different IO queues, which may cause the NVMe device to access wrong data. In order to solve the technical problem, the following scheme can be adopted: all the virtual machines manage the IO queues corresponding to all the virtual machines by using the IOMMU mapping table in the management node, and specifically, register the memory mapping of the virtual machines into the IOMMU mapping table of the management node; GPAs in different virtual machines are configured to use different value ranges and are distinguished from HPAs used by the management node.
In specific implementation, the NVMe-VFIO module is used for registering the memory mapping of the virtual machine to the IOMMU mapping table used by the management node. Meanwhile, a part of address space is reserved in the management node, a global resource manager is introduced to solve the problem of address space overlapping, and GPA address ranges used by each virtual machine are uniformly distributed by the resource manager, so that the condition of address GPA overlapping is avoided.
Specifically, the address space in the NVMe device may be divided into different LBA intervals, each LBA interval belongs to one virtual machine for use, and each virtual machine submits a request through the allocated pass-through queue. Because the hardware queue allocated by the NVMe device does not have partition attributes, which means that a request in any IO queue can operate all LBA intervals of the NVMe disk, different virtual machines can actually operate LBA intervals that do not belong to the virtual machine. In order to avoid this situation, when the virtual machine issues an IO request, the LBA space that the virtual machine can operate may be limited within a certain range, so that the virtual machine can only sense the LBA address range that can be used and perform security check. In addition, in the process of creating the queue by the NVMe device, a queue id may be configured, because the queue id corresponds to a register address, and the queue id used by the virtual machine is started from 0 by default, but the queue id actually allocated to the virtual machine is not necessarily started from 0, and a mapping relationship between the qid of the virtual machine and the real qid may be configured by the resource management module.
For example, referring to fig. 2, the NVMe device corresponds to a logical block address, the size of the logical block area is 1T, and then for the NVMe device, a part of the address space may be reserved, and the reserved part of the address space may be 0-4K. The address space between 4K and 1T may then be mapped to addresses between virtual machines.
The hardware queues qpair0-1-2 and qpair3-4-5-6 can be obtained by the kernel node, wherein the address space corresponding to the hardware queues qpair0-1-2 is 4K-500G, and the address space corresponding to the hardware queues qpair3-4-5-6 is 500G-1T, and then the hardware queues qpair0-1-2 and qpair3-4-5-6 can be allocated to the virtual machines 1 and 2 based on the IOMMU mapping table in the resource management module, so that different hardware queues can be allocated to different virtual machines, and the resource management module can include the mapping relationship between the addresses in the virtual machines and the addresses in the NVMe devices.
And 4, step 4: when the virtual machine is in communication connection with the NVMe device, the virtual machine may perform a creation operation of the virtual NVMe device.
And 5: obtaining an IO queue distributed by NVMe equipment for a virtual machine through a virtual machine management module in the virtual machine; and directly determining the obtained IO queue as the IO queue for establishing the virtual NVMe device.
Step 6: and generating a virtual PCI configuration space and a virtual management queue corresponding to the NVMe device through the virtual machine management module, wherein the virtual PCI configuration space and the virtual management queue can be configured in the security container.
And 7: acquiring hardware configuration information corresponding to the NVMe device, utilizing the enhanced PCI NVMe driver, and establishing the virtual NVMe device based on the hardware configuration information, the virtual PCI configuration space, the virtual management queue and the I0 queue.
Referring to fig. 3, after the virtual NVMe device is established, the method in this embodiment may further include initializing the virtual NVMe device through a virtual machine management module in the virtual machine, and when the virtual machine is started, the virtual NVMe driver may be called to initialize the virtual NVMe device, which may specifically include:
step S11: when the virtual machine is detected to be started, the virtual machine sends a PCI configuration request and an NVMe configuration request to a virtual machine management module through a virtual NVMe drive, the virtual machine management module reads and writes a PCI configuration space based on the PCI configuration request, and reads and writes an NVMe controller register based on the NVMe configuration request, so that initialization of an NVMe controller, configuration management queue information, configuration interrupt information and the like can be realized, and the virtual NVMe device can be used.
Step S12: the virtual machine management module records configuration information of the virtual machine, for example: managing queues, interrupt information. When the management queue information and the interrupt information are configured, the management queue information and the interrupt information can be sent to the management node, so that the management node can acquire the configuration information.
Step S13: the virtual machine issues an NVMe management command to the virtual machine management module through the management queue, and the virtual machine management module performs specific virtual NVMe initialization operation based on the NVMe management command, where the initialization operation may include: create queues, configure feature information, configure authentication information, and the like.
Step S14: the virtual machine management module may perform corresponding simulation execution operation based on the received NVMe management command, obtain a simulation execution result, and return the simulation execution result to the virtual machine, thereby completing the initialization operation of the virtual NVMe device.
Specifically, after one virtual NVMe device is implemented in the virtual machine through the virtual machine management module, corresponding data processing operations may be performed based on the virtual NVMe device. The virtual machine management module can provide simulation of a device configuration space for the virtual machine and process all management commands. Because a plurality of virtual machines can share the same NVMe device, in order to improve the quality and efficiency of data processing, when different virtual machines generate data processing requests corresponding to the NVMe device, the management operation on the NVMe device cannot be directly issued to the NVMe device, the management operation can be intercepted by a virtual machine management module, and then the virtual machine management module simulates NVMe hardware to process the data processing requests, for example, for creating SQ/CQ commands, the virtual machine management module is required to perform conversion processing so as to take queue information from the NVMe-VFIO device and return the queue information to the virtual machines; for a data processing request to be issued to the NVMe device, forwarding may be performed, for example: for an interrupt command (Abort), the virtual machine management module is required to forward to the NVMe device directly; for the devices which do not need to be sent to the NVMe device, the execution can be directly simulated in the virtual machine management module, for example: for the management command of identity authentication or characteristic information acquisition, direct simulation operation can be performed through the virtual machine management module.
After initializing the virtual NVMe device, when the virtual machine is in communication connection with the NVMe device, the method in this embodiment may further include performing data processing operation based on the virtual NVMe device, and specifically, the method may include:
step S21: the virtual machine generates a data processing request corresponding to the NVMe device.
Step S22: when the data processing request is an IO queue request, the virtual machine may directly access the virtual NVMe device based on the IO queue request, and since the virtual NVMe device corresponds to the NVMe device, the access operation of the virtual machine to the virtual NVMe device is equivalent to the direct access of the virtual machine to the NVMe device, thereby realizing the direct operation of the IO queue.
When the virtual machine issues the IO command to the NVMe device, after the IO command of the virtual machine is written onto the queue, the register of the NVMe device can be directly notified by accessing the virtual NVMe device, specifically, the virtual NVMe device can directly access the memory to acquire the request and execute the request.
Step S23: when the data processing request is a management queue request, the virtual machine can perform simulation processing on the management queue request through the virtual machine management module, so that a data processing result corresponding to the management queue request can be obtained; or, the virtual machine may send the management queue request to the virtual machine management module, and the virtual machine management module sends the management queue request to the NVMe device, so that a data processing result corresponding to the management queue request may be obtained.
In the process of data processing, the method in this embodiment may further include:
step S31: an interrupt request sent by the NVMe device is received.
Step S32: and when the interrupt request is an interrupt IO request, interrupting the executing IO operation based on the interrupt IO request.
Step S33: and when the interrupt request is an interrupt non-IO request, processing the interrupt non-IO request through the virtual machine management module so as to realize corresponding interrupt operation.
The interrupt request may include two types, one is to notify the virtual machine through an interrupt injection technology (a terminal technology of software) in the process of a completion message of a management request (non-IO request), that is, send the interrupt request to the virtual machine through a virtual machine management module in the virtual machine, so that the virtual machine performs an interrupt operation based on the interrupt request. The other is that in the process of the completion message of the IO request, the virtual machine is directly notified to perform the terminal through the hardware injection technology, for the management request, since the interrupt request is handled through the virtual machine management module, which is a software simulation process, the virtual machine needs to be notified through interrupt injection, and the IO request is directly generated by the NVMe device, so that the virtual machine can be directly notified after the NVMe device completes the terminal request.
The technical scheme provided by the embodiment effectively realizes the function of NVMe virtualization through a software simulation mode under the condition that the NVMe equipment does not support sharing and on the premise that data processing performance and storage performance are not lost, so that a plurality of virtual machines can efficiently share one piece of NVMe equipment which does not support sharing operation, and particularly, the scheme can directly connect an NVMe queue to the virtual machine, so that the virtual machine can directly issue an IO (input/output) request to the NVMe equipment and does not need to bypass to a VMM (virtual machine monitor) for processing, and the virtual machine can be directly informed when the NVMe equipment is completed, so that the number of nodes required to pass through in a data transmission link is reduced, and the performance and efficiency of data processing are improved; in addition, except that the transmission paths of the IO requests are different, the embodiment may also utilize the virtual machine management module to implement corresponding analog processing operations on the NVMe device to process various management requests issued in the virtual machine, implement the virtualization function on the NVMe disk, and further improve the practicability of the scheme.
Some embodiments of the invention are described in detail below with reference to the accompanying drawings. The features of the embodiments and examples described below may be combined with each other without conflict between the embodiments. In addition, the sequence of steps in each method embodiment described below is only an example and is not strictly limited.
Fig. 4 is a schematic flowchart of a virtualization method for a non-volatile fast transmission bus NVMe device according to an embodiment of the present application; referring to fig. 4, the embodiment provides a virtualization method for a non-volatile fast transmission bus NVMe device, where an execution main body of the method may be a virtualization apparatus of the NVMe device, and it can be understood that the virtualization apparatus of the NVMe device may be implemented as software or a combination of software and hardware. Specifically, the virtualization apparatus of the NVMe device may be implemented as a virtual machine, that is, the method may be applied to a virtual machine, and when the virtual machine executes a virtualization operation of the NVMe device on the non-volatile high-speed transmission bus, the method may include:
step S401: and acquiring a device establishing request, wherein the device establishing request is used for establishing virtual NVMe devices corresponding to the NVMe devices in the virtual machine.
Step S402: determining a first input/output (IO) queue for establishing the virtual NVMe device, wherein the first IO queue corresponds to a second IO queue in the NVMe device.
Step S403: and establishing virtual NVMe equipment corresponding to the NVMe equipment in the virtual machine based on the first IO queue and the equipment establishing request, wherein the virtual NVMe equipment is used for realizing communication connection between the virtual machine and the NVMe equipment.
The above steps are explained in detail below:
step S401: and acquiring a device establishing request, wherein the device establishing request is used for establishing virtual NVMe devices corresponding to the NVMe devices in the virtual machine.
The device creation request refers to a request for establishing a virtual NVMe device corresponding to the NVMe device in the virtual machine, and in some examples, the device establishment request may be a request actively generated by the virtual machine, for example: after the virtual machine is in communication connection with the NVMe device, a device establishment request can be automatically generated based on the communication connection state; alternatively, after the virtual machine is started, the device establishment request may be automatically generated based on the start state of the virtual machine; alternatively, after the virtual machine establishes the communication connection with the NVMe device, a device establishment request may be generated based on the transmission data between the virtual machine and the NVMe device, for example: when the virtual machine sends the IO request or the management request to the NVMe device, the device establishment request may be generated based on the IO request or the management request, and in some examples, the IO request or the management request may be directly determined as the device establishment request.
In other examples, the device establishment request may be generated based on a user action, such as: an interactive interface is displayed in the virtual machine, a user inputs execution operation through the interactive interface, and an equipment establishment request is generated based on the execution operation input by the user; or the virtual machine may be in communication connection with a third device, and the third device may generate a device establishment request and send the device establishment request to the virtual machine, so that the virtual machine may stably obtain the device establishment request.
Step S402: determining a first input/output (IO) queue for establishing the virtual NVMe device, wherein the first IO queue corresponds to a second IO queue in the NVMe device.
Because the establishment of the virtual NVMe device requires a hardware IO queue, after the device establishment request is acquired, a first IO queue for establishing the virtual NVMe device may be determined, and the determined first IO queue corresponds to a second IO queue in the NVMe device.
It should be noted that a plurality of second IO queues may be provided in the NVMe device, different second IO queues correspond to different address spaces, there is no overlapping address between any two second IO queues, and the determined first IO queue may correspond to at least a part of at least one second IO queue in the NVMe device, that is, a direct mapping relationship exists between the first IO queue and a part of the second IO queue, so that the same NVMe device may allocate different second IO queues for a plurality of virtual machines, thereby implementing the shared operation of the NVMe device.
Specifically, the embodiment does not limit the specific implementation manner for determining the first IO queue, and a person skilled in the art may configure the first IO queue according to a specific application scenario or an application requirement, for example: after the virtual machine is in communication connection with the NVMe device, the attribute information of the NVMe device is acquired, and the first IO queue is determined based on the attribute information. Or after the virtual machine is in communication connection with the NVMe device, a queue allocation table corresponding to the virtual machine may be acquired, and the first IO queue may be determined based on the queue allocation table.
Step S403: and establishing virtual NVMe equipment corresponding to the NVMe equipment in the virtual machine based on the first IO queue and the equipment establishing request, wherein the virtual NVMe equipment is used for realizing communication connection between the virtual machine and the NVMe equipment.
After the first IO queue and the device establishment request are acquired, a virtual NVMe device corresponding to the NVMe device may be established in the virtual machine based on the first IO queue and the device establishment request, and the virtual NVMe device is used for realizing communication connection between the virtual machine and the NVMe device. For example, when the virtual machine sends the IO request to the NVMe device, since the virtual NVMe device corresponds to the NVMe device, the virtual machine can implement a direct access operation on the NVMe device by accessing the virtual NVMe device, thereby implementing a pass-through operation of the IO queue.
In addition, the implementation manner of establishing the virtual NVMe device corresponding to the NVMe device in this embodiment is not limited, and those skilled in the art may set the virtual NVMe device according to a specific application scenario or an application requirement, for example: a machine learning model for generating the virtual NVMe device is trained in advance, and after the first IO queue is acquired, the first IO queue can be input into the machine learning model based on the device establishment request, so that the virtual NVMe device corresponding to the NVMe device can be generated, and the virtualization operation of the NVMe device is realized.
In the virtualization method of the NVMe device of the non-volatile high-speed transmission bus provided in this embodiment, the first input/output IO queue for establishing the virtual NVMe device is determined by obtaining the device establishment request, the obtained first IO queue corresponds to the second IO queue in the NVMe device, and then the first IO queue and the device establishment request may be based on, virtual NVMe equipment corresponding to the NVMe equipment is established in the virtual machine, so that the virtual operation of the NVMe equipment is effectively realized, then, the created virtual NVMe device can realize the direct communication of the IO request between the virtual machine and the NVMe device, thereby not only reducing the number of nodes required to pass through in a data transmission link, and the performance and the efficiency of data processing are improved, the utilization rate of hardware resources is further ensured, the practicability of the method is improved, and the method is favorable for popularization and application in the market.
Fig. 5 is a schematic flowchart illustrating a process of determining a first input/output IO queue for establishing a virtual NVMe device according to an embodiment of the present application; referring to fig. 5, this embodiment provides an implementation manner of determining a first IO queue, and specifically, determining the first input/output IO queue for establishing the virtual NVMe device in this embodiment may include:
step S501: and obtaining a second IO queue in the NVMe device through a virtual machine management module in the virtual machine.
Step S502: and determining the second IO queue as the first IO queue.
When the virtual machine is in communication connection with the NVMe device, the NVMe device can provide a plurality of second IO queues, and different virtual machines may allocate different second IO queues, for example: the virtual machine 1 may allocate the first two second IO queues, the virtual machine 2 may allocate the third second IO queue, and the like, so to accurately implement the allocation operation, the NVMe device is configured with the queue allocation mapping table corresponding to all the virtual machines, and then the virtual machine may obtain the second IO queue in the NVMe device through the virtual machine management module and the queue allocation mapping table. After the second IO queue is obtained, the second IO queue can be directly determined as the first IO queue, so that the stability and reliability of the generation of the first IO queue are effectively ensured.
In other examples, after determining the first input/output IO queue for establishing the virtual NVMe device, the method in this embodiment may further include: acquiring a first address space corresponding to a first IO queue in virtual NVMe equipment and a second address space corresponding to a second IO queue in the NVMe equipment; an address mapping table is established based on the first address space and the second address space.
For a virtual NVMe device, the starting address of the first IO queue tends to be 0, while the starting address of the second IO queue located in the NVMe device tends not to be 0, for example: the starting address of the second IO queue of the virtual NVMe device may be 50K, 100K, and so on, that is, the address space of the second IO queue in the NVMe device is different from the address space of the first IO queue in the virtual NVMe device, and therefore, in order to ensure the stability and reliability of the data processing operation, an address mapping table between the second IO queue and the first IO queue may be established. Specifically, a first address space corresponding to the first IO queue in the virtual NVMe device and a second address space corresponding to the second IO queue in the NVMe device may be obtained first, and then an address mapping table may be established based on the first address space and the second address space, where the address mapping table may implement an address conversion operation in the data processing request, that is, the virtual NVMe device address corresponding to the data processing request may be converted into an NVMe device address.
For example, when the virtual machine obtains an original processing request corresponding to data to be processed, in order to implement normal data processing operation, the original processing request may be analyzed and processed, and a first target address corresponding to the original processing request is determined, where the first target address corresponds to the virtual NVMe device; and then, converting the first target address into a second target address by using an address mapping table, wherein the second target address corresponds to the NVMe device, and then generating a data processing request corresponding to the data to be processed based on the second target address, so that normal access operation on the NVMe device can be realized through the data processing request.
It should be noted that the address mapping table may include not only an address space corresponding to the first IO queue and an address space corresponding to the second IO queue, but also a queue identifier (i.e., a queue id) of the first IO queue and a queue identifier of the second IO queue, so that the analysis processing operation on the IO queue or the data processing request corresponding to the address space is performed based on the address mapping table.
In this embodiment, the second IO queue in the NVMe device is obtained through the virtual machine management module in the virtual machine, and then the second IO queue is determined as the first IO queue, thereby effectively ensuring the stability and reliability of determining the first IO queue.
Fig. 6 is a schematic flowchart of establishing a virtual NVMe device corresponding to an NVMe device in a virtual machine based on a first IO queue and a device establishment request provided in an embodiment of the present application; referring to fig. 6, this embodiment provides an implementation method for establishing a virtual NVMe device, and specifically, establishing a virtual NVMe device corresponding to an NVMe device in a virtual machine based on a first IO queue and a device establishment request in this embodiment may include:
step S601: and generating a virtual Peripheral Component Interconnect (PCI) configuration space and a virtual management queue corresponding to the NVMe device in the virtual machine based on the device establishment request and the virtual machine management module.
After the device establishment request is obtained, a virtual PCI configuration space and a virtual management queue corresponding to the NVMe device may be generated in the virtual machine based on the device establishment request and the virtual machine management module, where a specific implementation manner for generating the virtual PCI configuration space and the virtual management queue is not limited in this embodiment, and in some examples, the virtual PCI configuration space and the virtual management queue are randomly generated based on the device establishment request and the virtual machine management module. In other examples, generating a virtual peripheral interconnect bus device PCI configuration space in the virtual machine corresponding to the NVMe device may include: acquiring hardware configuration information corresponding to NVMe equipment; and generating a virtual PCI configuration space corresponding to the NVMe device in the virtual machine based on the hardware configuration information.
When the virtual machine is in communication connection with the NVMe device, hardware configuration information corresponding to the NVMe device may be acquired, where the hardware configuration information may include a space size allocated by the NVMe device for the virtual machine, and in addition, the hardware configuration information may include not only the space size but also other configuration information, for example: after the hardware configuration information is acquired, the hardware configuration information can be analyzed and processed, so that a virtual PCI configuration space corresponding to the NVMe device is generated in the virtual machine, when the virtual NVMe device is established based on the generated virtual PCI configuration space, the size of the established space of the virtual NVMe device is the same as the size of the space allocated to the virtual machine by the NVMe device, and the corresponding relationship between the virtual NVMe device and the NVMe device is further ensured.
Step S602: and generating the virtual NVMe device based on the first IO queue, the virtual PCI configuration space and the virtual management queue.
After the first IO queue, the virtual PCI configuration space, and the virtual management queue are obtained, the first IO queue, the virtual PCI configuration space, and the virtual management queue may be encapsulated, so that the virtual NVMe device may be stably generated.
In this embodiment, a virtual PCI configuration space and a virtual management queue corresponding to the NVMe device are generated in the virtual machine based on the device establishment request and the virtual machine management module, and then the virtual NVMe device can be stably generated based on the first IO queue, the virtual PCI configuration space, and the virtual management queue, so that the quality and efficiency of generating the virtual NVMe device are effectively ensured, and the practicability of the method is further improved.
Fig. 7 is a schematic flowchart of another virtualization method for a non-volatile fast transmission bus NVMe device according to an embodiment of the present application; referring to fig. 7, after a virtual NVMe device corresponding to an NVMe device is established in a virtual machine, in order to ensure stable reliability of operation of the method, the method in this embodiment may further include:
step S701: and acquiring an initialization request of the virtual NVMe device.
After the virtual NVMe device is established, in order to perform application operation on the virtual NVMe device, an initialization operation may be performed on the virtual NVMe device, specifically, in order to perform the initialization operation on the virtual NVMe device, an initialization request of the virtual NVMe device may be acquired, and in some examples, the initialization request may be automatically generated by a virtual machine, for example: after detecting that a virtual NVMe device has been established in the virtual machine, a device establishment request may then be automatically generated. In other examples, the initialization request may be generated based on a user action, such as: an interactive interface is displayed in the virtual machine, a user inputs execution operation through the interactive interface, and an initialization request is generated based on the execution operation input by the user; or the virtual machine may be in communication connection with a third device, and the third device may generate an initialization request and send the initialization request to the virtual machine, so that the virtual machine can stably obtain the initialization request.
Step S702: and performing initialization configuration operation on the virtual NVMe device through a virtual machine management module in the virtual machine based on the initialization request.
After the initialization request is obtained, an initialization configuration operation may be performed on the virtual NVMe device through a virtual machine management module in the virtual machine, where the initialization configuration operation of the virtual NVMe device is similar to the implementation manner and the implementation effect corresponding to fig. 3 in the foregoing embodiment, and reference may be specifically made to the above statements, and details are not repeated here.
In this embodiment, the method ensures the practicability by acquiring the initialization request of the virtual NVMe device, then performing initialization configuration operation on the virtual NVMe device through the virtual machine management module in the virtual machine based on the initialization request, and then performing corresponding data processing operation by using the initialized and configured virtual NVMe device.
Fig. 8 is a schematic flowchart of a virtualization method for a non-volatile fast transmission bus NVMe device according to an embodiment of the present application; referring to fig. 8, this embodiment provides a method for performing data processing operation based on an established virtual NVMe device, and specifically, the method may further include:
step S801: and acquiring a data processing request corresponding to the NVMe device.
The data processing request may include an IO request and a non-IO request, the non-IO request may include a query request, an authentication request, and the like, and the data processing request may be generated based on an execution operation input by a user or sent by another device, for example: an interactive interface is displayed in the virtual machine, a user inputs execution operation through the interactive interface, and a data processing request is generated based on the execution operation input by the user; or the virtual machine may be in communication connection with a third device, and the third device may generate a data processing request and send the data processing request to the virtual machine, so that the virtual machine may stably obtain the data processing request.
In other examples, obtaining the data processing request corresponding to the NVMe device may include: acquiring an original processing request corresponding to data to be processed; determining a first target address corresponding to the original processing request, wherein the first target address corresponds to the virtual NVMe device; converting the first target address into a second target address, wherein the second target address corresponds to the NVMe device; and generating a data processing request corresponding to the data to be processed based on the second target address.
Specifically, when there is a data processing requirement corresponding to the data to be processed, an original processing request corresponding to the data to be processed may be obtained, where the original processing request may include an original address and a first target address corresponding to the data to be processed, and since the first target address corresponds to the virtual NVMe device, in order to enable normal data processing operations between the virtual machine and the NVMe device, the original processing request may be analyzed to determine the first target address corresponding to the original processing request, after the first target address is obtained, the first target address may be converted into a second target address by using a preconfigured address configuration table, the second target address corresponds to the NVMe device, and then the data processing request corresponding to the data to be processed may be generated based on the second target address, so that it is effectively achieved that an address corresponding to the virtual NVMe device in the original processing request may be converted into a data processing request corresponding to the NVMe device And preparing corresponding addresses, so that normal data access operation can be carried out based on the data processing request.
For example, the virtual machine may generate an original processing request based on the data a, where the original processing request may include an original address add1 and a first target address add _2 corresponding to the data a, where the first target address add _2 may be an address B in the virtual NVMe device, and the address B corresponds to an address F in the NVMe device, so that, in order to enable a normal data processing operation between the virtual machine and the NVMe device, the first target address add _2 may be converted into a second target address add _2 ', and the second target address add _2 ' corresponds to the address F in the NVMe device, and thus, the data processing request corresponding to the original processing request may be generated based on the second target address add _2 '.
Step S802: processing the data processing request based on the virtual NVMe device to obtain a data processing result corresponding to the processing request; or processing the data processing request through the virtual machine management module to obtain a data processing result corresponding to the data processing request.
After the data processing request is obtained, the data processing request can be analyzed and processed based on the virtual NVMe device to obtain a data processing result corresponding to the data processing request; or processing the data processing request through the virtual machine management module to obtain a data processing result corresponding to the data processing request.
It should be noted that, because the data processing request may correspond to different request types, and the data processing requests of different request types may correspond to different data processing operations, in some examples, for a data processing request that needs to be issued to the NVMe device, the virtual NVMe device may be directly accessed based on the data processing request, specifically, when the data processing request is an IO request, processing the data processing request based on the virtual NVMe device may include: and when the data processing request is an IO request, obtaining a data processing result corresponding to the IO request by accessing the virtual NVMe device.
Specifically, when the data processing request is an IO request, the virtual NVMe device may be directly accessed, and since the virtual NVMe device corresponds to the NVMe device, accessing the virtual NVMe device is equivalent to directly accessing the NVMe device, so that the data processing result corresponding to the IO request may be quickly and directly obtained.
In other examples, processing the data processing request by the virtual machine management module may include: when the data processing request is a non-IO request, performing simulation processing operation on the non-IO request by using a virtual machine management module to obtain a data processing result corresponding to the data processing request; or when the data processing request is a non-IO request, the virtual machine management module is used to send the non-IO request to the NVMe device, so that the non-IO request is processed by the NVMe device, and a data processing result corresponding to the data processing request is obtained.
Specifically, when the data processing request is a non-IO request, the virtual machine management module may be used to perform a simulation processing operation on the non-IO request, so as to obtain a data processing result corresponding to the data processing request. Or when the data processing request is a non-IO request, the virtual machine management module may be used to send the non-IO request to the NVMe device, so that for the data processing request that needs to be sent to the NVMe device, the non-IO request may be forwarded to the NVMe device by the NVMe device, so that the NVMe device processes the non-IO request, and a data processing result corresponding to the data processing request may be obtained.
In this embodiment, a data processing result corresponding to the processing request is obtained by obtaining a data processing request corresponding to the NVMe device and then processing the data processing request based on the virtual NVMe device; or, the data processing request is processed through the virtual machine management module to obtain a data processing result corresponding to the data processing request, so that different data processing operations can be effectively adopted for different types of data processing requests, and the flexibility, reliability and stability of the data processing operations are improved.
Fig. 9 is a schematic flowchart of a virtualization method for a non-volatile fast transmission bus NVMe device according to an embodiment of the present application; referring to fig. 9, in order to further improve the practicability of the method, the method in this embodiment may further include:
step S901: an interrupt request sent by the NVMe device is received.
During the data processing operation, an interrupt request sent by the NVMe device may be received, where the interrupt request is used to interrupt the data processing operation to be performed or the ongoing data processing operation between the virtual machine and the NVMe device.
Step S902: the data processing operation being performed is interrupted based on the interrupt request.
Because the data processing request may correspond to different request types, when the data processing request of a different request type obtains the interrupt request, different data processing operations may be performed, and in some examples, interrupting the data processing operation being performed based on the interrupt request may include: when the interrupt request is an interrupt IO request, the executing IO operation may be interrupted based on the interrupt IO request; and when the interrupt request is an interrupt non-IO request, processing the interrupt non-IO request through the virtual machine management module so as to realize corresponding interrupt operation.
In this embodiment, by receiving the interrupt request sent by the NVMe device and then interrupting the data processing operation being executed based on the interrupt request, it is effectively achieved that the data processing operation between the virtual machine and the NVMe device can be interrupted based on the interrupt requirement of the user, and the practicability of the method is further improved.
Fig. 10 is a schematic flowchart of another virtualization method for a non-volatile fast transmission bus NVMe device according to an embodiment of the present application; referring to fig. 10, the embodiment provides a virtualization method for a non-volatile fast transmission bus NVMe device, where an execution main body of the method may be a virtualization apparatus of the NVMe device, and it is understood that the virtualization apparatus of the NVMe device may be implemented as software or a combination of software and hardware. In some examples, the virtualization apparatus of the NVMe device may be implemented as a management node, that is, the method may be applied to the management node, and when the management node executes the method, the method may include:
step S1001: and acquiring an access request of the virtual machine.
The access request is used for realizing access operation on the NVMe device, and when the access requirement exists, the access request of the virtual machine can be acquired. In some instances, the access request may be a request actively generated by the virtual machine, such as: after the virtual machine is in communication connection with the NVMe device, an access request can be automatically generated based on the communication connection state; or after the virtual machine is started, the access request may be automatically generated based on the starting state of the virtual machine, and then the virtual machine sends the generated access request to the management node, so that the management node can stably obtain the access request of the virtual machine. In other instances, the access request may be generated based on a user action, such as: an interactive interface is displayed in the management node, a user inputs execution operation through the interactive interface, and an access request is generated based on the execution operation input by the user; or the management node may be in communication connection with a third device, and the third device may generate an access request and send the access request to the management node, so that the management node can stably obtain the access request.
Step S1002: based on the access request, at least one second IO queue provided by the NVMe device is determined.
After the access request is acquired, at least one second IO queue provided by the NVMe device may be acquired based on the access request, and specifically, the management node may acquire the at least one second IO queue provided by the NVMe device through the NVMe device. In some examples, different second IO queues correspond to different address spaces, and there is no overlapping address between any two second IO queues.
Step S1003: and sending the at least one second IO queue to the virtual machine as a first IO queue so as to establish a virtual NVMe device corresponding to the NVMe device in the virtual machine based on the first IO queue.
After the at least one second IO queue is obtained, the at least one second IO queue may be sent to the virtual machine as a first IO queue, and then the virtual machine may establish a virtual NVMe device corresponding to the NVMe device in the virtual machine based on the first IO queue. In some examples, sending the at least one second IO queue to the virtual machine as the first IO queue may include: and randomly distributing different second IO queues for different virtual machines. In some other examples, sending the at least one second IO queue to the virtual machine as the first IO queue may include: acquiring a pre-configured queue configuration table, wherein the queue configuration table comprises queue information distributed for all virtual machines; determining a target second IO queue corresponding to the virtual machine in at least one second IO queue based on the queue configuration table; and sending the target second IO queue to the virtual machine as a first IO queue.
For example, when the NVMe device is communicatively connected with virtual machine 1, virtual machine 2, and virtual machine 3, the IO queues that the NVMe device can provide may include: the address space corresponding to the IO queue a is 1k to 4k, the address space corresponding to the IO queue b is 4k to 10G, and the address space corresponding to the IO queue c can be 10G to 100G. In the management node, an IO queue mapping table corresponding to virtual machine 1, virtual machine 2, and virtual machine 3 is preconfigured, where the IO queue mapping table may record an IO queue b allocated to virtual machine 1, an IO queue a allocated to virtual machine 2, an IO queue c allocated to virtual machine 3, and the like, and then at least one second IO queue may be sent to the corresponding virtual machine based on the IO queue mapping table, so that the virtual machine may use the second IO queue as a first IO queue, and then it is convenient to establish a virtual NVMe device based on the first IO queue, which is convenient to implement virtualization operation of the NVMe device.
In the virtualization method of the non-volatile high-speed transmission bus NVMe device provided by this embodiment, by obtaining an access request of a virtual machine, based on the access request, at least one second IO queue provided by the NVMe device is determined, and the at least one second IO queue is sent to the virtual machine as a first IO queue, so as to establish a virtual NVMe device corresponding to the NVMe device in the virtual machine based on the first IO queue, which effectively realizes that the NVMe device can establish the virtual NVMe device through the sent second IO queue, and then facilitates data communication with the virtual machine through the virtual NVMe device, and reduces the number of nodes that need to pass through in a data transmission link, thereby facilitating improvement of performance and efficiency of data processing, ensuring utilization rate of hardware resources, and further improving practicability of the method.
Fig. 11 is a schematic structural diagram of a virtualization apparatus of a non-volatile fast transmission bus NVMe device according to an embodiment of the present application; referring to fig. 11, this embodiment provides a virtualization apparatus of a non-volatile transfer-high-speed bus NVMe device, where the virtualization apparatus of the non-volatile transfer-high-speed bus NVMe device may be used to execute the virtualization method of the non-volatile transfer-high-speed bus NVMe device in fig. 4, in some examples, the virtualization apparatus of the non-volatile transfer-high-speed bus NVMe device may be implemented as a virtual machine, that is, the virtualization apparatus may be applied to the virtual machine, and the virtualization apparatus may include a first obtaining module 11, a first determining module 12, and a first processing module 13:
a first obtaining module 11, configured to obtain an apparatus establishing request, where the apparatus establishing request is used to establish a virtual NVMe apparatus corresponding to an NVMe apparatus in a virtual machine;
a first determining module 12, configured to determine a first input/output IO queue for establishing a virtual NVMe device, where the first IO queue corresponds to a second IO queue in the NVMe device;
the first processing module 13 is configured to establish, in the virtual machine, a virtual NVMe device corresponding to the NVMe device based on the first IO queue and the device establishment request, where the virtual NVMe device is used to implement communication connection between the virtual machine and the NVMe device.
In some examples, when the first determination module 12 determines the first input output IO queue for establishing the virtual NVMe device, the first determination module 12 is configured to perform: obtaining a second IO queue in the NVMe equipment through a virtual machine management module in the virtual machine; and determining the second IO queue as the first IO queue.
In some examples, the first obtaining module 11 and the first processing module 13 in this embodiment are configured to perform the following steps:
a first obtaining module 11, configured to obtain a first address space corresponding to a first input/output (IO) queue in the virtual NVMe device of the first IO queue and a second address space corresponding to a second IO queue in the NVMe device after determining the first IO queue;
the first processing module 13 is configured to establish an address mapping table based on the first address space and the second address space.
In some examples, when the first processing module 13 establishes a virtual NVMe device corresponding to the NVMe device in the virtual machine based on the first IO queue and the device establishment request, the first processing module 13 is configured to perform: generating a virtual Peripheral Component Interconnect (PCI) bus device configuration space and a virtual management queue corresponding to the NVMe device in the virtual machine based on the device establishment request and the virtual machine management module; and generating the virtual NVMe device based on the first IO queue, the virtual PCI configuration space and the virtual management queue.
In some examples, when the first processing module 13 generates a virtual peripheral interconnect bus device PCI configuration space corresponding to the NVMe device in the virtual machine, the first processing module 13 is configured to perform: acquiring hardware configuration information corresponding to NVMe equipment; and generating a virtual PCI configuration space corresponding to the NVMe device in the virtual machine based on the hardware configuration information.
In some examples, the hardware configuration information includes a size of space allocated by the NVMe device for the virtual machine, the size of space of the virtual NVMe device being the same as the size of space allocated by the NVMe device for the virtual machine.
In some examples, the first obtaining module 11 and the first processing module 13 in this embodiment are configured to perform the following steps:
a first obtaining module 11, configured to obtain an initialization request of a virtual NVMe device after the virtual NVMe device corresponding to the NVMe device is established in a virtual machine;
the first processing module 13 is configured to perform initialization configuration operation on the virtual NVMe device through a virtual machine management module in the virtual machine based on the initialization request.
In some examples, the first obtaining module 11 and the first processing module 13 in this embodiment are configured to perform the following steps:
a first obtaining module 11, configured to obtain a data processing request corresponding to the NVMe device;
the first processing module 13 is configured to process the data processing request based on the virtual NVMe device to obtain a data processing result corresponding to the processing request; or processing the data processing request through the virtual machine management module to obtain a data processing result corresponding to the data processing request.
In some examples, when the first obtaining module 11 obtains the data processing request corresponding to the NVMe device, the first obtaining module 11 is configured to perform: acquiring an original processing request corresponding to data to be processed; determining a first target address corresponding to the original processing request, wherein the first target address corresponds to the virtual NVMe device; converting the first target address into a second target address, wherein the second target address corresponds to the NVMe device; and generating a data processing request corresponding to the data to be processed based on the second target address.
In some examples, when the first processing module 13 processes the data processing request based on the virtual NVMe device to obtain a data processing result corresponding to the data processing request, the first processing module 13 is configured to perform: and when the data processing request is an IO request, obtaining a data processing result corresponding to the IO request by accessing the virtual NVMe device.
In some examples, when the first processing module 13 processes the data processing request through the virtual machine management module, the first processing module 13 is configured to perform: when the data processing request is a non-IO request, performing simulation processing operation on the non-IO request by using a virtual machine management module to obtain a data processing result corresponding to the data processing request; or when the data processing request is a non-IO request, the virtual machine management module is used to send the non-IO request to the NVMe device, so that the non-IO request is processed by the NVMe device, and a data processing result corresponding to the data processing request is obtained.
In some examples, the first obtaining module 11 and the first processing module 13 in this embodiment are configured to perform the following steps:
a first obtaining module 11, configured to receive an interrupt request sent by an NVMe device;
a first processing module 13 for interrupting the data processing operation being performed based on the interrupt request.
In some examples, when the first processing module 13 interrupts a data processing operation being performed based on an interrupt request, the first processing module 13 is configured to perform: when the interrupt request is an interrupt IO request, interrupting the executing IO operation based on the interrupt IO request; and when the interrupt request is an interrupt non-IO request, processing the interrupt non-IO request through the virtual machine management module so as to realize corresponding interrupt operation.
The apparatus shown in fig. 11 can perform the method of the embodiment shown in fig. 1-9, and the detailed description of this embodiment can refer to the related description of the embodiment shown in fig. 1-9. The implementation process and technical effect of the technical solution refer to the descriptions in the embodiments shown in fig. 1 to 9, and are not described herein again.
In one possible design, the structure of the virtualization apparatus of the non-volatile fast transmission bus NVMe device shown in fig. 11 may be implemented as an electronic device, which may be a mobile phone, a tablet computer, a server, a virtual machine, or other various devices. As shown in fig. 12, the electronic device may include: a first processor 21 and a first memory 22. The first memory 22 is used for storing a program of a corresponding electronic device to execute the virtualization method of the NVMe device of the nonvolatile transport high speed bus provided in the embodiments shown in fig. 1 to 9, and the first processor 21 is configured to execute the program stored in the first memory 22.
The program comprises one or more computer instructions, wherein the one or more computer instructions, when executed by the first processor 21, are capable of performing the steps of: and acquiring a device establishing request, wherein the device establishing request is used for establishing virtual NVMe devices corresponding to the NVMe devices in the virtual machine. Determining a first input/output (IO) queue for establishing the virtual NVMe device, wherein the first IO queue corresponds to a second IO queue in the NVMe device. And establishing virtual NVMe equipment corresponding to the NVMe equipment in the virtual machine based on the first IO queue and the equipment establishing request, wherein the virtual NVMe equipment is used for realizing communication connection between the virtual machine and the NVMe equipment.
Further, the first processor 21 is also used to execute all or part of the steps in the embodiments shown in fig. 1-9.
The electronic device may further include a first communication interface 23 for communicating with other devices or a communication network.
In addition, the embodiment of the present invention provides a computer storage medium for storing computer software instructions for an electronic device, which includes a program for executing the virtualization method of the NVMe device of the nonvolatile high speed transport bus in the method embodiments shown in fig. 1 to 9.
Furthermore, an embodiment of the present invention provides a computer program product, including: computer instructions, which when executed by one or more processors, cause the one or more processors to perform the steps in the virtualization method of the non-volatile transport high speed bus NVMe device in the method embodiments of fig. 1-9 described above.
Fig. 13 is a schematic structural diagram of a virtualization apparatus of a non-volatile fast transmission bus NVMe device according to an embodiment of the present application; referring to fig. 13, this embodiment provides a virtualization apparatus for a non-volatile cache bus NVMe device, where the virtualization apparatus may perform the virtualization method for the non-volatile cache bus NVMe device shown in fig. 10, and the virtualization apparatus is applied to a management node, and specifically, the virtualization apparatus may include: the second obtaining module 31, the second determining module 32, and the second processing module 33:
a second obtaining module 31, configured to obtain an access request of a virtual machine;
a second determining module 32, configured to determine, based on the access request, at least one second IO queue provided by the NVMe device;
the second processing module 33 is configured to send the at least one second IO queue to the virtual machine as a first IO queue, so as to establish a virtual NVMe device corresponding to the NVMe device in the virtual machine based on the first IO queue.
In some examples, when the second processing module 33 sends at least one second IO queue to the virtual machine as the first IO queue, the second processing module 33 is configured to perform: acquiring a pre-configured queue configuration table, wherein the queue configuration table comprises queue information distributed for all virtual machines; determining a target second IO queue corresponding to the virtual machine in at least one second IO queue based on the queue configuration table; and sending the target second IO queue to the virtual machine as a first IO queue.
In some examples, different second IO queues correspond to different address spaces, and there is no overlapping address between any two second IO queues.
The apparatus shown in fig. 14 can perform the method of the embodiments shown in fig. 1-3 and 10, and the related description of the embodiments shown in fig. 1-3 and 10 can be referred to for the part not described in detail in this embodiment. The implementation process and technical effect of the technical solution are described in the embodiments shown in fig. 1-3 and fig. 10, and are not described again here.
In one possible design, the structure of the virtualization apparatus of the non-volatile fast transmission bus NVMe device shown in fig. 14 may be implemented as an electronic device, which may be a mobile phone, a tablet computer, a server, a management apparatus of the NVMe device, and the like. As shown in fig. 15, the electronic device may include: a second processor 41 and a second memory 42. The second memory 42 is used for storing a program of a corresponding electronic device to execute the virtualization method of the non-volatile fast transmission bus NVMe device provided in the embodiments shown in fig. 1-3 and 10, and the second processor 41 is configured to execute the program stored in the second memory 42.
The program comprises one or more computer instructions, wherein the one or more computer instructions, when executed by the second processor 41, are capable of performing the steps of: acquiring an access request of a virtual machine; determining at least one second IO queue provided by the NVMe device based on the access request; and sending the at least one second IO queue to the virtual machine as a first IO queue so as to establish a virtual NVMe device corresponding to the NVMe device in the virtual machine based on the first IO queue.
Further, the second processor 41 is also used to execute all or part of the steps in the embodiments shown in fig. 1-3 and 10.
The electronic device may further include a second communication interface 43 for communicating with other devices or a communication network.
In addition, the embodiment of the present invention provides a computer storage medium for storing computer software instructions for an electronic device, which includes a program for executing the virtualization method of the NVMe device of the nonvolatile high speed transport bus in the method embodiments shown in fig. 1 to 3 and 10.
Furthermore, an embodiment of the present invention provides a computer program product, including: computer instructions, which when executed by one or more processors, cause the one or more processors to perform the steps in the virtualization method of the non-volatile transport high speed bus NVMe device in the method embodiments shown in fig. 1-3 and 10.
Fig. 15 is a schematic structural diagram of a virtualization system of a non-volatile fast transmission bus NVMe device according to an embodiment of the present application; referring to fig. 15, the present embodiment provides a virtualization system of a non-volatile transport high speed bus NVMe device, where the virtualization system is configured to implement a virtualization operation of the NVMe device, and in particular, the virtualization system may include:
the virtual machine 51: for generating an access request corresponding to the NVMe device 53;
the management node 52 is in communication connection with the virtual machine 51, and is configured to acquire an access request, determine at least one second input/output I0 queue provided by the NVMe device 53 based on the access request, and send the at least one second IO queue to the virtual machine 51 as a first IO queue;
the virtual machine 51 is configured to determine a first IO queue used for establishing a virtual NVMe device, where the first IO queue corresponds to a second IO queue in the NVMe device 53; and establishing a virtual NVMe device corresponding to the NVMe device 53 in the virtual machine 51 based on the first IO queue and the access request, wherein the virtual NVMe device is used for realizing communication connection between the virtual machine 51 and the NVMe device 53.
The virtual machine 51 and the management node 52 in the system shown in fig. 15 may execute the method steps corresponding to the virtual machine and the management node in the embodiments shown in fig. 1 to 10, and reference may be made to the related description of the embodiments shown in fig. 1 to 10 for a part not described in detail in this embodiment. The implementation process and technical effect of the technical solution refer to the descriptions in the embodiments shown in fig. 1 to fig. 10, and are not described herein again.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by adding a necessary general hardware platform, and of course, can also be implemented by a combination of hardware and software. With this understanding in mind, the above-described technical solutions and/or portions thereof that contribute to the prior art may be embodied in the form of a computer program product, which may be embodied on one or more computer-usable storage media having computer-usable program code embodied therein (including but not limited to disk storage, CD-ROM, optical storage, etc.).
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

Claims (14)

1. A virtualization method of a non-volatile high-speed transmission bus (NVMe) device is applied to a virtual machine, and comprises the following steps:
acquiring an equipment establishing request, wherein the equipment establishing request is used for establishing virtual NVMe equipment corresponding to the NVMe equipment in the virtual machine;
determining a first input/output (IO) queue for establishing the virtual NVMe equipment, wherein the first IO queue corresponds to a second IO queue in the NVMe equipment;
based on the first IO queue and the device establishment request, establishing a virtual NVMe device corresponding to the NVMe device in the virtual machine, wherein the virtual NVMe device is used for realizing communication connection between the virtual machine and the NVMe device.
2. The method of claim 1, determining a first Input Output (IO) queue for establishing a virtual NVMe device, comprising:
obtaining a second IO queue in the NVMe equipment through a virtual machine management module in the virtual machine;
and determining the second IO queue as the first IO queue.
3. The method of claim 2, after determining the first Input Output (IO) queue for establishing the virtual NVMe device, the method further comprising:
acquiring a first address space corresponding to the first IO queue in the virtual NVMe device and a second address space corresponding to the second IO queue in the NVMe device;
and establishing an address mapping table based on the first address space and the second address space.
4. The method of claim 1, establishing, in the virtual machine, a virtual NVMe device corresponding to the NVMe device based on the first IO queue and the device establishment request, comprising:
generating a virtual Peripheral Component Interconnect (PCI) bus device configuration space and a virtual management queue corresponding to the NVMe device in the virtual machine based on the device establishment request and a virtual machine management module;
and generating the virtual NVMe device based on the first IO queue, the virtual PCI configuration space and the virtual management queue.
5. The method of claim 4, generating a virtual peripheral interconnect bus (PCI) configuration space in the virtual machine corresponding to the NVMe device, comprising:
acquiring hardware configuration information corresponding to the NVMe equipment;
generating a virtual PCI configuration space corresponding to the NVMe device in the virtual machine based on the hardware configuration information.
6. The method of claim 1, after establishing a virtual NVMe device in the virtual machine corresponding to the NVMe device, the method further comprising:
acquiring an initialization request of the virtual NVMe device;
and based on the initialization request, performing initialization configuration operation on the virtual NVMe device through a virtual machine management module in the virtual machine.
7. The method of claim 1, further comprising:
acquiring a data processing request corresponding to the NVMe equipment;
processing the data processing request based on the virtual NVMe device to obtain a data processing result corresponding to the processing request; or, the data processing request is processed through the virtual machine management module to obtain a data processing result corresponding to the data processing request.
8. The method of claim 7, obtaining a data processing request corresponding to the NVMe device, comprising:
acquiring an original processing request corresponding to data to be processed;
determining a first target address corresponding to the original processing request, wherein the first target address corresponds to the virtual NVMe device;
converting the first target address to a second target address, the second target address corresponding to the NVMe device;
and generating a data processing request corresponding to the data to be processed based on the second target address.
9. The method of claim 7, processing the data processing request based on the virtual NVMe device to obtain a data processing result corresponding to the data processing request, comprising:
and when the data processing request is an IO request, obtaining a data processing result corresponding to the IO request by accessing the virtual NVMe device.
10. The method of claim 7, processing the data processing request by the virtual machine management module, comprising:
when the data processing request is a non-IO request, performing simulation processing operation on the non-IO request by using the virtual machine management module to obtain a data processing result corresponding to the data processing request; alternatively, the first and second electrodes may be,
when the data processing request is a non-IO request, the virtual machine management module is utilized to send the non-IO request to the NVMe device, so that the non-IO request is processed by the NVMe device, and a data processing result corresponding to the data processing request is obtained.
11. A virtualization method of a non-volatile high-speed transmission bus (NVMe) device is applied to a management node, and comprises the following steps:
acquiring an access request of a virtual machine;
determining at least one second IO queue provided by the NVMe device based on the access request;
and sending at least one second IO queue to the virtual machine to serve as a first IO queue, so as to establish a virtual NVMe device corresponding to the NVMe device in the virtual machine based on the first IO queue.
12. The method of claim 11, sending at least one second IO queue to the virtual machine as a first IO queue, comprising:
acquiring a pre-configured queue configuration table, wherein the queue configuration table comprises queue information distributed for all virtual machines;
determining a target second IO queue corresponding to the virtual machine in the at least one second IO queue based on the queue configuration table;
and sending the target second IO queue to the virtual machine to be used as a first IO queue.
13. An electronic device, comprising: a memory, a processor; wherein the memory is to store one or more computer instructions that when executed by the processor implement the virtualization method of the non-volatile transport high speed bus NVMe device of any of claims 1-10.
14. A virtualization system of a non-volatile transport express (NVMe) device, comprising:
virtual machine: the access request corresponding to the NVMe device is generated;
the management node is in communication connection with the virtual machine and is used for acquiring the access request, determining at least one second input/output (I0) queue provided by the NVMe device based on the access request and sending the at least one second IO queue to the virtual machine to serve as a first IO queue;
the virtual machine is used for determining a first IO queue for establishing virtual NVMe equipment, wherein the first IO queue corresponds to a second IO queue in the NVMe equipment; establishing a virtual NVMe device corresponding to the NVMe device in the virtual machine based on the first IO queue and the access request, wherein the virtual NVMe device is used for realizing communication connection between the virtual machine and the NVMe device.
CN202111510109.6A 2021-12-10 2021-12-10 Virtualization method and device for NVMe (network video recorder) device of nonvolatile high-speed transmission bus Pending CN114281252A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111510109.6A CN114281252A (en) 2021-12-10 2021-12-10 Virtualization method and device for NVMe (network video recorder) device of nonvolatile high-speed transmission bus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111510109.6A CN114281252A (en) 2021-12-10 2021-12-10 Virtualization method and device for NVMe (network video recorder) device of nonvolatile high-speed transmission bus

Publications (1)

Publication Number Publication Date
CN114281252A true CN114281252A (en) 2022-04-05

Family

ID=80871710

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111510109.6A Pending CN114281252A (en) 2021-12-10 2021-12-10 Virtualization method and device for NVMe (network video recorder) device of nonvolatile high-speed transmission bus

Country Status (1)

Country Link
CN (1) CN114281252A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115629845A (en) * 2022-12-14 2023-01-20 北京云豹创芯智能科技有限公司 IO data generation method and device, computer equipment and storage medium
CN116414568A (en) * 2023-06-09 2023-07-11 阿里巴巴(中国)有限公司 Memory adjustment method, device and system for virtual wireless access network
WO2024041481A1 (en) * 2022-08-26 2024-02-29 中兴通讯股份有限公司 Method, apparatus, and system for executing instruction, and server

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105700826A (en) * 2015-12-31 2016-06-22 华为技术有限公司 Virtualization method and device
US20180335971A1 (en) * 2017-05-16 2018-11-22 Cisco Technology, Inc. Configurable virtualized non-volatile memory express storage
CN111133416A (en) * 2017-09-26 2020-05-08 英特尔公司 Method and apparatus for processing commands from a virtual machine
CN111367472A (en) * 2020-02-28 2020-07-03 北京百度网讯科技有限公司 Virtualization method and device
CN111381926A (en) * 2018-12-27 2020-07-07 中兴通讯股份有限公司 Virtualization method and device
CN111880750A (en) * 2020-08-13 2020-11-03 腾讯科技(深圳)有限公司 Method, device and equipment for distributing read-write resources of disk and storage medium
CN113312232A (en) * 2020-09-07 2021-08-27 阿里巴巴集团控股有限公司 Information processing method, device and system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105700826A (en) * 2015-12-31 2016-06-22 华为技术有限公司 Virtualization method and device
US20180335971A1 (en) * 2017-05-16 2018-11-22 Cisco Technology, Inc. Configurable virtualized non-volatile memory express storage
CN111133416A (en) * 2017-09-26 2020-05-08 英特尔公司 Method and apparatus for processing commands from a virtual machine
CN111381926A (en) * 2018-12-27 2020-07-07 中兴通讯股份有限公司 Virtualization method and device
CN111367472A (en) * 2020-02-28 2020-07-03 北京百度网讯科技有限公司 Virtualization method and device
CN111880750A (en) * 2020-08-13 2020-11-03 腾讯科技(深圳)有限公司 Method, device and equipment for distributing read-write resources of disk and storage medium
CN113312232A (en) * 2020-09-07 2021-08-27 阿里巴巴集团控股有限公司 Information processing method, device and system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024041481A1 (en) * 2022-08-26 2024-02-29 中兴通讯股份有限公司 Method, apparatus, and system for executing instruction, and server
CN115629845A (en) * 2022-12-14 2023-01-20 北京云豹创芯智能科技有限公司 IO data generation method and device, computer equipment and storage medium
CN115629845B (en) * 2022-12-14 2023-04-11 北京云豹创芯智能科技有限公司 IO data generation method and device, computer equipment and storage medium
CN116414568A (en) * 2023-06-09 2023-07-11 阿里巴巴(中国)有限公司 Memory adjustment method, device and system for virtual wireless access network
CN116414568B (en) * 2023-06-09 2023-10-31 阿里巴巴(中国)有限公司 Memory adjustment method, device and system for virtual wireless access network

Similar Documents

Publication Publication Date Title
US10768862B2 (en) Extending existing storage devices in virtualized environments
EP3554025B1 (en) Method for forwarding packet and physical host
US10534552B2 (en) SR-IOV-supported storage resource access method and storage controller and storage device
US20190155548A1 (en) Computer system and storage access apparatus
CN114281252A (en) Virtualization method and device for NVMe (network video recorder) device of nonvolatile high-speed transmission bus
US11294735B2 (en) Method and apparatus for accessing desktop cloud virtual machine, and desktop cloud controller
US20240045824A1 (en) Remote Mapping Method, Apparatus and Device for Computing Resources, and Storage Medium
US10664415B2 (en) Quality of service enforcement and data security for containers accessing storage
US9858110B2 (en) Virtual credential adapter for use with virtual machines
US9460009B1 (en) Logical unit creation in data storage system
CN110046026B (en) Method for specifying virtual disk speed limit by cloud host, computing equipment and cloud platform
US9804882B2 (en) Configuration manager and method for configuring a host system for processing a processing job in a virtual data-processing environment
CN113312155B (en) Virtual machine creation method, device, equipment, system and computer program product
US20180239649A1 (en) Multi Root I/O Virtualization System
WO2016101282A1 (en) Method, device and system for processing i/o task
CN114996185A (en) Cross-address space bridging
CN107547258B (en) Method and device for realizing network policy
US20170090965A1 (en) Dirty Memory Tracking with Assigned Devices by Exitless Paravirtualization
US11360824B2 (en) Customized partitioning of compute instances
CN115576654B (en) Request processing method, device, equipment and storage medium
US9715460B1 (en) Enabling a first virtual storage director running in a container maintained by a hypervisor to achieve direct memory access to memory of a second virtual storage director running in a different container
US10430220B1 (en) Virtual devices as protocol neutral communications mediators
CN103902354A (en) Method for rapidly initializing disk in virtualization application
US20240104193A1 (en) Direct assignment of physical devices to confidential virtual machines

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination