SR-IOV test method and system based on hardware simulation acceleration platform and extended virtual machine
By deploying extended virtual machine resources and creating nested virtual machines on the hardware simulation acceleration platform, the problem of not being able to implement multiple VF mounted virtual machine testing is solved, and SR-IOV testing efficiency and performance is improved.
Patent Information
- Application Number
- CN202411873891.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-03-14
AI Technical Summary
During the development of SSD main control chips, the hardware simulation acceleration platform cannot realize the testing of multiple VF mounted virtual machines, which limits the full testing and testing efficiency of SR-IOV functions.
By deploying hardware devices that extend virtual machines on the hardware simulation acceleration platform, dynamically expand virtual machine resources, and creating nested virtual machines in the virtual machine manager, enabling SR-IOV functions, and implementing mounts and testing of multiple VFs.
It realizes the rapid expansion of virtual machine resources on the hardware simulation platform, improves testing efficiency and performance, and supports full testing of SR-IOV functions in the SSD chip design stage.
Smart Images

Figure CN119621248A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of hardware virtualization testing, and in particular to an SR-IOV testing method and system based on a hardware simulation acceleration platform and an extended virtual machine. Background Art
[0002] SR-IOV (Single Root I / O Virtualization) is a hardware-assisted I / O virtualization technology. In the chip design stage of the SSD master chip development process, a hardware simulation acceleration platform is usually used to simulate the chip functions. The purpose is to allow multiple terminals or system images (SIs) to share PCI device resources and improve the efficiency of hardware resource utilization. In the SR-IOV test of a real SSD hard disk, a virtual machine is usually created on the host system and the SR-IOV function is enabled. A VF is created for the SSD hard disk and mounted on the virtual machine, and then the corresponding test load is executed. In the chip design stage of the SSD master chip development process, there are no physical chips or hard disks, so the SR-IOV function can only be simulated based on the hardware simulation acceleration platform.
[0003] Dual ports allow data to be transmitted independently from two ports. This technology can provide fault tolerance for any data path. Dual-port SSD supports two data paths in a single host, and accesses the same storage device through two controllers to achieve redundancy. In another common application scenario, two host systems can also use dual ports to access the same storage system at the same time.
[0004] The main process of SR-IOV testing based on hardware emulation acceleration platform is to load specific hardware engineering and firmware programs, simulate the single-port or dual-port mode of SSD hard disk, realize the connection of PCIe link through virtual host, and test the SR-IOV function in virtual machine. However, due to the limitation of software computing power and hardware resource quantity of hardware emulation acceleration platform, it is impossible to nest multiple virtual machines in virtual machine and test multiple VF mounted virtual machines. Summary of the invention
[0005] The purpose of the present invention is to provide a SR-IOV test method and system based on a hardware simulation acceleration platform and an extended virtual machine, which can not only fully test the SR-IOV function, but also improve the test efficiency and convenience of the SR-IOV test.
[0006] In order to achieve the above-mentioned purpose, the present invention is implemented through the following technical solutions.
[0007] A SR-IOV testing method based on a hardware emulation acceleration platform and an extended virtual machine comprises the following steps: Deploy a hardware device for extending a virtual machine on a hardware emulation acceleration platform; Run hardware engineering and firmware programs on the hardware simulation acceleration platform to simulate the operation of SSD hard drives; Connect the PCIe link of the SSD hard disk to the virtual host; Run the virtual machine manager, create virtual machine 01, enable the SR-IOV function and processor virtualization function of virtual machine 01, bind the SSD hard disk to virtual machine 01, and start the virtual machine; Configure the extended virtual machine resources to virtual machine 01; Create one or more nested virtual machines in virtual machine 01, and enable the SR-IOV function of each nested virtual machine. Create multiple VFs for the SSD hard disk in VM 01, and then mount the VFs to the nested VMs; The nested virtual machine is powered on, the mounted VF is identified in the nested virtual machine, and the VF read and write test is performed.
[0008] Furthermore, the hardware emulation acceleration platform integrates a customized bottom-level driver, and after identifying the hardware device for extending the virtual machine resources, configures the extended virtual machine resources to the designated virtual machine.
[0009] Furthermore, the virtual host supports a dual-port function and is configured to establish two PCIe links; at the same time, the operating systems installed on the virtual machines all support a dual-port function and are configured to perform a dual-port SR-IOV test function.
[0010] Furthermore, the dual-port SR-IOV test based on the hardware simulation acceleration platform is divided into two forms: (1) The same virtual machine accesses the SSD device with dual-port function enabled through two data paths and two controllers. The dual ports create VFs respectively and bind different nested virtual machines for testing; (2) Two virtual machines use dual ports to access the same SSD device at the same time. The two virtual machines each create a VF and bind multiple nested virtual machines to perform testing. An SR-IOV test system based on a hardware emulation acceleration platform and an extended virtual machine, used to implement the above-mentioned SR-IOV test method based on a hardware emulation acceleration platform and an extended virtual machine, including a hardware emulation acceleration platform and a hardware device of the extended virtual machine; The hardware devices for extending the virtual machine include: Resource extension module, which is used to dynamically extend the computing, storage and network resources of virtual machines and interact with the underlying hardware; Resource management controller, used to monitor virtual machine resource usage and allocate resources; Cache unit to speed up data reading and writing; Communication interface for high-speed network connection; There is a signal connection between the hardware simulation acceleration platform and the communication interface.
[0011] The advantages of the present invention are: First, it realizes the rapid and efficient expansion of virtual machine resources on the hardware simulation acceleration platform, improves the operating efficiency and response speed of the virtual machine in the simulation test, and improves the overall test performance.
[0012] Secondly, during the SSD chip design phase, the SR-IOV function was fully tested on the hardware simulation acceleration platform, which improved test efficiency, reduced test costs, and provided strong support for the practical application of SR-IOV technology in the SSD hard drive productization phase. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 This is a schematic diagram of the structure of an SR-IOV test system based on a hardware simulation acceleration platform and an extended virtual machine according to Embodiment 1 of the present invention; Figure 2 This is a flow chart of an SR-IOV testing method based on a hardware emulation acceleration platform and an extended virtual machine according to Embodiment 2 of the present invention. DETAILED DESCRIPTION
[0014] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0015] Example 1 This embodiment discloses an SR-IOV test system based on a hardware simulation acceleration platform and an extended virtual machine. Figure 1 , including a hardware emulation acceleration platform and a hardware device for extending a virtual machine.
[0016] The hardware devices for extending the virtual machine include: Resource extension module, which is used to dynamically extend the computing, storage and network resources of virtual machines and interact with the underlying hardware; Resource management controller, used to monitor virtual machine resource usage and allocate resources; Cache unit to speed up data reading and writing; Communication interface for high-speed network connection.
[0017] There is a signal connection between the hardware simulation acceleration platform and the communication interface, and data is transmitted using a data line.
[0018] Example 2 This embodiment discloses a SR-IOV test method based on a hardware simulation acceleration platform and an extended virtual machine. Figure 2 , including the following steps.
[0019] S1. Set up a hardware device for expanding virtual machine resources, which includes a resource expansion module, a resource management controller, a cache unit and a communication interface. The resource expansion module is used to dynamically expand the computing, storage and network resources of the virtual machine, directly interact with the underlying hardware, and reduce the performance loss of the software layer; the resource management controller is used to monitor the usage of virtual machine resources, intelligently allocate resources, and ensure that each virtual machine obtains the optimal resource allocation; the cache unit provides a cache mechanism for accelerating data reading and writing and improving the I / O performance of the virtual machine; the communication interface supports high-speed network connection to ensure efficient data transmission between virtual machines and between virtual machines and hardware simulation acceleration platforms.
[0020] S2. Prepare a hardware emulation acceleration platform and deploy hardware devices for expanding virtual machine resources. The hardware emulation acceleration platform integrates customized underlying drivers, can identify the expanded hardware devices, and configure the expanded virtual machine resources to the specified virtual machine through customized commands.
[0021] S3. On the hardware simulation acceleration platform, run specific hardware engineering and firmware programs to simulate the operation of the SSD hard disk. After the hard disk starts running, the corresponding firmware power-on and operation information can be displayed through the serial port module. Run the virtual host based on the hardware simulation acceleration platform and connect the PCIe link of the SSD hard disk to the virtual host.
[0022] S4. Run the virtual machine manager, create virtual machine 01, and enable the SR-IOV function and processor virtualization function Intel VT-x / EPT or AMD-V / RVI (v) of the virtual machine. The processor virtualization function allows multiple virtual machine resources to be nested on the virtual machine. After binding the SSD hard disk to the created virtual machine 01, start the virtual machine 01, and then you can view the identified SSD hard disk in the virtual machine.
[0023] S5. Through a customized command based on the hardware emulation acceleration platform, the virtual machine resources expanded in step S2 are configured to virtual machine 01. Virtual machine management software is installed in virtual machine 01, and one or more nested virtual machines are created, numbered 11 / 12 / 13, etc., and the SR-IOV function of the nested virtual machines 11 / 12 / 13, etc. is enabled respectively.
[0024] S6. In virtual machine 01, create multiple VFs for the SSD hard disk, and then mount the VFs to nested virtual machines 11 / 12 / 13, etc. When nested virtual machines 11 / 12 / 13, etc. are powered on, the mounted VFs can be identified in the nested virtual machines, and read and write operations can be performed on these VFs.
[0025] The virtual host based on the hardware emulation acceleration platform supports dual-port function and can establish two PCIe links. At the same time, the operating system installed on the virtual machine supports dual-port function and can perform dual-port SR-IOV test. There are two forms of dual-port SR-IOV test based on the hardware emulation acceleration platform. One is that the same virtual machine accesses the SSD device with dual-port function enabled through two data paths and two controllers. The dual ports create VFs respectively and bind different nested virtual machines for testing. The other form is that two virtual machines use dual ports to access the same SSD device at the same time. The two virtual machines (numbered 1 and 2) each create VFs and bind multiple nested virtual machines (numbered 11 / 12 / 13, etc. and 21 / 22 / 23, etc.) for testing.
[0026] Finally, it should be noted that the above is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A SR-IOV test method based on a hardware simulation acceleration platform and an extended virtual machine, characterized in that: Includes steps: Deploy a hardware device for extending a virtual machine on a hardware emulation acceleration platform; Run hardware engineering and firmware programs on the hardware simulation acceleration platform to simulate the operation of SSD hard drives; Connect the PCIe link of the SSD hard disk to the virtual host; Run the virtual machine manager, create virtual machine 01, enable the SR-IOV function and processor virtualization function of virtual machine 01, bind the SSD hard disk to virtual machine 01, and start the virtual machine; Configure the extended virtual machine resources to virtual machine 01; Create one or more nested virtual machines in virtual machine 01, and enable the SR-IOV function of each nested virtual machine. Create multiple VFs for the SSD hard disk in VM 01, and then mount the VFs to the nested VMs; The nested virtual machine is powered on, the mounted VF is identified in the nested virtual machine, and the VF read and write test is performed.
2. The SR-IOV testing method based on the hardware simulation acceleration platform and the extended virtual machine according to claim 1, characterized in that: The hardware emulation acceleration platform integrates a customized bottom-level driver, and after identifying the hardware device for extending the virtual machine resources, configures the extended virtual machine resources to the designated virtual machine.
3. The SR-IOV testing method based on the hardware simulation acceleration platform and the extended virtual machine according to claim 1, characterized in that: The virtual host supports dual-port function and is configured to establish two PCIe links; at the same time, the operating systems carried on the virtual machines all support dual-port function and are configured to execute dual-port SR-IOV test function.
4. The SR-IOV testing method based on the hardware simulation acceleration platform and the extended virtual machine according to claim 3 is characterized in that: The dual-port SR-IOV test based on the hardware simulation acceleration platform is divided into two forms: (1) The same virtual machine accesses the SSD device with dual-port function enabled through two data paths and two controllers. The dual ports create VFs respectively and bind different nested virtual machines for testing; (2) Two virtual machines use dual ports to access the same SSD device at the same time. The two virtual machines each create a VF and bind multiple nested virtual machines to perform testing.
5. An SR-IOV test system based on a hardware emulation acceleration platform and an extended virtual machine, used to implement the SR-IOV test method based on a hardware emulation acceleration platform and an extended virtual machine as described in claim 1, characterized in that: A hardware device including a hardware emulation acceleration platform and an extended virtual machine; The hardware device for extending the virtual machine includes: Resource extension module, which is used to dynamically extend the computing, storage and network resources of virtual machines and interact with the underlying hardware; Resource management controller, used to monitor virtual machine resource usage and allocate resources; Cache unit to speed up data reading and writing; Communication interface for high-speed network connection; The hardware simulation acceleration platform is signal-connected to the communication interface.