CN109144672A - A kind of method, system and associated component for distributing PCIe device - Google Patents

A kind of method, system and associated component for distributing PCIe device Download PDF

Info

Publication number
CN109144672A
CN109144672A CN201811044877.5A CN201811044877A CN109144672A CN 109144672 A CN109144672 A CN 109144672A CN 201811044877 A CN201811044877 A CN 201811044877A CN 109144672 A CN109144672 A CN 109144672A
Authority
CN
China
Prior art keywords
pcie device
virtual machine
pcie
physical internet
internet ports
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
CN201811044877.5A
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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information Technology 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201811044877.5A priority Critical patent/CN109144672A/en
Publication of CN109144672A publication Critical patent/CN109144672A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4204Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus
    • G06F13/4221Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus being an input/output bus, e.g. ISA bus, EISA bus, PCI bus, SCSI bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4411Configuring for operating with peripheral devices; Loading of device drivers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45591Monitoring or debugging support

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer And Data Communications (AREA)

Abstract

This application discloses a kind of methods for distributing PCIe device, and the method includes when detecting that PCIe device is installed to PCIe slot, server platform starting VT, VT-D and SR-IOV simultaneously loads IOMMU, to construct virtual environment;The Bus number of the PCIe device is obtained by the driver being adapted to the PCIe device;Virtual machine is created in the virtual environment, and the Bus number is added to the control catalogue of the virtual machine, to distribute the physical internet ports of the PCIe device to the virtual machine.This method can reduce the demand that driver is run in VMM, improve the allocative efficiency of PCIe device.Disclosed herein as well is a kind of system, a kind of computer readable storage medium and a kind of server platforms for distributing PCIe device, have the above beneficial effect.

Description

A kind of method, system and associated component for distributing PCIe device
Technical field
The present invention relates to technical field of virtualization, in particular to a kind of method, system, a kind of calculating for distributing PCIe device Machine readable storage medium storing program for executing and a kind of server platform.
Background technique
It is a kind of that PCIe, which is also known as PCI-Express (peripheral component interconnect express), High speed serialization computer expansion bus standard, PCIe device are the equipment using PCIe standard.
In order to achieve the purpose that virtual machine control PCIe device, need physics PCIe device distributing to virtual machine, it is existing Technology is mainly to be realized by traditional equipment simulating/extras interface mode, but the prior art needs VMM (Virtual Machine Monitor, monitor of virtual machine) participates in PCIe device distribution.But PCIe is carried out using VMM The distribution of equipment needs to occupy the performance resource of VMM, there is a problem of that allocative efficiency is low, resource occupation is larger.
Therefore, the demand that driver is run in VMM how is reduced, the allocative efficiency for improving PCIe device is this field The current technical issues that need to address of technical staff.
Summary of the invention
The purpose of the application is to provide a kind of method, system, a kind of computer readable storage medium for distributing PCIe device And a kind of server platform, the demand for running driver in VMM can be reduced, the allocative efficiency of PCIe device is improved.
In order to solve the above technical problems, the application provides a kind of method for distributing PCIe device, this method comprises:
When detecting that PCIe device is installed to PCIe slot, server platform starts VT, VT-D and SR-IOV and adds IOMMU is carried, to construct virtual environment;
The Bus number of the PCIe device is obtained by the driver being adapted to the PCIe device;
Virtual machine is created in the virtual environment, and the Bus number is added to the control catalogue of the virtual machine, To distribute the physical internet ports of the PCIe device to the virtual machine.
Optionally, the server platform is specially the server platform for being equipped with Linux rhel7.2 system.
Optionally, virtual machine is created in the virtual environment includes:
It is created in the virtual environment by the virt-manager of the Linux rhel7.2 system described virtual Machine.
Optionally, the PCIe device includes network interface card or HBA card.
Optionally, it when the PCIe device is the network interface card, distributes by the physical internet ports of the PCIe device to institute After stating virtual machine, further includes:
IP address is distributed for the physical internet ports of the network interface card, is connected to establish the network of the virtual machine and the network interface card It connects;Wherein, the physical internet ports of the virtual machine are connect with the physical internet ports of the network interface card by interchanger;
The handling capacity of the network interface card is tested using iperf network bandwidth testing tool.
Optionally, the interchanger is separately connected the physical internet ports and the network interface card of the virtual machine by 10,000,000,000 optical fiber cables Physical internet ports.
Optionally, it when the PCIe device is the HBA card, distributes by the physical internet ports of the PCIe device to institute After stating virtual machine, further includes:
Fio test is carried out to the HBA card by the virtual machine, and HBA card performance is determined according to fio test result.
Present invention also provides a kind of system for distributing PCIe device, which includes:
Environment construction module, for starting VT, VT-D and SR- when detecting that PCIe device is installed to PCIe slot IOV simultaneously loads IOMMU, to construct virtual environment;
Bus number obtains module, obtains the PCIe device for the driver by being adapted to the PCIe device Bus number;
Distribution module for creating virtual machine in the virtual environment, and the Bus number is added to described virtual The control catalogue of machine, to distribute the physical internet ports of the PCIe device to the virtual machine.
Present invention also provides a kind of computer readable storage mediums, are stored thereon with computer program, the computer The step of program realizes above-mentioned distribution PCIe device method when executing executes.
Present invention also provides a kind of server platform, including memory and processor, meter is stored in the memory Calculation machine program, the processor realizes above-mentioned distribution PCIe device method when calling the computer program in the memory are held Capable step.
The present invention provides a kind of methods for distributing PCIe device, including work as and detect that PCIe device is installed to PCIe slot When upper, server platform starting VT, VT-D and SR-IOV simultaneously loads IOMMU, to construct virtual environment;By with the PCIe The driver of equipment adaptation obtains the Bus number of the PCIe device;Create virtual machine in the virtual environment, and by institute The control catalogue that Bus number is added to the virtual machine is stated, to distribute the physical internet ports of the PCIe device to described virtual Machine.
The application is by when PCIe device is installed to PCIe slot, starting VT, VT-D and SR-IOV and loading IOMMU Module constructs virtual environment, and under the virtual environment driver of virtual machine internal can directly carried out with PCIe device Communication only need to reduce by management a small amount of or without VMM and need to run driver in VMM in the prior art It relies on.Therefore, the need of the operation driver in VMM can be reduced by PCIe device being distributed to virtual machine under the virtual environment It asks, improves the allocative efficiency of PCIe device.The application additionally provides a kind of system of distribution PCIe device, a kind of computer simultaneously Readable storage medium storing program for executing and a kind of server platform have above-mentioned beneficial effect, and details are not described herein.
Detailed description of the invention
In ord to more clearly illustrate embodiments of the present application, attached drawing needed in the embodiment will be done simply below It introduces, it should be apparent that, the drawings in the following description are only some examples of the present application, for ordinary skill people For member, without creative efforts, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is a kind of flow chart for the method for distributing PCIe device provided by the embodiment of the present application;
Fig. 2 is a kind of structural schematic diagram for the system for distributing PCIe device provided by the embodiment of the present application.
Specific embodiment
To keep the purposes, technical schemes and advantages of the embodiment of the present application clearer, below in conjunction with the embodiment of the present application In attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is Some embodiments of the present application, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art Every other embodiment obtained without making creative work, shall fall in the protection scope of this application.
Below referring to Figure 1, Fig. 1 is a kind of process for the method for distributing PCIe device provided by the embodiment of the present application Figure.
Specific steps may include:
S101: when detecting that PCIe device is installed to PCIe slot, server platform starts VT, VT-D and SR-IOV And IOMMU is loaded, to construct virtual environment;
Wherein, the purpose of this step is to construct one for creating the virtual environment of virtual machine, and wooden man has detection Whether PCIe device is installed to the operation on PCIe slot, and the specific PCIe slot can be the machine being connected with server platform Slot on platform.The specific name model of PCIe device is not limited in the present embodiment, as long as the equipment is using PCIe standard Equipment, specifically can be 10,000,000,000 network interface of intel x722 or HBA card.
When PCIe device is installed to PCIe slot, the detailed process for starting VT, VT-D and SR-IOV can be with are as follows: is taking Del key is pressed during business device platform starting up and enters the interface BIOS, must confirm that " VT ", " VT-D " and " SR-IOV " is all Characteristic is opened, and is saved and is exited.VT is the abbreviation of English virtualizationtechnology, means that CPU is virtual Change technology.(Intel Virtualization Technology for Directed I/O, it is empty that Intel orients I/O to VT-D Quasi-ization technology) technology be it is a kind of based on North Bridge north bridge chips hardware auxiliary virtualization technology, by north bridge Built-in offer DMA virtualization and IRQ virtualization hardware realize novel I/O virtualization mode, and Intel VT-d can be in void Reliability, flexibility and the performance of I/O are greatly improved in near-ring border.
When distributing virtual network port, it is necessary to which IOMMU (deposit by I/O Memory Management Unit, input and output Reservoir administrative unit) module support, therefore need to load IOMMU in this step, the step with starting VT, VT-D and SR-IOV Suddenly virtual environment is constructed together.SR-IOV (Single-root I/O virtualization, single I/O virtualization).As A kind of special case, when the system of server platform is Linux rhel7.2, due to I/O Memory Management Unit (IOMMU) module rhel7.2 default is not turned on, and is loaded IOMMU and needed to add a line parameter in kernel start-up parameter: Intel_iommu=on, specifically: linux16/vmlinuz-3.10.0-327.ali2010.alios7.x86_64 root =UUID=6988cc44-f2b9-4d88-9265-1d338a77b847 re crashkernel=auto rhgb quiet LANG=en_US.UTF-8intel iommu=on.
After loading IOMMU module, in order to make IOMMU module come into force, can restart server platform keeps iommu raw Effect, can be used and check IOMMU state: #dmesg as issued orders | grep-iiommu.
With VT-d technology, virtual machine is able to come using the direct PCIe device method of salary distribution or PCIe device sharing mode Instead of traditional equipment simulating/extras interface mode, to greatly improve the PCIe performance of virtualization.
S102: the Bus number of the PCIe device is obtained by the driver being adapted to the PCIe device;
Wherein, there is the driver for being installed on PCIe device adaptation in this step default, install corresponding driving journey After sequence, the Bus number of the PCIe device can be obtained by the driver being adapted to the PCIe device, it specifically can be with The bus number (Bus number) of PCIe device is obtained by #lspci order.
S103: creating virtual machine in the virtual environment, and the Bus number is added to the control of the virtual machine Catalogue, to distribute the physical internet ports of the PCIe device to the virtual machine.
Wherein, the virtual machine created under the virtual environment that S101 has been put up can make the driving journey of virtual machine internal Sequence is directly communicated with PCIe device, only need to be reduced and be needed in the prior art by management a small amount of or without VMM The dependence of driver is run in VMM.The Bus number of PCIe device is added in the control catalogue of virtual machine, it can realize The physical internet ports of the PCIe device are distributed to the virtual machine, so that virtual machine carries out PCIe device by physical internet ports Control.
As a preferred embodiment, when server platform is specially the clothes for being equipped with Linux rhel7.2 system When business device platform, institute can be created in the virtual environment by the virt-manager of the Linux rhel7.2 system State virtual machine.
The present embodiment is by when PCIe device is installed to PCIe slot, starting VT, VT-D and SR-IOV and loading IOMMU module constructs virtual environment, and under the virtual environment driver of virtual machine internal can directly set with PCIe It is standby to be communicated, only it need to reduce by management a small amount of or without VMM and need to run driving in VMM in the prior art The dependence of program.Therefore, the operation driving journey in VMM can be reduced by PCIe device being distributed to virtual machine under the virtual environment The demand of sequence improves the allocative efficiency of PCIe device.
As preferred embodiment, the Bus number is added to the control catalogue of the virtual machine, so as to will be described The physical internet ports of PCIe device are distributed to the virtual machine, can also include being controlled by virtual machine PCIe device The step of, specific operation can be determined according to being specially which kind of equipment of PCIe device.
When the PCIe device is the network interface card, distribute by the physical internet ports of the PCIe device to the virtual machine Later, further includes: IP address is distributed for the physical internet ports of the network interface card, to establish the network of the virtual machine Yu the network interface card Connection;Wherein, the physical internet ports of the virtual machine are connect with the physical internet ports of the network interface card by interchanger;Utilize iperf net Network bandwidth test tool tests the handling capacity of the network interface card.Preferably, the interchanger is separately connected institute by 10,000,000,000 optical fiber cables State the physical internet ports of virtual machine and the physical internet ports of the network interface card.
When the PCIe device is the HBA card, distribute by the physical internet ports of the PCIe device to described virtual After machine, further includes: carry out fio test to the HBA card by the virtual machine, and determine HBA card according to fio test result Performance.
Illustrate the stream of above-described embodiment description below by the embodiment of distribution network interface card and HBA card in practical applications Journey,
Hardware device requirement:
1. a supportVirtualization Technology for Directed (VT-D) and SR-IOV The server platform of characteristic;
2. one has the board of PCI Express*x8 8.0Gb/s (Gen3) slot;
3. PCIe device must be adhered on board
Software environment requirement:
1. the platform of Intel VT-d/SR-IOV is supported, herein by taking linux rhel7.2 as an example;
2. the newest firmware of network interface card;
3. supporting the trawl performance of physics functional module and virtual functions module;
Network interface card testing procedure:
1. installing on network interface card to PCIe slot to be measured, then by booting;
2. start-up course, which presses del key, enters the interface BIOS, it must confirm that " VT ", " VT-D " and " SR-IOV " all characteristics are equal It opens, saves and exit.
3. installing RHEL7.2 system into server system disk;
4. being logged on in rhel7.2 system using root user;
5. empty in distribution since I/O Memory Management Unit (IOMMU) module rhel7.2 default is not turned on When quasi- network interface, it is necessary to the support of IOMMU, and load IOMMU and need to add a line parameter in kernel start-up parameter: Intel_iommu=on, such as:
6. restarting server makes IOMMU come into force, it can be used and check IOMMU state as issued orders,
#dmesg|grep–i iommu.
7. the driving being adapted to the network interface card is installed, by taking ten thousand Broadcom x722 of Intel as an example (driving can be obtained from official website), After driving is installed, check whether driving loads success;
The Bus number bus number of 8.#lspci order acquisition network interface card;
9. creating a virtual machine using the virt-manager that RHEL7.2 is carried;
10. installing RHEL7.2 for newly created virtual machine, after being installed, virtual machine is closed;
11. clicking " Open → View → Detail " to edit virtual machine in virtual machine window interface;
12. clicking " Add Hardwar → PCI Host Device ", all pci equipment all will appear in the right control group In;
13. one or more of selection physical internet ports are added
14. a pair virtual machine boots up, then the i40e physical drives of network interface card are installed, check being assigned to using lspci The address bus of virtual network port will appear in lspci list;
15. ensure that the driving of network interface added is successfully loaded using lsmod, using ifconfig it can be seen that addition The equipment of physical internet ports;
16. the physical internet ports of server and the physical internet ports of client are connected by interchanger using 10,000,000,000 optical fiber cables;
17. for the physical internet ports configure an address ip, all physical internet ports for then ensuring to add in virtual machine and The physical internet ports of client can Ping it is logical.
18. whether can achieve 9.0Gb/s or more using iperf network broadband testing tool test handling capacity
HBA card testing procedure:
1. the platform of Intel VT-d/SR-IOV is supported, herein by taking linux rhel7.2 as an example;
The newest firmware of 2.HBA card;
3. supporting the trawl performance of physics functional module and virtual functions module;
Network interface card testing procedure:
1. installing HBA to be measured to snap on PCIe slot, then by booting;
2. start-up course, which presses del key, enters the interface BIOS, it must confirm that " VT ", " VT-D " and " SR-IOV " all characteristics are equal It opens, saves and exit.
3. installing RHEL7.2 system into server system disk;
4. being logged on in rhel7.2 system using root user;
5. empty in distribution since I/O Memory Management Unit (IOMMU) module rhel7.2 default is not turned on When quasi- network interface, it is necessary to the support of IOMMU, and load IOMMU and need to add a line parameter in kernel start-up parameter: Intel_iommu=on;
6. restarting server makes IOMMU come into force, it can be used and check IOMMU state as issued orders,
#dmesg|grep–i iommu.
7. the driving being adapted to HBA card is installed, by taking the card of HBA 3216 as an example (driving can be obtained from official website), driving installation After the completion, check whether driving loads success;
The Bus number bus number of 8.#lspci order acquisition HBA card;
9. creating a virtual machine using the virt-manager that RHEL7.2 is carried;
10. installing RHEL7.2 for newly created virtual machine, after being installed, virtual machine is closed;
11. clicking " Open → View → Detail " to edit virtual machine in virtual machine window interface;
12. clicking " Add Hardwar → PCI Host Device ", all pci equipment all will appear in the right control group In (be equivalent to the control catalogue that Bus number is added to virtual machine);
13. the address PCIe of HBA3216 is selected then to click completion, restarts virtual machine, check the storage card using lspci Whether success is added.
14. installing the driving that HBA 3216 blocks in virtual machine, it is ensured that driving can be successfully loaded.
The hard disk that 15.#cat/proc/partitions is attached on the HBA card all can detecte to.
16.. it runs fio 2 hours or so, checks whether hard disk performance reaches the index of spec requirement, check log log Whether there is hard disc apparatus is relevant to report an error.
Above-described embodiment interests Intel VT-d has not only speeded up number by the demand of reduction VMM participative management I/O flow According to transmission, and eliminate most performance cost.This is by making VMM that specific I/O equipment safety is distributed to specific visitor Family operating system is realized.VT-d needs the operation system example or hypervisor run in BIOS and on hardware Middle offer support.
Above-described embodiment describes how to realize that direct PCIe device is allocated by vt-d technology, direct allotment I/O equipment is managed to virtual machine, under this model, the driver of virtual machine internal directly and hardware device direct communication, only need To pass through on a small quantity, or without the management of VMM.This model almost completely eliminates the need that driver is run in VMM It asks.The present embodiment mainly provides a kind of test method of Intel VT-d, and tester can be made to be understood quickly and use this Characteristic functions, while reducing the testing time, to improve testing efficiency.
Fig. 2 is referred to, Fig. 2 is a kind of structural representation for the system for distributing PCIe device provided by the embodiment of the present application Figure;
The system may include:
Environment construction module 100, for when detecting that PCIe device is installed to PCIe slot, start VT, VT-D and SR-IOV simultaneously loads IOMMU, to construct virtual environment;
Bus number obtains module 200, obtains the PCIe for the driver by being adapted to the PCIe device and sets Standby Bus number;
Distribution module 300 is added to the void for creating virtual machine in the virtual environment, and by the Bus number The control catalogue of quasi- machine, to distribute the physical internet ports of the PCIe device to the virtual machine.
Further, the server platform is specially the server platform for being equipped with Linux rhel7.2 system.
Further, distribution module 300 includes:
Virtual machine creating unit, for the virt-manager by the Linux rhel7.2 system described virtual The virtual machine is created in environment;
Allocation unit, for the Bus number to be added to the control catalogue of the virtual machine, to set the PCIe Standby physical internet ports are distributed to the virtual machine.
Further, the PCIe device includes network interface card or HBA card.
Further, when the PCIe device is the network interface card, further includes:
Network interface card test module, for for the network interface card physical internet ports distribute IP address, so as to establish the virtual machine with The network connection of the network interface card;Wherein, the physical internet ports of the physical internet ports of the virtual machine and the network interface card are connected by interchanger It connects;The handling capacity of the network interface card is tested using iperf network bandwidth testing tool.
Further, the interchanger is separately connected the physical internet ports and the net of the virtual machine by 10,000,000,000 optical fiber cables The physical internet ports of card.
Further, when the PCIe device is the HBA card, further includes:
HBA card test module for carrying out fio test to the HBA card by the virtual machine, and is tested according to fio As a result HBA card performance is determined.
Since the embodiment of components of system as directed is corresponded to each other with the embodiment of method part, the embodiment of components of system as directed is asked Referring to the description of the embodiment of method part, wouldn't repeat here.
The present embodiment is by when PCIe device is installed to PCIe slot, starting VT, VT-D and SR-IOV and loading IOMMU module constructs virtual environment, and under the virtual environment driver of virtual machine internal can directly set with PCIe It is standby to be communicated, only it need to reduce by management a small amount of or without VMM and need to run driving in VMM in the prior art The dependence of program.Therefore, the operation driving journey in VMM can be reduced by PCIe device being distributed to virtual machine under the virtual environment The demand of sequence improves the allocative efficiency of PCIe device.
Present invention also provides a kind of computer readable storage mediums, have computer program thereon, the computer program It is performed and step provided by above-described embodiment may be implemented.The storage medium may include: USB flash disk, mobile hard disk, read-only deposit Reservoir (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or The various media that can store program code such as CD.
Present invention also provides a kind of server platforms, may include memory and processor, have in the memory Computer program when the processor calls the computer program in the memory, may be implemented above-described embodiment and be provided The step of.Certain server platform can also include various network interfaces, the components such as power supply.
Each embodiment is described in a progressive manner in specification, the highlights of each of the examples are with other realities The difference of example is applied, the same or similar parts in each embodiment may refer to each other.For system disclosed in embodiment Speech, since it is corresponded to the methods disclosed in the examples, so being described relatively simple, related place is referring to method part illustration ?.It should be pointed out that for those skilled in the art, under the premise of not departing from the application principle, also Can to the application, some improvement and modification can also be carried out, these improvement and modification also fall into the protection scope of the claim of this application It is interior.
It should also be noted that, in the present specification, relational terms such as first and second and the like be used merely to by One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaning Covering non-exclusive inclusion, so that the process, method, article or equipment for including a series of elements not only includes that A little elements, but also including other elements that are not explicitly listed, or further include for this process, method, article or The intrinsic element of equipment.Under the situation not limited more, the element limited by sentence "including a ..." is not arranged Except there is also other identical elements in the process, method, article or apparatus that includes the element.

Claims (10)

1. a kind of method for distributing PCIe device characterized by comprising
When detecting that PCIe device is installed to PCIe slot, server platform starting VT, VT-D and SR-IOV is simultaneously loaded IOMMU, to construct virtual environment;
The Bus number of the PCIe device is obtained by the driver being adapted to the PCIe device;
Virtual machine is created in the virtual environment, and the Bus number is added to the control catalogue of the virtual machine, so as to The physical internet ports of the PCIe device are distributed to the virtual machine.
2. method according to claim 1, which is characterized in that the server platform is specially to be equipped with Linux The server platform of rhel7.2 system.
3. method according to claim 2, which is characterized in that creating virtual machine in the virtual environment includes:
The virtual machine is created in the virtual environment by the virt-manager of the Linux rhel7.2 system.
4. method according to claim 1, which is characterized in that the PCIe device includes network interface card or HBA card.
5. method according to claim 4, which is characterized in that when the PCIe device is the network interface card, will be described The physical internet ports of PCIe device are distributed to the virtual machine, further includes:
IP address is distributed for the physical internet ports of the network interface card, to establish the network connection of the virtual machine Yu the network interface card;Its In, the physical internet ports of the virtual machine are connect with the physical internet ports of the network interface card by interchanger;
The handling capacity of the network interface card is tested using iperf network bandwidth testing tool.
6. method according to claim 5, which is characterized in that the interchanger is separately connected the void by 10,000,000,000 optical fiber cables The physical internet ports of quasi- machine and the physical internet ports of the network interface card.
7. method according to claim 4, which is characterized in that when the PCIe device be the HBA card when, will described in The physical internet ports of PCIe device are distributed to the virtual machine, further includes:
Fio test is carried out to the HBA card by the virtual machine, and HBA card performance is determined according to fio test result.
8. a kind of system for distributing PCIe device characterized by comprising
Environment construction module, for when detecting that PCIe device is installed to PCIe slot, starting VT, VT-D and SR-IOV to be simultaneously IOMMU is loaded, to construct virtual environment;
Bus number obtains module, and the bus of the PCIe device is obtained for the driver by being adapted to the PCIe device Number;
Distribution module is added to the virtual machine for creating virtual machine in the virtual environment, and by the Bus number Catalogue is controlled, to distribute the physical internet ports of the PCIe device to the virtual machine.
9. a kind of server platform characterized by comprising
Memory, for storing computer program;
Processor is realized when for executing the computer program distributing PCIe device as described in any one of claim 1 to 7 The step of method.
10. a kind of computer readable storage medium, which is characterized in that be stored with computer on the computer readable storage medium Program realizes the side that PCIe device is distributed as described in any one of claim 1 to 7 when the computer program is executed by processor The step of method.
CN201811044877.5A 2018-09-07 2018-09-07 A kind of method, system and associated component for distributing PCIe device Pending CN109144672A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811044877.5A CN109144672A (en) 2018-09-07 2018-09-07 A kind of method, system and associated component for distributing PCIe device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811044877.5A CN109144672A (en) 2018-09-07 2018-09-07 A kind of method, system and associated component for distributing PCIe device

Publications (1)

Publication Number Publication Date
CN109144672A true CN109144672A (en) 2019-01-04

Family

ID=64823927

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811044877.5A Pending CN109144672A (en) 2018-09-07 2018-09-07 A kind of method, system and associated component for distributing PCIe device

Country Status (1)

Country Link
CN (1) CN109144672A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111063387A (en) * 2019-12-29 2020-04-24 苏州浪潮智能科技有限公司 Method, device and equipment for testing performance of solid state disk and storage medium
CN111625318A (en) * 2020-05-22 2020-09-04 苏州浪潮智能科技有限公司 Communication test method, device and equipment
CN113485756A (en) * 2021-06-30 2021-10-08 深圳市科力锐科技有限公司 Hardware equipment configuration method, device, equipment and storage medium
CN113886153A (en) * 2021-08-20 2022-01-04 苏州浪潮智能科技有限公司 Container-based network card pressure testing method and device
CN116303148A (en) * 2023-05-17 2023-06-23 北京中科网威信息技术有限公司 Multi-slot device network card detection method and device, electronic device and storage medium
CN116909639A (en) * 2023-09-13 2023-10-20 珠海星云智联科技有限公司 Mounting system, method, cluster and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120102491A1 (en) * 2010-10-26 2012-04-26 Lsi Corporation Virtual function boot in single-root and multi-root i/o virtualization environments
CN103984591A (en) * 2014-05-15 2014-08-13 中国人民解放军国防科学技术大学 PCI (Peripheral Component Interconnect) device INTx interruption delivery method for computer virtualization system
CN104049912A (en) * 2014-05-23 2014-09-17 上海爱数软件有限公司 Distributed storage management method based on virtualization platform
CN104468311A (en) * 2014-11-18 2015-03-25 浪潮(北京)电子信息产业有限公司 Method and system for virtualizing physical network card into multiple virtual network cards
CN105320628A (en) * 2015-11-06 2016-02-10 中国科学院计算技术研究所 Adaptation device, system and method for enabling single I/O device to be shared by multiple root nodes
CN106250211A (en) * 2016-08-05 2016-12-21 浪潮(北京)电子信息产业有限公司 A kind of virtualization implementation method based on SR_IOV
CN106330779A (en) * 2015-06-23 2017-01-11 联想企业解决方案(新加坡)有限公司 Server, physical switch, and communication system
CN106789337A (en) * 2017-01-18 2017-05-31 郑州云海信息技术有限公司 A kind of network performance optimizing method of KVM
CN106909443A (en) * 2017-02-28 2017-06-30 郑州云海信息技术有限公司 The collocation method and device of a kind of virtual machine

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120102491A1 (en) * 2010-10-26 2012-04-26 Lsi Corporation Virtual function boot in single-root and multi-root i/o virtualization environments
CN103984591A (en) * 2014-05-15 2014-08-13 中国人民解放军国防科学技术大学 PCI (Peripheral Component Interconnect) device INTx interruption delivery method for computer virtualization system
CN104049912A (en) * 2014-05-23 2014-09-17 上海爱数软件有限公司 Distributed storage management method based on virtualization platform
CN104468311A (en) * 2014-11-18 2015-03-25 浪潮(北京)电子信息产业有限公司 Method and system for virtualizing physical network card into multiple virtual network cards
CN106330779A (en) * 2015-06-23 2017-01-11 联想企业解决方案(新加坡)有限公司 Server, physical switch, and communication system
CN105320628A (en) * 2015-11-06 2016-02-10 中国科学院计算技术研究所 Adaptation device, system and method for enabling single I/O device to be shared by multiple root nodes
CN106250211A (en) * 2016-08-05 2016-12-21 浪潮(北京)电子信息产业有限公司 A kind of virtualization implementation method based on SR_IOV
CN106789337A (en) * 2017-01-18 2017-05-31 郑州云海信息技术有限公司 A kind of network performance optimizing method of KVM
CN106909443A (en) * 2017-02-28 2017-06-30 郑州云海信息技术有限公司 The collocation method and device of a kind of virtual machine

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
GREG SCHULZ著,李洪涛等译: "《云和虚拟数据存储网络》", 31 May 2017 *
ZANG, DW;CAO, Z;WANG, Z;LIU, XL;WANG, L ;SUN, NH;: "Decentralized NIC-Switching Architecture Using SR-IOV PCI Express Network Device", 《IEEE MICRO》 *
王展,曹政,刘小丽,苏勇,***,安学军,孙凝晖: "基于单根I/O虚拟化的多根I/O资源池化方法", 《计算机研究与发展》 *

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111063387A (en) * 2019-12-29 2020-04-24 苏州浪潮智能科技有限公司 Method, device and equipment for testing performance of solid state disk and storage medium
CN111625318A (en) * 2020-05-22 2020-09-04 苏州浪潮智能科技有限公司 Communication test method, device and equipment
CN111625318B (en) * 2020-05-22 2023-01-10 苏州浪潮智能科技有限公司 Communication test method, device and equipment
CN113485756A (en) * 2021-06-30 2021-10-08 深圳市科力锐科技有限公司 Hardware equipment configuration method, device, equipment and storage medium
CN113886153A (en) * 2021-08-20 2022-01-04 苏州浪潮智能科技有限公司 Container-based network card pressure testing method and device
CN113886153B (en) * 2021-08-20 2023-06-09 苏州浪潮智能科技有限公司 Network card pressure testing method and device based on container
CN116303148A (en) * 2023-05-17 2023-06-23 北京中科网威信息技术有限公司 Multi-slot device network card detection method and device, electronic device and storage medium
CN116303148B (en) * 2023-05-17 2023-08-22 北京中科网威信息技术有限公司 Multi-slot device network card detection method and device, electronic device and storage medium
CN116909639A (en) * 2023-09-13 2023-10-20 珠海星云智联科技有限公司 Mounting system, method, cluster and storage medium
CN116909639B (en) * 2023-09-13 2023-12-12 珠海星云智联科技有限公司 Mounting system, method, cluster and storage medium

Similar Documents

Publication Publication Date Title
CN109144672A (en) A kind of method, system and associated component for distributing PCIe device
US11061712B2 (en) Hot-plugging of virtual functions in a virtualized environment
US11640363B2 (en) Managing a smart network interface controller (NIC) of an information handling system
US8260841B1 (en) Executing an out-of-band agent in an in-band process of a host system
US7721080B2 (en) Management of option ROM
US9542201B2 (en) Network bios management
US9184991B2 (en) Method and apparatus for developing service processor solutions
EP3398066A1 (en) Fpga-enabled compute instances
US10353713B2 (en) Method to facilitate rapid deployment and rapid redeployment of an information handling system
EP2575041A1 (en) Method and computer for controlling virtual machine
US9417886B2 (en) System and method for dynamically changing system behavior by modifying boot configuration data and registry entries
US10606677B2 (en) Method of retrieving debugging data in UEFI and computer system thereof
CN111857840B (en) BIOS (basic input output system) starting method and device
US10303487B2 (en) System and method for booting an information handling system
US20180246840A1 (en) Intelligent Certificate Discovery in Physical and Virtualized Networks
CN108989145A (en) A kind of test method and device of network interface card virtualized nature
WO2012138046A1 (en) Terminal device and method for executing an android application on a general-purpose operating system, and computer-readable recording medium for same
US8793478B2 (en) Grid computing resources and a method of use thereof
CN107766084A (en) Bootload and installation method and its computing system
US11321077B1 (en) Live updating of firmware behavior
US11144326B2 (en) System and method of initiating multiple adaptors in parallel
US20170344448A1 (en) Comprehensive testing of computer hardware configurations
CN107741868B (en) Setting method and device for Basic Input Output System (BIOS)
US9778936B1 (en) Booting a computing system into a manufacturing mode
CN116627472A (en) Firmware program upgrading method and server of high-speed peripheral component equipment

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20190104

RJ01 Rejection of invention patent application after publication