CN104503825B - One kind is based on KVM hybrid apparatus virtual methods - Google Patents

One kind is based on KVM hybrid apparatus virtual methods Download PDF

Info

Publication number
CN104503825B
CN104503825B CN201410840861.0A CN201410840861A CN104503825B CN 104503825 B CN104503825 B CN 104503825B CN 201410840861 A CN201410840861 A CN 201410840861A CN 104503825 B CN104503825 B CN 104503825B
Authority
CN
China
Prior art keywords
equipment
kvm
virtual
virtual machines
direct
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.)
Active
Application number
CN201410840861.0A
Other languages
Chinese (zh)
Other versions
CN104503825A (en
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.)
Xidian University
Original Assignee
Xidian University
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 Xidian University filed Critical Xidian University
Priority to CN201410840861.0A priority Critical patent/CN104503825B/en
Publication of CN104503825A publication Critical patent/CN104503825A/en
Application granted granted Critical
Publication of CN104503825B publication Critical patent/CN104503825B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses one kind to be based on KVM hybrid apparatus virtual methods, I/O Shortest Path Controllers are accessed by adding virtual machine on existing equipment virtualization model, when needing the virtual machine number for accessing I/O equipment to be more than the number of I/O equipment in physical machine, virtual machine accesses I/O equipment using equipment simulating I/O virtual routes;When needing the virtual machine number for accessing I/O equipment to be less than the number of I/O equipment in physical machine, virtual machine accesses I/O equipment using direct I/O virtual routes.Present invention reduces the average delay that virtual machine accesses I/O equipment, while improve the utilization rate of equipment.

Description

One kind is based on KVM hybrid apparatus virtual methods
Technical field
The present invention relates to computer realm, and in particular to computer resource is virtualized, and thing is accessed suitable for solving virtual machine The problem of managing DeviceMode.
Background technology
Virtualization technology is a kind of to be taken out different types of on physical platform, scattered physical resource by different attribute As, reconfigure, the method that user is presented in the form of logical resource.It is large-scale flat that virtualization technology is applied to IBM etc. earliest On platform machine, because computer speed was slow at that time, resource utilization is low, and computer resource is costly, and people are directed to this Problem proposition improves the utilization rate of resource using the method for time-sharing multiplex physical resource, and this is also the initial thought of virtualization. With the development of computer technology, PC is gradually popularized, and function is also stronger and stronger, and people begin to focus on internal memory and CPU profit With rate problem.Physical memory is abstracted, just generates virtual memory techniques so that application program, which thinks owned, continuously may be used Address space, and actually corresponding physical memory is probably discontinuous, existing for segmentation, even if physical memory is not Foot, application program also can be performed smoothly.Virtual cpu refers on a server while runs multiple operating systems, and this A little systems are mutually isolated, are independent of each other.The high speed development of mobile service caused competition between operator in recent years, such as It is the major issue that major operator must solve that what, which reduces energy consumption and improves resource utilization etc.,.In in view of the above-mentioned problems, State movement propose based on centralized Base-Band Processing pond, remote radio frequency unit and antenna composition collaborative wireless network with And the C-RAN frameworks of the real-time cloud type infrastructure based on open platform.Centralized Base-Band Processing can reduce the same area of covering The quantity of the base station in domain, so as to reduce energy consumption, reduce cost, realize the sustainable growth of business and profit.When processing is single Member is concentrated in after baseband pool, how to realize physical resource to the mapping of virtual resource and improve resource utilization be virtual Change technology needs the key issue solved.Particularly the extensive of the proposition of cloud computing concept in recent years and cloud computing technology should With the hot issue that virtualization technology turns into business circles again and academia is concerned about extensively.
With the development of virtualization technology, CPU has obtained in depth research with internal memory virtualization technology and performance has Very big raising.Although recent years is all paying close attention to the research of I/O device virtualizations both at home and abroad, because physical equipment is various Property, the device category and unit type of same manufacturer are also different, the equipment interface mark used under different communication protocol Accurate also different, these all realize that virtualization and performance boost bring certain difficulty to I/O equipment.Hardware platform at present On, I/O handling capacity rises appreciably, and the performance of I/O equipment directly affects the height of whole system performance.Investigation display, in void In planization system, live load caused by the frequent access of I/O is much larger than because of load caused by calculating, therefore improves I/O equipment The performance of virtualization is to study an important task in virtualization technology work.
At present, have for virtualization several than more typical product, such as VMware, Xen, KVM etc..Pressed under every kind of product The location of VMM differences, can have again it is different realize framework, such as monitoring model (Hypervisor Model), Su Zhumo Type (Host-based Model) and mixed model (Hybrid Model).Comparison at present to KVM researchs is more, KVM (Kernel-based Virtual Machine) is a kind of software virtual machine of increasing income of GPL authorizations, is aided in based on hardware Virtualization solution.Different from other virtual machines, kernel module independent as one KVM is present in system, with Linux is combined fine, system kernel itself is turned into a virtual machine management program, reduces the code of virtualization exploitation Amount.KVM can provide the virtualization of CPU and internal memory, but itself does not have equipment simulating effect, realize the virtual of physical equipment Changing needs by means of QEMU simulators, and QEMU is the analog processor software of increasing income write by Fabrice Bel lard, energy The simulation of various processor framework is supported, including X86, ARM, PowerPC etc..It is currently based on KVM physical equipment virtual methods There are two kinds, i.e. equipment simulating I/O is virtualized and direct I/O virtual methods.Both device virtualization methods have its advantage And shortcoming, it is that it is low to hardware platform dependence the advantages of equipment simulating I/O virtual methods, various set can be simulated It is standby, it is not necessary to which that host and the special technical support of KVM virtual machines, simulation code module compatibility are high.Shortcoming is that I/O accesses road Path length, completing an I/O request needs KVM modules and KVM virtual machines, repeatedly switches between KVM modules and QEMU, data copy Often so that KVM virtual machine performances decline.Direct I/O virtual methods overcome the defects of context switching, also shorten Virtual machine accesses the path of I/O equipment, and I/O performances are almost identical with physical conditions under this method, but a server On motherboard space it is limited, it is allowed to the PCI and PCIE device of addition are also limited, after equipment is directly distributed, can only fix by one Individual virtual machine accesses, and the utilization rate of physical equipment is not high.
The content of the invention
In view of the shortcomings of the prior art, consider in practical application, baseband pool physical equipment resource-constrained, and virtual machine is opened Number fluctuation it is bigger, be based on KVM hybrid apparatus virtual methods the present invention is directed to propose a kind of, visited with reducing virtual machine I/O average delay is asked, while improves the utilization rate of equipment.
To achieve these goals, the present invention adopts the following technical scheme that:
One kind is based on KVM hybrid apparatus virtualization systems, including linux kernel, KVM virtual machines, KVM modules, QEMU Simulation code module, KVM monitor of virtual machine and the physical machine provided with I/O equipment, it is additionally provided with virtual machine and accesses I/O Shortest Path Controller.
It should be noted that the virtual machine accesses the crucial portion that I/O Shortest Path Controllers are the virtualization systems Part, it is to realize that optimization KVM virtual machines access the key means of I/O equipment virtual routes, it is substantially a kind of selecting switch.
Based on said system, one kind is based on KVM hybrid apparatus virtual methods, comprised the following steps:
The collection of I/O equipment idle S1 shares E expressions, and the collection of occupied I/O equipment shares B expressions, by KVM virtual machines The collection of the I/O equipment accessed with direct I/O virtual routes is shared B_d and represented, by KVM virtual machines with the virtual roads of equipment simulating I/O The collection for the I/O equipment that footpath accesses shares B_s expressions;It is T that each I/O equipment, which also needs the time of execution task, in note B_dd, selection Go out Td<T0I/O equipment, form set B_p, wherein, T0The threshold value waited for task;
It is K that S2 notes open the KVM virtual machines number for needing to access I/O equipment every time, and Ne and Nbp then represent set respectively The number of element in E and set B_p;Virtual machine accesses the Relationship Comparison that I/O Shortest Path Controllers pass through Ne, Nbp and K KVM virtual machines select optimal I/O virtual routes to access I/O equipment.
It should be noted that step S2 specific steps include:
2.1) Ne is worked as>During=K, K KVM virtual machine accesses I/O equipment using direct I/O virtual routes;
2.2) when 0<Ne<K and Nbp+Ne>During K, then KVM virtual machines are ranked up according to necessarily required priority, point Preceding Ne KVM virtual machines I/O equipment is not accessed into direct I/O virtual routes, remaining K-Ne KVM virtual machine is waited in line I/O equipment in B_p set, there is the I/O equipment for completing to handle, then KVM virtual machines just access the I/ with direct I/O virtual routes O device;When 0<Ne<K and Nbp+Ne<During K, then KVM virtual machines are ranked up according to the priority of identical requirement, first Ne empty Plan machine accesses idle I/O equipment with direct I/O virtual routes, and remaining Nbp virtual machine is waited in line with direct I/O successively Virtual route accesses the I/O equipment in B_p, and last remaining KVM virtual machines are accessed in B_s with equipment simulating I/O virtual routes I/O equipment, and make the KVM virtual machines that are loaded in these I/O equipment balanced;
2.3) as Ne=0, then KVM virtual machines are ranked up according to the priority of requirement identical with step 2.2), it is preceding Nbp KVM virtual machine is waited in line to access the I/O equipment in B_p with direct I/O virtual routes, remaining with equipment simulating I/O Virtual route accesses the I/O equipment in B_s, and the KVM virtual machine numbers of these I/O apparatus of load is reached balanced.
It should be further stated that step 2.2) and 2.3) in, it is specifically virtual to KVM according to the priority of task requests Machine is ranked up.
Needing further explanation is, KVM virtual machines access the method tool of I/O equipment using equipment simulating I/O virtual routes Body is as follows:
A1) KVM virtual machines initiate I/O operation request, are intercepted and captured by the I/O capture codes in KVM modules, I/O captures Code carries out respective handling to I/O request commands, parses go out port numbers, the sizes of data, initial address etc. information, and this A little information are stored in I/O and shared in page, and I/O capture codes and QEMU simulation codes module share page interactive information by I/O;
A2) I/O captures code notifies QEMU simulation code modules to have I/O requests to need to handle in the form of interrupting, QEMU I/O is accessed after simulation code is notified and shares page, is shared from I/O and the specifying information that the I/O is asked is obtained in page and by simulating Code goes out corresponding I/O operation;
A3 result is put back into I/O and shared in page by QEMU simulation codes module after the completion of) operating, while in the form of interruption Notify to capture code to the I/O in KVM modules;
A4) I/O captures code shares read operation result in page from I/O, and the result is fed back to KVM by backtracking Virtual machine, at this moment KVM virtual machines complete I/O request operation.
It should be further stated that when KVM virtual machines access I/O equipment using direct I/O modes, direct I/O is realized Device virtualization needs to change linux kernel and QEMU;Comprise the following steps that:
B1) the direct I/O virtualizations due to realizing I/O equipment need the support of hardware, therefore in the substantially defeated of physical machine Enter output system (BIOS) and be provided with a VT-d functional module, it is necessary to which this functional module is opened when opening physical machine; Need to detect the hardware for supporting direct I/O device virtualizations before remapping using DMA, according to BIOS ACPI table solution Separate out each DMA in physical machine remap it is described support direct I/O device virtualizations hardware include the hardware register address, All information including the I/O equipment of management, and these information are reported to upper layer software (applications);System can be carried out according to these information Identify and enter the initialization of I/O equipment;
B2) it is abstracted I/O equipment
Before the KVM virtual machines use target I/O equipment, KVM virtual machines are hidden by equipment stops that other KVM are virtual Machine or host are accessed it;QEMU is simulated the I/O equipment come in KVM virtual machines as setting by QEMU simulation codes module Standby placeholder, then in the I/O device maps of distribution to simulation I/O equipment;
B3) KVM virtual machines start initialization
Before KVM virtual machines start, I/O port conversion lists, MMIO conversion tables and KVM virtual machine I/O page tables are created;I/O Port conversion list and MMIO conversion tables are mainly used in the conversion that Virtual Base location register (PCI Bar) arrives true PCI Bar, KVM virtual machine I/O page tables are used for address conversion.
It should be further stated that step b1) in, the initialization of I/O equipment includes establishing and initializes root entry, bypass Translation cache device (IOTLB) initializes and the initialization of context entries.
It should be further stated that step b2) in, main in the I/O device maps of distribution to simulation I/O equipment Including to I/O equipment distribution marker, fill PCI configuration information, establish PCI Bar mapping.
The beneficial effects of the present invention are:
1st, I/O equipment is made to be able to carry out the live load of virtual machine, when reducing the average access of virtual machine access I/O equipment Prolong;And improve utilization rate of equipment and installations;
2nd, KVM virtual machines are supported to access I/O equipment in a different manner;
3rd, device resource is dynamically assigned to KVM virtual machines, without requiring that the I/O equipment to virtualization is carried out significantly Hardware changes;
4th, device software and (or) firmware can be changed, to support that the live load of different virtual machine is isolated and adjusted Degree.
Brief description of the drawings
Fig. 1 is the General Implementing schematic diagram of the present invention;
Fig. 2 is based on KVM equipment simulating I/O virtualization models;
Fig. 3 is based on the direct I/O virtualization models of KVM;
Embodiment
Below with reference to accompanying drawing, the invention will be further described, it is necessary to which explanation, the present embodiment is with this technology side Premised on case, detailed embodiment and specific operating process are provided, but be not limited to the present embodiment.
One kind is based on KVM hybrid apparatus virtualization systems, including linux kernel, KVM virtual machines, KVM modules, QEMU Simulation code module, KVM monitor of virtual machine and the physical machine provided with I/O equipment, it is additionally provided with virtual machine and accesses I/O Shortest Path Controller.
It should be noted that the virtual machine accesses the crucial portion that I/O Shortest Path Controllers are the virtualization systems Part, it is to realize that optimization KVM virtual machines access the key means of I/O equipment virtual routes, it is substantially a kind of selecting switch.
As shown in figure 1, being based on said system, one kind is based on KVM hybrid apparatus virtual methods, comprises the following steps:
The collection of I/O equipment idle S1 shares E expressions, and the collection of occupied I/O equipment shares B expressions, by KVM virtual machines The collection of the I/O equipment accessed with direct I/O virtual routes is shared B_d and represented, by KVM virtual machines with the virtual roads of equipment simulating I/O The collection for the I/O equipment that footpath accesses shares B_s expressions;It is T that each I/O equipment, which also needs the time of execution task, in note B_dd, selection Go out Td<T0I/O equipment, form set B_p, wherein, T0The threshold value waited for task;
It is K that S2 notes open the KVM virtual machines number for needing to access I/O equipment every time, and Ne and Nbp then represent set respectively The number of element in E and set B_p;Virtual machine accesses I/O Shortest Path Controllers by being to Ne, Nbp, K Relationship Comparison KVM virtual machines select optimal I/O virtual routes to access I/O equipment;
Step S2 is actually that virtual machine accesses I/O path controllers according to the number of I/O equipment in physical machine and KVM void The number of plan machine, equipment simulating I/O virtual routes or direct I/O virtual routes is selected to access I/O equipment for KVM virtual machines.
It should be noted that step S2 specific steps include:
2.1) Ne is worked as>During=K, K KVM virtual machine accesses I/O equipment using direct I/O virtual routes;
2.2) when 0<Ne<K and Nbp+Ne>During K, then KVM virtual machines are ranked up according to necessarily required priority, point Preceding Ne KVM virtual machines I/O equipment is not accessed into direct I/O virtual routes, remaining K-Ne KVM virtual machine is waited in line I/O equipment in B_p set, there is the I/O equipment for completing to handle, then KVM virtual machines just access the I/ with direct I/O virtual routes O device;When 0<Ne<K and Nbp+Ne<During K, then KVM virtual machines are ranked up according to the priority of identical requirement, first Ne empty Plan machine accesses idle I/O equipment with direct I/O virtual routes, and remaining Nbp virtual machine is waited in line with direct I/O successively Virtual route accesses the I/O equipment in B_p, and last remaining KVM virtual machines are accessed in B_s with equipment simulating I/O virtual routes I/O equipment, and make the KVM virtual machines that are loaded in these I/O equipment balanced;
2.3) as Ne=0, then according to being ranked up with step 2.2) identical priority to KVM virtual machines, preceding Nbp is individual KVM virtual machines are waited in line to access the I/O equipment in B_p with direct I/O virtual routes, remaining virtual with equipment simulating I/O I/O equipment of the path access in B_s, and the KVM virtual machine numbers of these I/O apparatus of load is reached balanced.
It should be further stated that step 2.2) and 2.3) in, it is specifically virtual to KVM according to the priority of task requests Machine is ranked up.
Needing further explanation is, is set as shown in Fig. 2 KVM virtual machines access I/O using equipment simulating I/O virtual routes Standby method is specific as follows:
A1) KVM virtual machines initiate I/O operation request, are intercepted and captured by the I/O capture codes in KVM modules, I/O captures Code carries out respective handling to I/O request commands, parses go out port numbers, the sizes of data, initial address etc. information, and this A little information are stored in I/O and shared in page, and I/O capture codes and QEMU simulation codes module share page interactive information by I/O;
A2) I/O captures code notifies QEMU simulation code modules to have I/O requests to need to handle in the form of interrupting, QEMU I/O is accessed after simulation code is notified and shares page, is shared from I/O and the specifying information that the I/O is asked is obtained in page and by simulating Code goes out corresponding I/O operation;
A3 result is put back into I/O and shared in page by QEMU simulation codes module after the completion of) operating, while in the form of interruption Notify to capture code to the I/O in KVM modules;
A4) I/O captures code shares read operation result in page from I/O, and the result is fed back to KVM by backtracking Virtual machine, at this moment KVM virtual machines complete I/O request operation.
Needing further explanation is, as shown in figure 3, when KVM virtual machines access I/O equipment using direct I/O virtual routes, Realize that direct I/O device virtualizations need to change linux kernel and QEMU;It is comprised the following steps that:
B1 hardware detecting and the initialization of direct I/O virtualizations) are supported
Direct I/O due to realizing I/O equipment virtualizes the support for needing hardware, therefore defeated in the input substantially of physical machine Go out system (BIOS) and be provided with a VT-d functional module, it is necessary to which this functional module is opened when opening physical machine;Use DMA is needed to detect the hardware for supporting direct I/O virtualizations before remapping, and physics is parsed according to BIOS ACPI table Each DMA on machine remaps the I/O for including the hardware register address, managing for supporting direct I/O virtualization hardwares All information including equipment, and these information are reported to upper layer software (applications);System can be identified according to these information and Initialized into I/O equipment;
B2) it is abstracted I/O equipment
Direct I/O, which is virtualized, causes target I/O equipment to be monopolized by a KVM virtual machine, therefore is used in the KVM virtual machines Need to stop that other KVM virtual machines or host access it before target I/O equipment, hidden and solved using equipment in virtual machine This problem so that other KVM virtual machines or host can not detect the I/O equipment in addition to target KVM virtual machines, therefore Also this I/O equipment can not just be accessed.Abstract equipment is that hiding real equipment is abstracted to target KVM virtual machines to know Not.QEMU is mainly used in equipment simulating, but still needs to by means of QEMU simulation codes when realizing that direct I/O is accessed using VT-d technologies Module, it simulates QEMU the I/O equipment come and reflected in KVM virtual machines as equipment placeholder, then the I/O equipment of distribution It is mapped in simulation I/O equipment, what is used in KVM virtual machines is still I/O equipment.
B3) KVM virtual machines start initialization
Before KVM virtual machines start, I/O port conversion lists, MMIO conversion tables and KVM virtual machine I/O page tables are created;I/O Port conversion list and MMIO conversion tables are mainly used in conversions of the Virtual PC I Bar to true PCI Bar, KVM virtual machine I/O page tables For address conversion.
It should be further stated that step b1) in, the initialization of I/O equipment includes establishing and initializes root entry, bypass Translation cache device (IOTLB) initializes and the initialization of context entries.
It should be further stated that step b2) in, main in the I/O device maps of distribution to simulation I/O equipment Including to equipment distribution marker, fill PCI configuration information, establish PCI Bar mapping.
For those skilled in the art, technical scheme that can be more than and design, provide various corresponding Change and deform, and all these change and deformation should be construed as being included within the protection domain of the claims in the present invention.

Claims (7)

1. one kind is based on KVM hybrid apparatus virtualization systems, including linux kernel, KVM virtual machines, KVM modules, QEMU moulds Intend code module, KVM monitor of virtual machine and the physical machine provided with I/O equipment, it is characterised in that be additionally provided with virtual machine visit Ask I/O Shortest Path Controllers;
It is described to be comprised the following steps based on KVM hybrid apparatus virtualization systems based on KVM hybrid apparatus virtual methods:
The collection of I/O equipment idle S1 shares E expressions, and the collection of occupied I/O equipment shares B expressions, by KVM virtual machines with straight The collection for connecing the I/O equipment of I/O virtual routes access shares B_d expressions, is visited by KVM virtual machines with equipment simulating I/O virtual routes The collection for the I/O equipment asked shares B_s expressions;It is T that each I/O equipment, which also needs the time of execution task, in note B_dd, select Td< T0I/O equipment, form set B_p, wherein, T0The threshold value waited for task;
S2 note every time open need access I/O equipment KVM virtual machines number be K, and Ne and Nbp then respectively represent set E with The number of element in set B_p;It is empty for KVM by Ne, Nbp and K Relationship Comparison that virtual machine accesses I/O Shortest Path Controllers Plan machine selects optimal I/O virtual routes to access I/O equipment.
2. one kind according to claim 1 is based on KVM hybrid apparatus virtualization systems, it is characterised in that step S2's Specific steps include:
2.1) Ne is worked as>During=K, K KVM virtual machine accesses idle I/O equipment using direct I/O virtual routes;
2.2) when 0<Ne<K and Nbp+Ne>During K, then KVM virtual machines are ranked up according to necessarily required priority, respectively will Preceding Ne KVM virtual machines access idle I/O equipment with direct I/O virtual routes, and remaining K-Ne KVM virtual machine is lined up etc. The I/O equipment in B_p set is treated, when having the I/O equipment for completing to handle, then KVM virtual machines are just accessed with direct I/O virtual routes The I/O equipment;When 0<Ne<K and Nbp+Ne<During K, then KVM virtual machines are ranked up according to the priority of identical requirement, preceding Ne Individual virtual machine accesses idle I/O equipment with direct I/O virtual routes, and remaining Nbp virtual machine is waited in line with straight successively The I/O equipment in I/O virtual routes access B_p is connect, last remaining KVM virtual machines are accessed with equipment simulating I/O virtual routes The KVM virtual machines that I/O equipment in B_s and making loads in these I/O equipment are balanced;
2.3) as Ne=0, then KVM virtual machines are ranked up according to the priority of requirement identical with step 2.2), preceding Nbp KVM virtual machines are waited in line to access the I/O equipment in B_p with direct I/O virtual routes, remaining virtual with equipment simulating I/O I/O equipment of the path access in B_s simultaneously makes the KVM virtual machine numbers of these I/O apparatus of load reach balanced.
3. one kind according to claim 2 is based on KVM hybrid apparatus virtualization systems, it is characterised in that step 2.2) In 2.3), specifically KVM virtual machines are ranked up according to the priority of task requests.
4. KVM hybrid apparatus virtualization systems are based on according to any described one kind of claim 1-3, it is characterised in that KVM The method that virtual machine accesses I/O equipment using equipment simulating I/O virtual routes is specific as follows:
A1) KVM virtual machines initiate I/O operation request, are intercepted and captured by the I/O capture codes in KVM modules, I/O capture codes Respective handling is carried out to I/O request commands, parses go out port numbers, the size of data, the information of initial address, and these information It is stored in I/O to share in page, I/O capture codes and QEMU simulation codes module share page interactive information by I/O;
A2) I/O captures code notifies QEMU simulation codes to have I/O requests to need to handle in the form of interrupting, QEMU simulation codes I/O is accessed after notified and shares page, the specifying information that I/O requests are obtained in page is shared from I/O and simulates corresponding I/O Operation;
A3 result is put back into I/O and shared in page by QEMU simulation codes module after the completion of) operating, while is notified in the form of interruption Code is captured to the I/O in KVM modules;
A4) I/O captures code and shares read operation result in page from I/O, and it is virtual that the result by backtracking fed back to KVM Machine, at this moment KVM virtual machines complete I/O request operation.
5. one kind according to claim 1,2 or 3 is based on KVM hybrid apparatus virtualization systems, it is characterised in that KVM When virtual machine accesses I/O equipment using direct I/O virtual routes, realize direct I/O virtualization need to change linux kernel and QEMU;It is comprised the following steps that:
B1 hardware detecting and the initialization of direct I/O virtualizations) are supported
Direct I/O due to realizing I/O equipment virtualizes the support for needing hardware, therefore in the basic input and output system of physical machine System (BIOS) is provided with VT-d functional modules, it is necessary to start the VT-d functional modules when opening physical machine;Use DMA weights Need to detect the hardware for supporting direct I/O virtualizations before mapping, parsed according to BIOS ACPI table in physical machine Each DMA remap it is described support direct I/O virtualization hardwares include the hardware register address, the I/O equipment of management All information inside, and these information are reported to upper layer software (applications);System can be identified and enter according to these information I/O equipment initializes;
B2) it is abstracted I/O equipment
Before KVM virtual machines use target I/O, KVM virtual machines are hidden by equipment stops other KVM virtual machines or host It is accessed;QEMU is simulated the I/O equipment come in KVM virtual machines as equipment placeholder by QEMU simulation codes module, Again in the I/O device maps of distribution to simulation I/O equipment;
B3) KVM virtual machines start initialization
Before KVM virtual machines start, I/O port conversion lists, MMIO conversion tables and KVM virtual machine I/O page tables are created;I/O ports Conversion table and MMIO conversion tables are used for Virtual PC I Bar to true PCI Bar conversion, and KVM virtual machine I/O page tables are used for address Conversion.
6. one kind according to claim 5 is based on KVM hybrid apparatus virtualization systems, it is characterised in that step b1) In, I/O equipment, which initializes, includes establishing and initializes the first of root entry, the initialization of bypass translation cache device and context entries Beginningization.
7. one kind according to claim 5 is based on KVM hybrid apparatus virtualization systems, it is characterised in that step b2) In, include in the I/O device maps of distribution to simulation I/O equipment to equipment distribution marker, filling PCI configuration information, Establish PCI Bar mappings.
CN201410840861.0A 2014-12-29 2014-12-29 One kind is based on KVM hybrid apparatus virtual methods Active CN104503825B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410840861.0A CN104503825B (en) 2014-12-29 2014-12-29 One kind is based on KVM hybrid apparatus virtual methods

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410840861.0A CN104503825B (en) 2014-12-29 2014-12-29 One kind is based on KVM hybrid apparatus virtual methods

Publications (2)

Publication Number Publication Date
CN104503825A CN104503825A (en) 2015-04-08
CN104503825B true CN104503825B (en) 2017-11-24

Family

ID=52945226

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410840861.0A Active CN104503825B (en) 2014-12-29 2014-12-29 One kind is based on KVM hybrid apparatus virtual methods

Country Status (1)

Country Link
CN (1) CN104503825B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105653372B (en) * 2015-12-30 2019-03-29 中电科华云信息技术有限公司 The method for realizing multiple virtualization mixed management and scheduling based on cloud platform
CN106970821B (en) * 2016-01-12 2021-02-02 阿里巴巴集团控股有限公司 Method and device for processing I/O request under KVM virtualization
CN106371895A (en) * 2016-09-04 2017-02-01 国云科技股份有限公司 Method for upgrading KVM (Kernel-based Virtual Machine) for de-virtualization
CN107977251B (en) * 2016-10-21 2023-10-27 超威半导体(上海)有限公司 Exclusive access to shared registers in virtualized systems
CN106789337B (en) * 2017-01-18 2020-06-26 郑州云海信息技术有限公司 Network performance optimization method of KVM
CN107977256A (en) * 2017-12-15 2018-05-01 郑州云海信息技术有限公司 It is a kind of to the access method of FPGA accelerator cards, device and medium
CN113886007B (en) * 2021-09-18 2022-03-01 云宏信息科技股份有限公司 Configuration method, management method, system and medium for KVM virtualization system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101876954A (en) * 2009-12-23 2010-11-03 中国科学院计算技术研究所 Virtual machine control system and working method thereof
CN103034526A (en) * 2012-12-06 2013-04-10 中国电信股份有限公司云计算分公司 Realization method and device of virtualized service
CN103473139A (en) * 2013-09-26 2013-12-25 四川中电启明星信息技术有限公司 Virtual machine cluster resource allocation and scheduling method
CN103605562A (en) * 2013-12-10 2014-02-26 浪潮电子信息产业股份有限公司 Method for migrating kernel-based virtual machine (KVM) between physical hosts
CN104050014A (en) * 2014-05-23 2014-09-17 上海爱数软件有限公司 Efficient storage management method based on virtualization platform

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101876954A (en) * 2009-12-23 2010-11-03 中国科学院计算技术研究所 Virtual machine control system and working method thereof
CN103034526A (en) * 2012-12-06 2013-04-10 中国电信股份有限公司云计算分公司 Realization method and device of virtualized service
CN103473139A (en) * 2013-09-26 2013-12-25 四川中电启明星信息技术有限公司 Virtual machine cluster resource allocation and scheduling method
CN103605562A (en) * 2013-12-10 2014-02-26 浪潮电子信息产业股份有限公司 Method for migrating kernel-based virtual machine (KVM) between physical hosts
CN104050014A (en) * 2014-05-23 2014-09-17 上海爱数软件有限公司 Efficient storage management method based on virtualization platform

Also Published As

Publication number Publication date
CN104503825A (en) 2015-04-08

Similar Documents

Publication Publication Date Title
CN104503825B (en) One kind is based on KVM hybrid apparatus virtual methods
CN102184122B (en) Interrupt realizing method for Loongson central processing unit (CPU) mainboard
CN101751284A (en) I/O resource scheduling method for distributed virtual machine monitor
CN104021109B (en) Technology for transmitting interruption in computer systems
CN102819312B (en) For the super operating system of a heterogeneous computer system
CN100570562C (en) Video card, the dummy machine system of using this video card and display processing method
US10241817B2 (en) Paravirtualized access for device assignment by bar extension
WO2013091185A1 (en) Gpu accelerated address translation for graphics virtualization
US9423958B2 (en) System and method for managing expansion read-only memory and management host thereof
CN104486255A (en) Service resource dispatching method and device
CN101477496A (en) NUMA structure implementing method based on distributed internal memory virtualization
CN103282881A (en) Direct sharing of smart devices through virtualization
CN101203838A (en) Address window support for direct memory access translation
CN101183315A (en) Paralleling multi-processor virtual machine system
CN101876954B (en) Virtual machine control system and working method thereof
CN103793260A (en) Platform virtualization system
CN110427284A (en) Data processing method, distributed system, computer system and medium
CN101739283A (en) Computer and method for virtual system to directly access computer hardware
US20060277357A1 (en) Inter-domain data mover for a memory-to-memory copy engine
CN103744716A (en) Dynamic interrupt balanced mapping method based on current virtual central processing unit (VCPU) scheduling state
CN103455363B (en) Command processing method, device and physical host of virtual machine
CN104583959A (en) Enabling virtualization of processor resource
CN107491340A (en) Across the huge virtual machine realization method of physical machine
CN105556473A (en) I/O task processing method, device and system
CN106909349A (en) A kind of UEFI firmware implementation methods based on server

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant