CN102567217A - MIPS platform-oriented memory virtualization method - Google Patents

MIPS platform-oriented memory virtualization method Download PDF

Info

Publication number
CN102567217A
CN102567217A CN2012100011882A CN201210001188A CN102567217A CN 102567217 A CN102567217 A CN 102567217A CN 2012100011882 A CN2012100011882 A CN 2012100011882A CN 201210001188 A CN201210001188 A CN 201210001188A CN 102567217 A CN102567217 A CN 102567217A
Authority
CN
China
Prior art keywords
gva
client computer
tlb
mapping
address
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.)
Granted
Application number
CN2012100011882A
Other languages
Chinese (zh)
Other versions
CN102567217B (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.)
Beihang University
Original Assignee
Beihang 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 Beihang University filed Critical Beihang University
Priority to CN201210001188.2A priority Critical patent/CN102567217B/en
Publication of CN102567217A publication Critical patent/CN102567217A/en
Application granted granted Critical
Publication of CN102567217B publication Critical patent/CN102567217B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention relates to a microprocessor without interlocked piped stages (MIPS) platform-oriented memory virtualization method. The method comprises an address forming method of MIPS platform-oriented memory virtualization, an address space forming method of MIPS platform-oriented memory virtualization, an address forming and address space mapping method of MIPS platform-oriented memory virtualization, an address forming and address space mapping maintenance mechanism of MIPS platform-oriented memory virtualization and an address mapping realization process of MIPS platform-oriented memory virtualization. The MIPS platform-oriented memory virtualization method has the following advantages that: (1) the technical problems, such as lack of hardware assist and support for a MIPS processor, three layers of address mapping of memory virtualization in the MIPS platform, isolation and security of access to a physical memory by multiple virtual machines, and the like, are all solved; (2) the system has the advantage of light weight; (3) the virtualization application requirement in the embedded field can be satisfied, and the virtualization application requirement in the server field also can be satisfied.

Description

A kind of internal memory virtualization method towards the MIPS platform
Technical field
The invention discloses a kind of internal memory virtualization method; Relate in particular to internal memory virtualization method (MIPSVMem) towards the MIPS platform; MIPS refers to " not having the microprocessor of inner interlocking pipelining-stage " (Microprocessor withoutinterlocked piped stages), belongs to field of computer technology.
Background technology
System virtualizationization is the research direction that Computer Systems Organization combines with computer system software.It is through increasing monitor of virtual machine (Virtual Machine Monitor, be called for short VMM) between computer system hardware and operating system, the physical resource of computer system is carried out abstract, isolates the tight dependence between hardware system structure and the software; Through multiple physical resources such as the CPU of dynamic organization, internal memory, I/O, make up the virtual machine of a plurality of mutual isolation flexibly, satisfy diversified application demand; Through the time between the excavation application and the concurrency in space, improve the utilization factor of resource.
Intel Virtualization Technology proposes in the sixties in 20th century first, mainly is in order large scale computer hardware to be carried out subregion to improve the hardware utilization factor at that time.In the eighties in 20th century and the nineties, because client-server application program and cheap x86 server and the development of desktop computer, when distributed computing technology was increasingly mature, Intel Virtualization Technology had made no public appearances at that time basically.The nineties in 20th century Windows be widely used and Linux as the appearance of server OS, the industry standard status of having established the x86 server.Along with the growth that x86 server and desktop are disposed, brought newly like an IT infrastructure and running difficult problems such as retractility, dirigibility and poor reliability, this makes Intel Virtualization Technology obtain recovery in recent years.In recent years along with the popularization day by day of cloud computing, the advantage of Intel Virtualization Technology on commercial application embodies day by day.Virtual enterprise's traditional I T infrastructure deployment and the way to manage of having changed significantly improved retractility, dirigibility and the reliability of infrastructure.Its notion has been deep in enterprise even everyone daily work and the life, becomes one of technology with fastest developing speed in the present global software industry.
In recent years; Develop rapidly along with the MIPS cpu performance; The application of MIPS CPU has been not limited only to traditional embedded system field; The high performance MIPS CPU of part also is applied in the commercial server gradually, and also promptly embedded still server field is all to the expansion day by day of MIPS platform and virtualization applications demand thereof.Along with since the Intel Virtualization Technology fast development, comprised the flush bonding processor field of MIPS architecture processor on the other hand, Intel Virtualization Technology has been proposed new demand.Yet; Through to X86, PowerPC (PPC), the contrast (table 1) of MIPS etc. can be found out; MIPS CPU exists to press for and solves virtual leak and problem such as support hardware is not auxiliary virtual, and this makes and faces technological challenge towards MIPS Platform Implementation system virtual machine.
Figure BDA0000128650250000021
Table 1
As do not have the support of appropriate Intel Virtualization Technology, will bring huge resistance embedded with popularization server market to MIPS CPU.MI PS processor wants in embedded system, and especially server market takies prior one seat, and Intel Virtualization Technology is especially very urgent with the technological breakthrough of the auxiliary support issue of no hardware towards its virtual leak.
Towards the system virtual machine of MIPS platform comprise that CPU is virtual, internal memory virtualization and the virtual gordian technique of IO.The I internal memory virtualization adopts the shared thought of piecemeal usually as one of gordian technique in the system virtual machine, and promptly VMM need give each virtual machine with the Memory Allocation of machine, and the mapping relations of machine maintenance internal memory and virtual machine finding " physics " internal memory.Through internal memory virtualization, each virtual machine can have one since 0 continuous physical address space; And, can effectively isolate between each virtual machine, scheduling and shared drive resource.
The system virtual machine research relevant with the present invention is concluded and is got up can comprise two aspects progress; The system-oriented design of virtual machine with realize that (like one Chinese patent application number is 200610139664.1 to gordian technique, and name is called " a kind of dummy machine system and CPU dispatching method thereof "; The Chinese patent publication number is CN1740989; Name is called " general-purpose built-in type system virtualization page attribute management method "); Key application based on system virtual machine is technological, and (like the Chinese patent publication number is CN102194080A, and name is called " a kind of rootkit testing mechanism and detection method based on kernel virtual machine "; One Chinese patent application number is 02137511.9, and name is called " a kind of virtual machine that is used for embedded systemic software development "; The Chinese patent publication number is CN102243571A, and name is called " a kind of many forms towards embedded Hypervisor show the virtualization operations method ").Representational system comprises the virtualization system DISCO based on MIPS R10000 processor that Stanford University developed in 1997, and the system software platform OKL4 that increases income that developed of Open Kernel Labs.But sum up existing result of study and realization system; Existing research and invention exist following trend and problem: on architecture; Major part is design, realization and the invention of improvement gordian technique that proposes towards architecture platforms such as X86; In the invention of embedded system platform; (virtual machine technique is auxiliary to realize that virtual many forms show and detection to the virtual machine application technology as utilizing, and is CN 102194080A corresponding to the Chinese patent publication number, and name is called " a kind of rootkit testing mechanism and detection method based on kernel virtual machine "; The Chinese patent publication number is CN102243571A, and name is called " a kind of many forms towards embedded Hypervisor show the virtualization operations methods " etc.) on the high side.Intel Virtualization Technology proposed in the 60-70 age; Basically make no public appearances in the 80-90 age, revive once more, and the system-level virtual machine of main employing in early stage weight is (like QEMU up to the nineties; XEN etc.), there is the bigger problem of performance cost in the system virtual machine based on the heavyweight virtual machine.And along with the popularization of virtual machine range of application, the operating system grade/kernel level virtual machine (like KVM, OPENVZ etc.) of light weight obtains increasingly extensive attention in the recent period.
Towards aspect the internal memory virtualization technology of MIPS platform, in order to let Guest OS can have a contiguous memory space isolation, since 0, monitor of virtual machine (VMM) has been introduced the new address space of one deck, i.e. client computer physical address space.Thereby formed from client computer virtual address (the Guest Virtual Address at application program place; GVA) to client computer physical address (Guest Physical Address; GPA), arrive host physical address (HostPhysical Address, layer 3 address mapping structure HPA) again.This three-decker makes the memory management unit MMU under the original non-virtualized environment lose effect, because common MMU can only accomplish the conversion that a time virtual address arrives physical address.Therefore, VMM need dynamically safeguard the mapping relations of GPA to HPA for each virtual machine.VMM inserts GVA among the MMU to the mapping of HPA through intercepting and capturing the instruction of revising the client computer page table or refreshing TLB, accomplishes the foundation of layer 3 address mapping.In order to realize the accessing operation to a GVA of virtual machine, VMM need accomplish three times address translation: at first GVA will be converted into GPA, and GPA is further converted into HVA then, and last HVA is converted into HPA again, accomplishes accessing operation.Because the MMU of processor only can accomplish the primary address conversion, therefore, the key issue that internal memory virtualization need solve is exactly how to assist MMU to accomplish the repeatedly address translation operation of GVA to HPA.In addition, internal memory virtualization also need solve a plurality of virtual machines to isolation and safety problem between the physical memory visit.A plurality of virtual machines run on the same physical machine, and the employed virtual memory of different virtual machine is in fact corresponding to the zones of different on the same physical machine.In order to guarantee isolation and the safety between a plurality of virtual machines, VMM need let each virtual machine run in the shielded environment, prevents that the accessing operation of virtual machine from producing destruction to physical memory.
To sum up can know; System virtualization Study on Technology towards the MIPS platform lacks with invention relatively at present; Especially there is not the auxiliary support of hardware to the MIPS platform; The mapping of the layer 3 address that faces during internal memory virtualization, a plurality of virtual machine be to isolation and security problems between the physical memory visit, more lacks based on the research and the invention of the internal memory virtualization of lightweight virtual machine (kernel virtual machine KVM).
Summary of the invention
The purpose of this invention is to provide a kind of internal memory virtualization method towards the MIPS platform; Particularly be to isolation and safety problem between the physical memory visit to the virtual leak of MIPS platform, the auxiliary support of no hardware, the mapping of internal memory virtualization layer 3 address, a plurality of virtual machine; Based on lightweight kernel virtual machine (KVM); Invent a kind of based on " shadow TLB " internal memory virtualization method towards the MIPS platform; Realizing that internal memory between host and the client computer is isolated and the distribution and the management of the virtual internal memory of client computer, for application such as virtual provides the support of internal memory virtualization system software towards the system virtual machine of MIPS platform and upper strata.
Technical thought of the present invention is following: because the X86 platform mainly adopts the shadow page table technology; And MIPS platform instruction set architecture adopts the technology of the TLB of software maintenance; Therefore; Be different from the internal memory virtualization method towards the X86 platform that realizes based on kernel virtual machine, employing " shadow page table " technology, the present invention adopts " shadow TLB " technology to realize the internal memory virtualization method mainly based on kernel virtual machine.Wherein, TLB (Translation Lookaside Buffer, Chinese are bypass conversion buffered device) is the content-addressed memory (CAM) that the user accelerates address translation among the MMU (memory management unit), mainly deposits page table file (virtual address is to the conversion table of physical address).The basic thought of TLB technology is when processor will be in the main memory addressing; Not directly in the physical address of internal memory, to search; But through the physical address of one group of virtual address translation to main memory; TLB is responsible for virtual memory address is translated into the actual physical memory address exactly, and can preferentially in TLB, carry out addressing during the CPU addressing.The mapping relations table of preserving GVA to HPA that " shadow TLB " refers to safeguard among the present invention, the data structure of its list item is consistent with the physics tlb entry.Before client computer was written into operation, shadow page table can be brushed among the physics TLB by VMM.Like this, when client computer was moved, physics TLB (being actually shadow TLB) just can accomplish the direct mapping of GVA to HPA.
Technical scheme of the present invention is following: a kind of internal memory virtualization method towards the MIPS platform, its general frame is as shown in Figure 1.Fig. 1 describes from the function division of view.A kind of internal memory virtualization method towards the MIPS platform adopts host's model framework, comprises like lower module: physical memory, host OS, virtual machine kernel, internal memory virtualization, host QEMU process, virtual memory and client OS.
Based on constituting with upper module, the present invention has announced a kind of address composing method of the internal memory virtualization towards the MIPS platform.Comprising four kinds of addresses altogether, is respectively client computer virtual address (GVA), client computer physical address (GPA), host virtual address (HVA) and host physical address (HPA).
Based on forming with upper module and address; The present invention has announced that a kind of internal memory virtualization towards the MIPS platform at the address space composing method, mainly comprises four kinds of address spaces: be respectively client computer virtual address space, client computer physical address space, host virtual address space and host physical address space.
Based on forming with upper module, address composition, address space; The present invention has announced that a kind of address of the internal memory virtualization towards the MIPS platform is formed and the mapping method of address space; Be respectively that client computer virtual address (GVA) belongs to the client computer virtual address space; Client computer physical address (GPA) belongs to the client computer physical address space, and host virtual address (HVA) belongs to the host virtual address space, and host physical address (HPA) belongs to the host physical address space.
Based on the mapping method of forming with upper module formation, address composition, address space composing method and address composition and address space; The present invention has announced that a kind of address of the internal memory virtualization towards the MIPS platform forms with the map maintenance of address space machine-processed; Comprise client computer TLB and page table; Client computer Physical Page descriptor table, host TLB and page table, host machine Physical Page descriptor table.
Based on the mapping method of forming with upper module formation, address composition, address space composing method and address composition and address space; The present invention has announced a kind of internal memory virtualization map addresses realization flow towards the MIPS platform; Its flow process core for the map addresses that makes up GVA->HPA (GVA->GPA->HVA->HPA), idiographic flow (like Fig. 3) is:
S1: client computer (Guest) module is sent the order of certain GVA of visit.
S2: mapping treatment (GetPA) module obtains the mapping of GVA->GPA.
S3: mapping treatment (GetPA) module obtains the mapping of GPA->HVA.
S4: mapping treatment (GetPA) module obtains the mapping of HVA->HPA.
S5: mapping treatment (GetPA) module obtains three mapping stacks that (GVA, HPA) mapping is filled among the shadow TLB
S6: return client computer
Based on mapping method, the map addresses realization flow formed with upper module formation, address composition, address space composing method and address composition and address space; The present invention has announced a kind of internal memory virtualization implementation method towards the MIPS platform, and the concrete realization flow of this method is:
S21: the shadow TLB of kernel GVA fills.
S22: carry out the filling of client computer TLB.
S23: the shadow TLB of non-kernel GVA fills.
Wherein, S21 (the shadow TLB of kernel GVA fills) idiographic flow is as shown in Figure 4, and substep is in the flow process:
S1: visit certain GVA
S111: judge that GVA belongs to the client computer kernel address space?
S1112: the processing of non-kernel GVA
S1111: carry out the GPA mapping.The GPA=GVA& address
S112: in GPPDT, search the corresponding HVA of GPA
S113: in host TLB, search the corresponding HPA of HVA
S114: with (GVA, HPA) mapping deposits among the shadow TLB
S6: return client computer
Wherein the S22 idiographic flow is as shown in Figure 5, and substep is in the flow process:
S1: visit certain GVA
Does S111:GVA belong to the client computer kernel address space?
S1212: the processing of kernel GVA
S1211: do not have (GVA, GPA) mapping among the client computer TLB
S122: it is unusual to inject the TLB disappearance to client computer
S124: carry out the TLB instruction and fill client computer TLB
S125: simulation TLB instruction
S125: return the client code interruptions
S6: return client computer
Wherein the S23 idiographic flow is as shown in Figure 6, and substep is in the flow process:
S1: visit certain GVA
Does S111:GVA belong to the client computer kernel address space?
S1212: the processing of kernel GVA
S1311: in client computer TLB, have (GVA, GPA) mapping?
S13112: fill client computer TLB
S13111: in GPPDT, search (GPA, HVA) mapping
S132: in host TLB, search (HVA, HPA) mapping
S133: with (GVA, HPA) mapping deposits among the shadow TLB
S6: return client computer.
Advantage of the present invention and effect are: the present invention is based on to the MIPS architecture processor can virtual voltinism carry out careful analysis, based on lightweight virtual machine KVM and " shadow TLB ", invented a kind of internal memory virtualization method towards the MIPS platform.According to application demand; It compared with prior art; Its main advantage is: (1) has overcome the MIPS processor does not have internal memory virtualization layer 3 address mapping under the auxiliary support of hardware, the MIPS platform, a plurality of virtual machine to technical barriers such as isolation between the physical memory visit and safety, can provide support to the upper strata virtualization applications.(2) owing to develop based on the kernel level virtual machine, system has the advantage of lightweight.(3) because all there is the auxiliary problem of supporting of no hardware in existing MIPS processor major part; And MIPS handles in recent years the continuous lifting along with performance; From traditional towards built-in field; By trial and employings such as server fields,, also can satisfy the virtualization applications demand of server field gradually so the present invention promptly can satisfy the virtualization applications demand of built-in field.Therefore, the present invention has lightweight, and applied range is realized characteristics such as difficulty is moderate, has broad application prospects and can produce remarkable economic efficiency.
Description of drawings
Fig. 1. towards the general frame synoptic diagram of the internal memory virtualization method of MIPS platform
Fig. 2. towards the address space mapping method synoptic diagram of the internal memory virtualization method of MIPS platform
Fig. 3. towards the schematic flow sheet of the internal memory virtualization method of MIPS platform
Fig. 4. the shadow TLB towards the kernel GVA of the internal memory virtualization method of MIPS platform fills synoptic diagram
Fig. 5. towards the filling synoptic diagram of the client computer TLB of the internal memory virtualization method of MIPS platform
Fig. 6. the shadow TLB towards the non-kernel GVA of the internal memory virtualization method of MIPS platform fills synoptic diagram
Embodiment
For making the object of the invention, technical scheme and advantage express clearlyer, the present invention is remake further detailed explanation below in conjunction with accompanying drawing and practical implementation embodiment (is example with Godson 3A).Shown in Fig. 1-6, a kind of internal memory virtualization method towards the MIPS platform, the practical implementation method is following:
With Godson 3A (a kind of typical MIPS processor platform) is example, and towards the internal memory virtualization method of MIPS platform, its general frame is as shown in Figure 1.Fig. 1 implements explanation from the function division of view.This instance adopts host's model framework, comprises like lower module: physical memory (M1), host OS (M2), virtual machine kernel (M3), internal memory virtualization (M4), host QEMU process (M4), virtual memory (M6) and client OS (M5).
Based on constituting with upper module; As shown in Figure 2; On a kind of address composing method of the internal memory virtualization towards the MIPS platform, this instance comprises four kinds of addresses altogether, is respectively client computer virtual address (GVA) in this instance; Client computer physical address (GPA), host virtual address (HVA) and host physical address (HPA).
As shown in Figure 3; Based on forming with upper module and address; A kind of internal memory virtualization towards the MIPS platform mainly comprises four kinds of address spaces: be respectively client computer virtual address space (GVAS), client computer physical address space (GPAS), host virtual address space (HVAS) and host physical address space (HPAS) at the address space composing method in this instance.
As shown in Figure 3; Based on forming with upper module, address composition, address space; The address of a kind of internal memory virtualization towards the MIPS platform in this instance is formed and the mapping method of address space, is that client computer virtual address (GVA) belongs to the client computer virtual address space, and client computer physical address (GPA) belongs to the client computer physical address space; Host virtual address (HVA) belongs to the host virtual address space, and host physical address (HPA) belongs to the host physical address space.
As shown in Figure 3; Based on forming and mapping method with upper module, address composition, address space; On a kind of address of the internal memory virtualization towards the MIPS platform and the map maintenance mechanism of address space, this instance comprises client computer TLB and page table (GTLBPT), client computer Physical Page descriptor table (GPPDT); Host TLB and page table (HTLBPT), host machine Physical Page descriptor table (hereinafter to be referred as HPPDT).
As shown in Figure 3; Based on the mapping method of forming with upper module formation, address composition, address space composing method and address composition and address space; A kind of internal memory virtualization map addresses realization flow towards the MIPS platform; In this example core be the map addresses that makes up GVA->HPA (GVA->GPA->HVA->HPA), the practical implementation flow process is:
S1: client computer (Guest) module is sent the order of a GVA of visit.
S2: mapping treatment (GetPA) module obtains the mapping of GVA->GPA.
S3: mapping treatment (GetPA) module obtains the mapping of GPA->HVA.
S4: mapping treatment (GetPA) module obtains the mapping of HVA->HPA.
S5: mapping treatment (GetPA) module obtains three mapping stacks that (GVA, HPA) mapping is filled among the shadow TLB.
S6: return client computer.
As shown in Figure 6; Based on mapping method, the map addresses realization flow formed with upper module formation, address composition, address space composing method and address composition and address space; A kind of internal memory virtualization implementation method towards the M1PS platform, its concrete realization flow is:
S21 (Fig. 4): the shadow TLB of kernel GVA fills.
S22 (Fig. 5): carry out the filling of client computer TLB.
S23 (Fig. 6): the shadow TLB of non-kernel GVA fills.
In this example, wherein S21 (the shadow TLB of kernel GVA fills) practical implementation flow process is as shown in Figure 4, realizes that specifically case description is following:
A kernel VA with this standard operation system of 0x80000123 is an example.This VA is positioned at the kseg0 zone, and when this VA of processor access, it is mapped directly on this PA of 0x00000123.This process does not have the participation of TLB.When virtual machine conferred client OS with kseg2,0x80000123 had just become 0xC0000123.This address is positioned at the kseg2 zone, when this GVA of processor access, will search shadow TLB automatically.Owing to there is not the mapping of GVA among the shadow TLB, shadow TLB disappearance is triggered unusually.In the abnormality processing module, the present invention utilizes GPA=GVA&0x3fffffff to calculate GPA.Therefore, the GPA that 0xC0000123 is corresponding is 0x00000123, just with standard operation system in the corresponding PA of 0x80000123 identical.This processing mode of the present invention, make GVA on move other partially transparents.In case obtained the mapping of GVA->GPA; TLB disappearance abnormality processing module just combines the mapping of HVA->HPA among mapping and the host TLB of GPA->HVA among the GPPDT; Calculate the mapping of GVA->HPA, be filled at last among the shadow TLB, accomplish the filling of the shadow TLB of kernel GVA.
In this example, wherein the concrete realization flow of S22 (carrying out the filling of client computer TLB) is as shown in Figure 5, and flow process realizes being described below:
When certain non-kernel GVA was visited by client computer for the first time, because shadow TLB is empty, it is unusual that visit will cause shadow TLB disappearance.For non-client computer kernel GVA, shadow TLB disappearance exception handler will attempt in client computer TLB, seeking the mapping of GVA->GPA.Visited because GVA is first quilt, do not have the mapping of GVA->GPA among the client computer TLB, therefore, the abnormality processing module will be injected the TLB disappearance in client computer unusual, to start the filling process of client computer TLB.Afterwards, the abnormality processing module is returned the client code execution.(2) because the present invention has injected the TLB disappearance unusually in client computer, therefore, when client computer begins to carry out once more, with the standard TLB disappearance abnormality processing module that directly gets into Client OS.The mapping that the TLB disappearance abnormality processing module of standard is obtained GVA->GPA with the page table of query client uses the TLB instruction to fill client computer TLB then.Because TLB instruction is privileged instruction, thus the execution of TLB instruction will to cause the TLB command privilege class unusual, and be trapped in the TLB instruction exception processing module of the present invention.The present invention resolves the TLB instruction, accomplishes the Simulation execution of instruction, returns the TLB disappearance abnormality processing module of client computer then.After client computer TLB filling finishes, execution stream will turn back to and begin to cause the unusual client code place continuation execution of shadow TLB disappearance.
In this example, wherein S23 (the shadow TLB of non-kernel GVA fills) practical implementation flow process is as shown in Figure 6, and flow process is described below:
After client computer TLB filling finishes, execution stream will turn back to and begin to cause the unusual client code place continuation execution of shadow TLB disappearance.Because still do not have the mapping of GVA->HPA this moment among the shadow TLB, it is unusual therefore will to cause shadow TLB disappearance once more.Because GVA has filled in client computer TLB and finished, the abnormality processing module can obtain the mapping of GVA->GPA through query client TLB.Then, abnormality processing module inquiry GPPDT obtains the mapping of GPA->HVA, inquires about the mapping that host TLB obtains HVA->HPA again.Finally, through with GVA->GPA, GPA->HVA, three mappings of HVA->HPA stack up, and obtain the mapping of GVA->HPA, are filled among the shadow TLB.At this moment, shadow TLB fills completion, carries out the client module place continuation execution that stream turns back to exception throw.
It should be noted last that: above embodiment is the unrestricted technical scheme of the present invention in order to explanation only; Although the present invention is specified with reference to the foregoing description; Those of ordinary skill in the art is to be understood that: still can make amendment or be equal to replacement the present invention; And replace any modification or the part that do not break away from the spirit and scope of the present invention, and it all should be encompassed in the middle of the claim scope of the present invention.

Claims (6)

1. internal memory virtualization method towards the MIPS platform, this method adopts host's model framework, comprises like lower module: physical memory, host OS, virtual machine kernel, internal memory virtualization, host QEMU process, virtual memory and client OS; This internal memory virtualization method comprises that towards the address composing method of the internal memory virtualization of MIPS platform this address composing method is based on upper module and constitutes, and comprises four kinds of addresses, is respectively client computer virtual address, i.e. GVA; Client computer physical address, i.e. GPA; Host virtual address, i.e. HVA; Host physical address, i.e. HPA.
2. a kind of internal memory virtualization method according to claim 1 towards the MIPS platform; This method comprises that further internal memory virtualization towards the MIPS platform at the address space composing method, mainly comprises four kinds of address spaces: be respectively client computer virtual address space, client computer physical address space, host virtual address space and host physical address space.
3. a kind of internal memory virtualization method according to claim 2 towards the MIPS platform; This method further comprises towards the address composition of the internal memory virtualization of MIPS platform and the mapping method of address space; Be respectively that the client computer virtual address belongs to the client computer virtual address space; The client computer physical address belongs to the client computer physical address space, and the host virtual address belongs to the host virtual address space, and the host physical address belongs to the host physical address space.
4. a kind of internal memory virtualization method according to claim 3 towards the MIPS platform; This method further comprises towards the map maintenance mechanism of the address composition and the address space of the internal memory virtualization of MIPS platform; Comprise client computer TLB and page table; Client computer Physical Page descriptor table, host TLB and page table, host machine Physical Page descriptor table.
5. a kind of internal memory virtualization method according to claim 4 towards the MIPS platform; This method further comprises the internal memory virtualization map addresses realization flow towards the MIPS platform; Its flow process core is for making up the map addresses of GVA->HPA; Be GVA->GPA->HVA->HPA, idiographic flow is:
S1: client module is sent the order of certain GVA of visit;
S2: the mapping treatment module obtains the mapping of GVA->GPA;
S3: the mapping treatment module obtains the mapping of GPA->HVA;
S4: the mapping treatment module obtains the mapping of HVA->HPA;
S5: the mapping treatment module obtains three mapping stacks that (GVA, HPA) mapping are filled among the shadow TLB;
S6: return client computer.
6. a kind of internal memory virtualization method according to claim 5 towards the MIPS platform, the concrete realization flow of this method is:
S21: the shadow TLB of kernel GVA fills;
S22: carry out the filling of client computer TLB;
S23: the shadow TLB of non-kernel GVA fills;
Wherein, the idiographic flow of the shadow TLB of S21 kernel GVA filling is:
S1: client module is sent the order of certain GVA of visit
S111: judge that GVA belongs to the client computer kernel address space?
S1112: the processing of non-kernel GVA
S1111: carry out the GPA mapping; The GPA=GVA& address
S112: in GPPDT, search the corresponding HVA of GPA
S113: in host TLB, search the corresponding HPA of HVA
S114: with (GVA, HPA) mapping deposits among the shadow TLB
S6: return client computer;
Wherein, the idiographic flow of the filling of S22 execution client computer TLB is:
S1: client module is sent the order of certain GVA of visit
S111: judge that GVA belongs to the client computer kernel address space?
S1212: the processing of kernel GVA
S1211: do not have (GVA, GPA) mapping among the client computer TLB
S122: it is unusual to inject the TLB disappearance to client computer
S124: carry out the TLB instruction and fill client computer TLB
S125: simulation TLB instruction
S125: return the client code interruptions
S6: return client computer;
Wherein, the idiographic flow of the shadow TLB of the non-kernel GVA of S23 filling is:
S1: client module is sent the order of certain GVA of visit
S111: judge that GVA belongs to the client computer kernel address space?
S1212: the processing of kernel GVA
S1311: in client computer TLB, have (GVA, GPA) mapping?
S13112: fill client computer TLB
S13111: in GPPDT, search (GPA, HVA) mapping
S132: in host TLB, search (HVA, HPA) mapping
S133: with (GVA, HPA) mapping deposits among the shadow TLB
S6: return client computer.
CN201210001188.2A 2012-01-04 2012-01-04 MIPS platform-oriented memory virtualization method Expired - Fee Related CN102567217B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210001188.2A CN102567217B (en) 2012-01-04 2012-01-04 MIPS platform-oriented memory virtualization method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210001188.2A CN102567217B (en) 2012-01-04 2012-01-04 MIPS platform-oriented memory virtualization method

Publications (2)

Publication Number Publication Date
CN102567217A true CN102567217A (en) 2012-07-11
CN102567217B CN102567217B (en) 2014-12-24

Family

ID=46412681

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210001188.2A Expired - Fee Related CN102567217B (en) 2012-01-04 2012-01-04 MIPS platform-oriented memory virtualization method

Country Status (1)

Country Link
CN (1) CN102567217B (en)

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102819712A (en) * 2012-08-01 2012-12-12 龙芯中科技术有限公司 Method and device for ensuring security of virtual machine operation system
CN102929691A (en) * 2012-11-09 2013-02-13 北京航空航天大学 System virtual machine facing Advanced RISC Machines (ARM) multi-core processor server platform
CN103268250A (en) * 2013-04-23 2013-08-28 深圳市京华科讯科技有限公司 Virtualization-based memory multiplexing system
CN104050016A (en) * 2014-06-27 2014-09-17 龙芯中科技术有限公司 Memory virtualization method and device and processor
CN104239238A (en) * 2013-06-21 2014-12-24 国际商业机器公司 Method and device used for managing translation look-aside buffer (TLB)
CN104750623A (en) * 2013-12-31 2015-07-01 华为技术有限公司 Memory virtualization method and memory virtualization device
CN105989758A (en) * 2015-02-05 2016-10-05 龙芯中科技术有限公司 Address translation method and apparatus
CN107025180A (en) * 2016-02-01 2017-08-08 龙芯中科技术有限公司 EMS memory management process and device
CN107045436A (en) * 2016-02-05 2017-08-15 龙芯中科技术有限公司 Access processing method and device
CN107368379A (en) * 2017-07-14 2017-11-21 中南大学 Towards EVP across GuestOS inter-process communication methods and system
WO2018000537A1 (en) * 2016-06-26 2018-01-04 杨越 Virtual machine safety isolation system under network environment
CN107688745A (en) * 2016-08-04 2018-02-13 阿里巴巴集团控股有限公司 Processing, method, kernel initialization method, apparatus and the equipment of generation kernel mirror image
CN109583190A (en) * 2017-09-28 2019-04-05 华为技术有限公司 The method and apparatus of monitoring process
CN110196757A (en) * 2019-05-31 2019-09-03 龙芯中科技术有限公司 TLB filling method, device and the storage medium of virtual machine
WO2019173937A1 (en) * 2018-03-12 2019-09-19 Intel Corporation Improved memory-mapped input/output (mmio) region access
CN111190752A (en) * 2019-12-30 2020-05-22 海光信息技术有限公司 Method and device for sharing kernel memory of virtual machine
CN112363824A (en) * 2020-10-12 2021-02-12 北京大学 Memory virtualization method and system under Shenwei architecture
CN115543971A (en) * 2022-11-29 2022-12-30 天津南大通用数据技术股份有限公司 Method for realizing high availability of MPP database

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050114595A1 (en) * 2003-11-26 2005-05-26 Veritas Operating Corporation System and method for emulating operating system metadata to provide cross-platform access to storage volumes
US20060139360A1 (en) * 2004-12-29 2006-06-29 Panesar Kiran S System and method for one step address translation of graphics addresses in virtualization
CN101968746A (en) * 2010-09-02 2011-02-09 北京航空航天大学 Method for implementing organizational architecture mode of kernel-based virtual machine (KVM)
CN102231138A (en) * 2011-07-08 2011-11-02 上海交通大学 Accurate memory data acquisition system and method of computer
CN102239478A (en) * 2011-04-19 2011-11-09 华为技术有限公司 Data access processing method and device
CN102262557A (en) * 2010-05-25 2011-11-30 运软网络科技(上海)有限公司 Method for constructing virtual machine monitor by bus architecture and performance service framework

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050114595A1 (en) * 2003-11-26 2005-05-26 Veritas Operating Corporation System and method for emulating operating system metadata to provide cross-platform access to storage volumes
US20060139360A1 (en) * 2004-12-29 2006-06-29 Panesar Kiran S System and method for one step address translation of graphics addresses in virtualization
CN102262557A (en) * 2010-05-25 2011-11-30 运软网络科技(上海)有限公司 Method for constructing virtual machine monitor by bus architecture and performance service framework
CN101968746A (en) * 2010-09-02 2011-02-09 北京航空航天大学 Method for implementing organizational architecture mode of kernel-based virtual machine (KVM)
CN102239478A (en) * 2011-04-19 2011-11-09 华为技术有限公司 Data access processing method and device
CN102231138A (en) * 2011-07-08 2011-11-02 上海交通大学 Accurate memory data acquisition system and method of computer

Cited By (31)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102819712B (en) * 2012-08-01 2014-11-26 龙芯中科技术有限公司 Method and device for ensuring security of virtual machine operation system
CN102819712A (en) * 2012-08-01 2012-12-12 龙芯中科技术有限公司 Method and device for ensuring security of virtual machine operation system
CN102929691A (en) * 2012-11-09 2013-02-13 北京航空航天大学 System virtual machine facing Advanced RISC Machines (ARM) multi-core processor server platform
CN103268250A (en) * 2013-04-23 2013-08-28 深圳市京华科讯科技有限公司 Virtualization-based memory multiplexing system
CN104239238A (en) * 2013-06-21 2014-12-24 国际商业机器公司 Method and device used for managing translation look-aside buffer (TLB)
CN104239238B (en) * 2013-06-21 2018-01-19 格芯公司 Method and apparatus for managing translation lookaside buffering
CN104750623B (en) * 2013-12-31 2017-11-24 华为技术有限公司 A kind of method and device of internal memory virtualization
CN104750623A (en) * 2013-12-31 2015-07-01 华为技术有限公司 Memory virtualization method and memory virtualization device
CN104050016A (en) * 2014-06-27 2014-09-17 龙芯中科技术有限公司 Memory virtualization method and device and processor
CN104050016B (en) * 2014-06-27 2017-02-08 龙芯中科技术有限公司 Memory virtualization method and device and processor
CN105989758A (en) * 2015-02-05 2016-10-05 龙芯中科技术有限公司 Address translation method and apparatus
CN105989758B (en) * 2015-02-05 2019-03-19 龙芯中科技术有限公司 Address translation method and apparatus
CN107025180B (en) * 2016-02-01 2020-03-13 龙芯中科技术有限公司 Memory management method and device
CN107025180A (en) * 2016-02-01 2017-08-08 龙芯中科技术有限公司 EMS memory management process and device
CN107045436A (en) * 2016-02-05 2017-08-15 龙芯中科技术有限公司 Access processing method and device
CN107045436B (en) * 2016-02-05 2019-09-10 龙芯中科技术有限公司 Access processing method and device
WO2018000537A1 (en) * 2016-06-26 2018-01-04 杨越 Virtual machine safety isolation system under network environment
CN107688745A (en) * 2016-08-04 2018-02-13 阿里巴巴集团控股有限公司 Processing, method, kernel initialization method, apparatus and the equipment of generation kernel mirror image
CN107368379B (en) * 2017-07-14 2020-07-10 中南大学 EVP-oriented cross Guest OS inter-process communication method and system
CN107368379A (en) * 2017-07-14 2017-11-21 中南大学 Towards EVP across GuestOS inter-process communication methods and system
CN109583190A (en) * 2017-09-28 2019-04-05 华为技术有限公司 The method and apparatus of monitoring process
CN109583190B (en) * 2017-09-28 2020-11-27 华为技术有限公司 Method and device for monitoring process
WO2019173937A1 (en) * 2018-03-12 2019-09-19 Intel Corporation Improved memory-mapped input/output (mmio) region access
CN110196757B (en) * 2019-05-31 2021-08-03 龙芯中科技术股份有限公司 TLB filling method and device of virtual machine and storage medium
CN110196757A (en) * 2019-05-31 2019-09-03 龙芯中科技术有限公司 TLB filling method, device and the storage medium of virtual machine
CN111190752B (en) * 2019-12-30 2023-04-07 海光信息技术股份有限公司 Method and device for sharing kernel memory of virtual machine
CN111190752A (en) * 2019-12-30 2020-05-22 海光信息技术有限公司 Method and device for sharing kernel memory of virtual machine
CN112363824A (en) * 2020-10-12 2021-02-12 北京大学 Memory virtualization method and system under Shenwei architecture
CN112363824B (en) * 2020-10-12 2022-07-22 北京大学 Memory virtualization method and system under Shenwei architecture
CN115543971A (en) * 2022-11-29 2022-12-30 天津南大通用数据技术股份有限公司 Method for realizing high availability of MPP database
CN115543971B (en) * 2022-11-29 2023-03-31 天津南大通用数据技术股份有限公司 Method for realizing high availability of MPP database

Also Published As

Publication number Publication date
CN102567217B (en) 2014-12-24

Similar Documents

Publication Publication Date Title
CN102567217B (en) MIPS platform-oriented memory virtualization method
CN100527098C (en) Dynamic EMS memory mappings method of virtual machine manager
CN102402453B (en) System virtual machine for microprocessor without interlocked piped stages (MIPS) platform
Heiser et al. The OKL4 Microvisor: Convergence point of microkernels and hypervisors
CN101477495B (en) Implementing method for distributed internal memory virtualization technology
US7484073B2 (en) Tagged translation lookaside buffers in a hypervisor computing environment
US10423478B2 (en) Security enhanced out of process user space handling of hardware events
Wang et al. Selective hardware/software memory virtualization
US20130159596A1 (en) Techniques for memory de-duplication in a virtual system
US20150212839A1 (en) Tracking transformed memory pages in virtual machine chain migration
CN101398768A (en) Construct method of distributed virtual machine monitor system
US20150212948A1 (en) Lazy memory transformation in virtual machine live migration
US10579410B2 (en) Guest intermediate address tagging for guest applications
CN102929691A (en) System virtual machine facing Advanced RISC Machines (ARM) multi-core processor server platform
Kim et al. Improving the storage performance of smartphones through journaling in non-volatile memory
US20210342173A1 (en) Dynamic power management states for virtual machine migration
US11354047B2 (en) Memory protection in virtualized computer systems using shadow page tables
US20150212845A1 (en) Lazy disk input/output in virtual machine live migration
CN106354543A (en) NUMA memory page migration method based on virtual machine and host machine memory address conversion
US9772951B2 (en) Preemptive guest merging for virtualization hypervisors
CN102722452B (en) Memory redundancy eliminating method
Chen et al. DMM: A dynamic memory mapping model for virtual machines
CN102096594B (en) Method and device for using system resources in memory
Wang et al. Algorithms and Architectures for Parallel Processing: 15th International Conference, ICA3PP 2015, Zhangjiajie, China, November 18-20, 2015, Proceedings, Part IV
US11243801B2 (en) Transparent huge pages support for encrypted virtual machines

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20141224

CF01 Termination of patent right due to non-payment of annual fee