CN104050017B - Method and device for controlling operating virtual machine - Google Patents
Method and device for controlling operating virtual machine Download PDFInfo
- Publication number
- CN104050017B CN104050017B CN201410310784.8A CN201410310784A CN104050017B CN 104050017 B CN104050017 B CN 104050017B CN 201410310784 A CN201410310784 A CN 201410310784A CN 104050017 B CN104050017 B CN 104050017B
- Authority
- CN
- China
- Prior art keywords
- virtual machine
- host
- state
- state value
- depositor
- 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
Links
Landscapes
- Memory System Of A Hierarchy Structure (AREA)
Abstract
The embodiment of the invention provides a method and device for controlling an operating virtual machine. The method includes the steps that in the operating process of a first virtual machine at this time, when the first virtual machine needs to have access to a first register in a control register, a status bit of a host machine is read, and a status value of the host machine is obtained; when it is determined that the host machine is in the non-kernel status according to the status value of the host machine, a status bit of the first virtual machine is read, and a status value of the first virtual machine is obtained; when it is determined that the first virtual machine is in the kernel status according to the status value of the virtual machine, the first virtual machine is controlled to have access to the first register. By the adoption of the method and device for controlling the operating virtual machine, the control register access process of the virtual machine is optimized, the number of shutdown and restart, caused by access to the control register, of the virtual machine is reduced, and performance expenditure of the host machine is lowered.
Description
Technical field
The present embodiments relate to field of computer technology, more particularly to a kind of control method and dress of operation virtual machine
Put.
Background technology
With the prevalence of cloud computing, system virtualization has obtained increasingly faster development, and increasing framework is proposed
Virtualized solution, such as MIPS frameworks are generally using half virtualization hardware specification or fully virtualized hardware specification.Wherein,
In fully virtualized hardware specification, based on existing reduced instruction set computer framework (Micropr-ocessor without
Interlocked piped stages, abbreviation MIPS), extra operator scheme and related register are increased, and increase
Double address translation and related register;And in half virtualization hardware specification, compare and full virtual hardware specification, merely add volume
Outer operator scheme and related register.
Specifically, when virtual machine runs on host (also referred to as physical machine), virtual address and the host of virtual machine are needed
Translation between the physical address of machine is done with operation support, so as in fully virtualized hardware specification, by using TLB
(Translation Lookaside Buffer, be translated as translation lookaside buffer) is realizing virtual address and the place of virtual machine
In translation between the physical address of main frame, therefore fully virtualized hardware specification, based on the TLB's under existing MIPS frameworks
On the basis of, extra TLB is provided with, so that virtual machine is used, accordingly, it is also provided with extra extra for controlling this
The depositor of TLB.But half virtualization hardware specification be in order to reduce MIPS frameworks under the complexity realized of fully virtualized hardware specification
A kind of half-way house spent and propose, compared to fully virtualized scheme, not with extra TLB, therefore does not also have special confession
The depositor for controlling above-mentioned extra TLB that virtual machine is used.Therefore when virtual machine is based on existing MIPS frameworks, by visiting
When asking control TLB depositors with using TLB, the virtual machine is then forced to close, and needs by the VMM (Virtual on host
Machine Monitor, virtual machine manager) access control TLB depositor, so as to pass through TLB to realize the virtual of virtual machine
Translation between address and the physical address of host, the subsequent above-mentioned virtual machine for being forced to close is again started up continuing to run with.
It should be understood that the operation of virtual machine can repeatedly need the virtual address for carrying out virtual machine with host physically
Translation between location, thus causes to be used for multiple times control TLB depositors to access the event of TLB, therefore in the prior art, it is empty
Plan machine needs repeatedly to be forced to close, and subsequently restarts again, and the multiple closing of virtual machine is restarted, and the performance for increasing host is opened
Pin.
The content of the invention
The embodiment of the present invention provides a kind of control method and device of operation virtual machine, for optimizing virtual machine access control
Number of times is restarted in the process of depositor, the closing that reduction virtual machine access control depositor causes, and reduces performance cost.
In a first aspect, the embodiment of the present invention provides a kind of control method of operation virtual machine, including:
In this running of the first virtual machine, first in first virtual machine needs access control depositor
During depositor, the mode bit of host is read, obtain the state value of host;
When determining that the host is in host non-core phychology according to the state value of the host, then read described
The mode bit of the first virtual machine, obtains the state value of first virtual machine;
When determining that first virtual machine is in virtual machine kernal state according to the state value of the virtual machine, then institute is controlled
State the first virtual machine and access first depositor.
With reference in a first aspect, in the first embodiment, the state value according to the host determines the host
Machine is in host non-core phychology, including:
Whether the state value for judging the host is designated non-core state, when the state value of the host is designated
Non-core state, determines that the host is in the non-core state of host;
It is described, determine that first virtual machine is in virtual machine kernal state according to the state value of the virtual machine, including:
Whether the state value for judging the virtual machine is designated kernel state, when the state value of the virtual machine is designated core
Heart shaped state, determines that the host is in the non-core state of host.
With reference to first aspect first embodiment, in this second embodiment, the control method is applied to processor, and
Increasing newly in the processor has decision logic, the decision logic, triggers when access control register instruction is performed, for sentencing
Whether the state value of the disconnected host is designated non-core state, is additionally operable to judge whether the state value of the virtual machine identifies
For kernel state.
With reference to any one embodiment in first aspect to first aspect second embodiment, in the 3rd embodiment
In, before described this running of first virtual machine starts, the control method also includes:
The previous field data that the corresponding temporarily providing room of first virtual machine is stored is recovered to the control deposit
Device, so that first virtual machine starts this running;
The field data is used to ensure that the virtual machine correctly carries out second after virtual machine first time end of run
Operation.
With reference to the embodiment of first aspect the 3rd, in the 4th embodiment, when first virtual machine, this ran
At the end of journey, the control method also includes:
This field data of first virtual machine is stored into temporarily providing room corresponding to first virtual machine.
With reference to any one embodiment in the embodiment of first aspect the 4th, in the 4th embodiment, described first
Depositor is the depositor for controlling translation lookaside buffer TLB.
Second aspect, the embodiment of the present invention provides a kind of control device of operation virtual machine, including:
Acquisition module, in this running of the first virtual machine, when first virtual machine needs access control
During the first depositor in depositor, the mode bit of host is read, obtain the state value of host;
Determining module, the state value of the host for being obtained according to the acquisition module is determined at the host
In host non-core phychology,
Then the determining module triggers the mode bit that the acquisition module reads first virtual machine, obtains described first
The state value of virtual machine;
The state value of the virtual machine obtained according to the acquisition module when the determining module determines that described first is empty
When plan machine is in virtual machine kernal state,
The then determining module trigger control module, the control module is used to controlling first virtual machine accessing described
First depositor.
With reference to second aspect, in the first embodiment, the determining module, including:
First judging unit, for judging it is non-core whether the state value of the host that the acquisition module is obtained is designated
State, when the state value of the host is designated non-core state, determines that the host is in the non-core state of host;
Second judging unit, for judging whether the state value of the virtual machine that the acquiring unit is obtained is designated core shape
State, when the state value of the virtual machine is designated kernel state, determines that the host is in the non-core state of host.
With reference to second aspect first or second embodiment, in the third embodiment, the control device also includes:
Memory module, for by the previous field data that the corresponding temporarily providing room of first virtual machine is stored recover to
The control register, so that first virtual machine starts this running;
The field data is used to ensure that the virtual machine correctly carries out second after virtual machine first time end of run
Operation.
With reference to the embodiment of second aspect the 3rd, in the 4th embodiment, the memory module is additionally operable to
This field data of first virtual machine is stored into temporarily providing room corresponding to first virtual machine.
With reference to the embodiment of second aspect the 4th, in the 5th embodiment, first depositor is to turn for control
Change the depositor of look-aside buffer TLB.
In the control method and device of operation virtual machine provided in an embodiment of the present invention, when the first virtual machine access control is posted
During the first depositor in storage, even if host is in non-core phychology, but first is known according to the mode bit of the first virtual machine
Virtual machine is in kernel mode, just can control first virtual machine and accesses the first depositor, it is not necessary to restarts the first virtual machine, just
The access to the first depositor can be completed, so as to reduce the number of times that virtual machine on host is restarted, and then place can be reduced
Main frame is used to restart the expense of virtual machine.
Description of the drawings
Fig. 1 is the flow chart of the control method embodiment one of present invention operation virtual machine;
Fig. 2 is the flow chart of the control method embodiment two of present invention operation virtual machine;
Fig. 3 is the structure chart of the control device embodiment one of present invention operation virtual machine;
Fig. 4 is the structure chart of the control device embodiment two of present invention operation virtual machine.
Specific embodiment
Fig. 1 is the flow chart of the control method embodiment one of present invention operation virtual machine.As shown in figure 1, the present embodiment
Executive agent is the control device for running virtual machine, and the control device can be to be realized, preferably by the way of software and/or hardware
, the control device can be arranged on the host (also referred to as host) for carrying virtual machine, specifically, the control method bag
Include:
S101, in this running of the first virtual machine, in the first virtual machine needs access control depositor
During one depositor, the mode bit of host is read, obtain the state value of host.
Above-mentioned first virtual machine is the virtual machine of host currently operation, it is possible to understand that, the operation of virtual machine needs place
Main frame as the carrier for carrying as virtual machine can be regarded a kind of process on host, then virtual machine is as process
Run on host according to the instruction in process, when the instruction of a certain bar indicates the virtual machine access control depositor, operation
The control device of virtual machine can access the status register of host, to read the mode bit of host, so as to obtain host
The state value of machine.
S102, when determining that host is in host non-core phychology according to the state value of host, read first virtual
The mode bit of machine, obtains the state value of the first virtual machine.
Based on existing MIPS frameworks, the behavior of the virtual machine access control depositor on host is can not be in host
Non-core phychology issue it is raw, if there is virtual machine under host non-core phychology during the special circumstances of access control depositor,
This special circumstances are processed by host, and virtual machine is restarted;In the present embodiment, in order to realize the first virtual machine not
Restart and just may have access to control register, therefore, the control device that virtual machine is run in the present embodiment further obtains first
The state value of virtual machine;Specifically, above-mentioned control device continues access state depositor, reads the mode bit of the first virtual machine,
To obtain the state value of the first virtual machine;Wherein control device is accessed in the status register that this step is accessed with S101
Status register can be same, but the mode bit of the difference of the system architecture according to host, such as virtual machine is by another
When status register is preserved, then the status register in the status register that control device is accessed in this step and S101 can be with
It is different.
S103, when according to the state value of virtual machine determine the first virtual machine be in virtual machine kernal state when, then control first
Virtual machine accesses the first depositor.
It should be understood that the virtual machine run on host is equivalent to virtual on host complete
Computer system, then it is independent with the virtual computer system from the perspective of, the virtual computer system is also have
The differentiation of kernel mode and non-core phychology;Based on existing MIPS frameworks, above-mentioned first depositor belongs to privileged resource, is only capable of in void
Being accessed under the kernel mode of plan machine, therefore run the control device of virtual machine can only allow the first virtual machine in virtual machine kernal state
It is lower just to may have access to the first depositor.
Specifically, in actual applications, the first depositor in above-mentioned control register can be other for control conversion
When accessing the first depositor depending on the depositor of buffer TLB, and the first virtual machine, according to the difference of practical application, may be more
Change the data in the data stored in the first depositor, or the first depositor of inquiry.
For example, the first virtual machine needs physical address of the virtual address with host that virtual machine is realized using TLB
Between translation when, as long as determining the first virtual machine under the virtual machine kernal state according to S103, run the control dress of virtual machine
Putting can control the direct access control TLB depositor of the first virtual machine, so as to complete the operation to TLB, for example, increase or change
The content of address translation.
In the present embodiment, when the first depositor in the first virtual machine access control depositor, even if at host
In non-core phychology, but the control device of operation virtual machine knows that the first virtual machine is in core according to the mode bit of the first virtual machine
State, just can control first virtual machine and accesses the first depositor, it is not necessary to restart the first virtual machine, just can complete to post first
The access of storage, so as to reduce the number of times that virtual machine on host is restarted, and then can reduce host for restarting void
The expense of plan machine.
Fig. 2 is the flow chart of the control method embodiment two of present invention operation virtual machine.As shown in Fig. 2 the present embodiment is
On the basis of the embodiment shown in Fig. 1, further description is made, specifically, the executive agent of the present embodiment remains as fortune
The control device of row virtual machine, the control device of the operation virtual machine is integrated in the control method institute that the present embodiment runs virtual machine
Using processor in, the processor compared with prior art, increase newly by decision logic, the decision logic operation virtual machine
Control device perform access control register instruction when trigger, it is specific as follows:
S201, the previous field data that the corresponding temporarily providing room of the first virtual machine is stored is recovered to control register,
So that the first virtual machine starts this running.
Optionally, the virtual machine in the present embodiment can (Kernel-based Virtual Machine, be based on for KVM
The virtual machine of kernel), wherein field data is used to ensure that the virtual machine is correctly carried out after virtual machine first time end of run
Run for second.
As in the preceding embodiment, control dress of the virtual machine in running each time, due to running virtual machine
Put the first virtual machine of control and have accessed control register, and access of the virtual machine to control register can be changed in control register
Data, i.e. virtual machine updates the data in control register in a running, when virtual machine completes this
After running, host continues to run with other tasks, if the data after aforementioned renewal are remained stored in control register,
Can affect the normal operation of host, and host operation now also can access control depositor, then can be by control register
Data cover or modification that middle virtual machine updates, then when above-mentioned virtual machine runs again, it is impossible to normal operation, therefore, generally exist
While virtual machine terminates a running, by it is being stored in control register, corresponding to the virtual machine, this ran
Data after the renewal of journey, preserve into the corresponding temporarily providing room of the virtual machine as this field data (context), with
Just virtual machine carries out in-situ FTIR spectroelectrochemitry in operation next time.Common index depositors, EntryHi depositors etc., virtual machine is one
These depositors can be accessed in secondary running, and updates the data in these depositors, for example, in virtual machine
In the first time running of A, virtual machine A access control depositors, and will be used for represent translating address variable i assignment by
0001 is changed to 0101, if virtual machine 1 is before second operation is carried out, if it is extensive not carry out field data for virtual machine A
Multiple, then virtual machine A cannot obtain correct information " i=0101 " in control register, so as to virtual machine A cannot determine correctly
Address, the then operation of virtual machine A can make a mistake, and can not normally run, it is therefore desirable to perform S201, enter for the first virtual machine
The recovery of row field data;Above-mentioned " first time " and " for the second time " is relative concept, i.e., run virtual machine A at the t1 moment,
The t2 moment runs again virtual machine A, then for the t2 moment, the virtual machine process that the t1 moment is run is operation for the first time, and
The t2 moment is then run for second;It should be understood that when virtual machine A is run again at the t3 moment, for the t3 moment, during t2
Carve then to run for the first time, the t3 moment is run for second;
Specifically, when the first virtual machine is in previous end of run, just by for the previous field data of the first virtual machine
Store to the corresponding temporarily providing room of the first virtual machine, then it is empty by first before the first virtual machine starts this running
The previous field data that the corresponding temporarily providing room of plan machine is stored is recovered to control register, so that the first virtual machine starts this
Running;Wherein temporarily providing room be each virtual machine carried for the host on host be correspondingly arranged each deposit
Storage space, each temporarily providing room is used to store the field data of corresponding each virtual machine.
Will be understood, above-mentioned temporarily providing room storage if being to run on host first if first virtual machine
It is the initialization data for running virtual machine, can regard the initialization data as first virtual machine carries out showing needed for this operation
Field data.
S202, in this running of the first virtual machine, in first virtual machine needs access control depositor
The first depositor when trigger decision logic;
S203, decision logic read the mode bit of host, obtain the state value of host.
S204 decision logics judge whether the state value of the host is designated non-core state;If so, S205 is performed;
If it is not, then stopping.
When the state value of the host is designated non-core state, decision logic determines that the host is in host
Non-core state.
Based on existing MIPS frameworks, virtual machine can not run under the kernel mode of host, therefore ought be sentenced by S204
Break as host kernel mode, then the program for illustrating current host operation is non-virtual machine, then the present embodiment is no longer implemented, that is, transport
The control device of row virtual machine quits work.
S205, decision logic read the mode bit of the first virtual machine, obtain the state value of the first virtual machine.
S206, decision logic judge whether the state value of the first virtual machine is designated kernel state;If so, S207 is performed;
If it is not, then performing S208.
S207, the first virtual machine is judged based on decision logic in virtual machine kernal state, the first virtual machine of control accesses the
One depositor.
Referring in particular to S103, and first virtual machine is continued to run with after this step has been performed, it is possible to understand that, subsequent
Running in, when the first virtual machine needs access control depositor again according to instruction, then return S202, until this
This running of one virtual machine terminates, then perform S208.
S208, this field data of the first virtual machine is stored into temporarily providing room corresponding to first virtual machine.
Above-mentioned this field data is stored to the corresponding temporarily providing room of the first virtual machine, if the first virtual machine needs further
During secondary operation, then run virtual machine control device using above-mentioned this field data then as previous field data, again by front
State S201 to start to control the running next time of the first virtual machine.
A situation arises is divided into two kinds for above-mentioned S208, and one kind is the normal end of run of the first virtual machine, then perform S208 it
Then stop afterwards, one kind is that the first virtual machine needs to access the first depositor, but according to the judgement of S206, it is impossible to control first virtual
Machine directly accesses the first depositor, then need to close the first virtual machine, before closing, needs to perform S208, subsequently performs S209.
S209, the first virtual machine of control are closed, and control VMM replacement the first virtual machine the first depositors of access.
Based on existing MIPS frameworks, the dummy machine system carried on host can simply be divided into host carrying
Virtual machine and virtual machine manager.When virtual machine runs on host, common operation, such as user program can be carried out;But
Special circumstances occur in the running of virtual machine, such as some privileged instructions (such as the above-mentioned depositor of access first), perform
Some harmful instructions etc.;When there are these special circumstances, the control device for running virtual machine closes the void being currently running
Plan machine, and virtual machine manager is opened, the special circumstances are processed under the kernel mode of host by virtual machine manager, treat virtual
After the completion of machine manager processes, the virtual machine is run again, specifically can refer to prior art, will not be described here;
It should be understood that the first virtual machine (virtual machine A) is closed, VMM replaces the first virtual machine to access the first depositor
Afterwards, virtual machine A also needs to continue to run with, then using virtual machine A as the first virtual machine, restarted to perform by S201.
In the present embodiment, when the first depositor in the first virtual machine access control depositor, even if at host
In non-core phychology, but the control device of operation virtual machine knows that the first virtual machine is in core according to the mode bit of the first virtual machine
State, just can control first virtual machine and accesses the first depositor, it is not necessary to restart the first virtual machine, just can complete to post first
The access of storage, so as to reduce the number of times that virtual machine on host is restarted, and then can reduce host for restarting void
The expense of plan machine.
Fig. 3 is a kind of structure chart of the control device embodiment one of operation virtual machine of the present invention.As shown in figure 3, the control
Device includes:
Acquisition module 31, in this running of the first virtual machine, when first virtual machine need to access control
During the first depositor in depositor processed, the mode bit of host is read, obtain the state value of host;
Determining module 32, the state value of the host for being obtained according to the acquisition module 31 determines the host
Machine is in host non-core phychology,
Then the determining module 32 triggers the mode bit that the acquisition module 31 reads first virtual machine, obtains described
The state value of the first virtual machine;
The state value of the virtual machine obtained according to the acquisition module 31 when the determining module 32 determines described
When one virtual machine is in virtual machine kernal state,
The then trigger control module 33 of the determining module 32, the control module 33 is used to controlling first virtual machine visiting
Ask first depositor.
In the present embodiment, when the first depositor in the first virtual machine access control depositor, even if at host
In non-core phychology, but the control device of operation virtual machine knows that the first virtual machine is in core according to the mode bit of the first virtual machine
State, just can control first virtual machine and accesses the first depositor, it is not necessary to restart the first virtual machine, just can complete to post first
The access of storage, so as to reduce the number of times that virtual machine on host is restarted, and then can reduce host for restarting void
The expense of plan machine.
Fig. 4 is the structure chart of the control device embodiment two of present invention operation virtual machine.As shown in figure 4, the present embodiment is
Make on the basis of the embodiment shown in Fig. 3 and further describing, above-mentioned determining module 32 includes the first judging unit 321, use
Non-core state whether is designated in the state value for judging the host that the acquisition module is obtained, when the state of the host
Value is designated non-core state, determines that the host is in the non-core state of host;Second judging unit 322, for sentencing
Whether the state value of the virtual machine that the disconnected acquiring unit is obtained is designated kernel state, when the state value of the virtual machine is identified
For kernel state, determine that the host is in the non-core state of host.
Further, the control device also includes memory module 34, for first virtual machine is corresponding temporary
The previous field data that space is stored is recovered to the control register, so that first virtual machine starts this and ran
Journey;
The field data is used to ensure that the virtual machine correctly carries out second after virtual machine first time end of run
Operation.
Further, the memory module 34 is additionally operable to
This field data of first virtual machine is stored into temporarily providing room corresponding to first virtual machine.
Further, first depositor is the depositor for controlling translation lookaside buffer TLB.
The first judging unit 321 and the second judging unit 322 in the present embodiment in actual applications, before being specifically as follows
Decision logic is stated, the decision logic can be software and/or hardware, such as decision logic includes the logic increased newly in processor
Decision circuitry, or application logical judgment program on a processor, or logic judging circuit and control logic judgement
The program of circuit.
In the present embodiment, when the first depositor in the first virtual machine access control depositor, even if at host
In non-core phychology, but the control device of operation virtual machine knows that the first virtual machine is in core according to the mode bit of the first virtual machine
State, just can control first virtual machine and accesses the first depositor, it is not necessary to restart the first virtual machine, just can complete to post first
The access of storage, so as to reduce the number of times that virtual machine on host is restarted, and then can reduce host for restarting void
The expense of plan machine.
It should be added that, the modules correspondence in above-mentioned each device embodiment performs above-mentioned each method reality
Each step in example is applied, specific implementation procedure and technique effect refer to above-mentioned each embodiment of the method, and here is no longer gone to live in the household of one's in-laws on getting married
State.
One of ordinary skill in the art will appreciate that:Realizing all or part of step of above-mentioned each method embodiment can lead to
Cross the related hardware of programmed instruction to complete.Aforesaid program can be stored in a computer read/write memory medium.The journey
Sequence upon execution, performs the step of including above-mentioned each method embodiment;And aforesaid storage medium includes:ROM, RAM, magnetic disc or
Person's CD etc. is various can be with the medium of store program codes.
Finally it should be noted that:Various embodiments above only to illustrate technical scheme, rather than a limitation;To the greatest extent
Pipe has been described in detail with reference to foregoing embodiments to the present invention, it will be understood by those within the art that:Its according to
So the technical scheme described in foregoing embodiments can be modified, either which part or all technical characteristic are entered
Row equivalent;And these modifications or replacement, do not make the essence disengaging various embodiments of the present invention technology of appropriate technical solution
The scope of scheme.
Claims (9)
1. it is a kind of operation virtual machine control method, it is characterised in that include:
The first deposit in this running of the first virtual machine, in first virtual machine needs access control depositor
During device, the mode bit of host is read, obtain the state value of host;
Whether the state value for judging the host is designated non-core state, when the state value of the host is designated non-core
Heart shaped state, determines that the host is in the non-core state of host;
When determining that the host is in host non-core phychology according to the state value of the host, then described first is read
The mode bit of virtual machine, obtains the state value of first virtual machine;
Whether the state value for judging the virtual machine is designated kernel state, when the state value of the virtual machine is designated core shape
State, determines that the host is in the non-core state of host;
When determining that first virtual machine is in virtual machine kernal state according to the state value of the virtual machine, then described the is controlled
One virtual machine accesses first depositor.
2. control method according to claim 1, it is characterised in that the control method is applied to processor, and described
Increasing newly in processor has decision logic, the decision logic, triggers when access control register instruction is performed, for judging
Whether the state value for stating host is designated non-core state, is additionally operable to judge whether the state value of the virtual machine is designated core
Heart shaped state.
3. control method according to claim 1 and 2, it is characterised in that when described this running of first virtual machine
Before beginning, the control method also includes:
The previous field data that the corresponding temporarily providing room of first virtual machine is stored is recovered to the control register, with
First virtual machine is set to start this running;
The field data is used to ensure that the virtual machine correctly carries out second operation after virtual machine first time end of run.
4. control method according to claim 3, it is characterised in that when described this running of first virtual machine terminates
When, the control method also includes:
This field data of first virtual machine is stored into temporarily providing room corresponding to first virtual machine.
5. control method according to claim 4, it is characterised in that first depositor is for controlling translation lookaside
The depositor of buffer TLB.
6. it is a kind of operation virtual machine control device, it is characterised in that include:
Acquisition module, in this running of the first virtual machine, when first virtual machine needs access control to deposit
During the first depositor in device, the mode bit of host is read, obtain the state value of host;
Determining module, the state value of the host for being obtained according to the acquisition module determines that the host is in place
Main frame non-core phychology,
Then the determining module triggers the mode bit that the acquisition module reads first virtual machine, obtains described first virtual
The state value of machine;
The state value of the virtual machine obtained according to the acquisition module when the determining module determines first virtual machine
In virtual machine kernal state when,
The then determining module trigger control module, the control module is used to controlling first virtual machine accessing described first
Depositor;
The determining module, including:
First judging unit, for judging whether the state value of the host that the acquisition module is obtained is designated non-core heart shaped
State, when the state value of the host is designated non-core state, determines that the host is in the non-core state of host;
Second judging unit, for judging whether the state value of the virtual machine that the acquiring unit is obtained is designated kernel state,
When the state value of the virtual machine is designated kernel state, determine that the host is in the non-core state of host.
7. control device according to claim 6, it is characterised in that the control device also includes:
Memory module, for the previous field data that the corresponding temporarily providing room of first virtual machine is stored to be recovered to described
Control register, so that first virtual machine starts this running;
The field data is used to ensure that the virtual machine correctly carries out second operation after virtual machine first time end of run.
8. control device according to claim 7, it is characterised in that the memory module is additionally operable to:
This field data of first virtual machine is stored into temporarily providing room corresponding to first virtual machine.
9. control device according to claim 8, it is characterised in that first depositor is for controlling translation lookaside
The depositor of buffer TLB.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410310784.8A CN104050017B (en) | 2014-07-01 | 2014-07-01 | Method and device for controlling operating virtual machine |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410310784.8A CN104050017B (en) | 2014-07-01 | 2014-07-01 | Method and device for controlling operating virtual machine |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104050017A CN104050017A (en) | 2014-09-17 |
CN104050017B true CN104050017B (en) | 2017-05-03 |
Family
ID=51502919
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410310784.8A Active CN104050017B (en) | 2014-07-01 | 2014-07-01 | Method and device for controlling operating virtual machine |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104050017B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106775919B (en) * | 2015-11-24 | 2020-03-13 | 龙芯中科技术有限公司 | State information control method and device |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101551756A (en) * | 2009-03-31 | 2009-10-07 | 成都市华为赛门铁克科技有限公司 | The virtual method and virtual device based on operating system layer |
CN102819712A (en) * | 2012-08-01 | 2012-12-12 | 龙芯中科技术有限公司 | Method and device for ensuring security of virtual machine operation system |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050080934A1 (en) * | 2003-09-30 | 2005-04-14 | Cota-Robles Erik C. | Invalidating translation lookaside buffer entries in a virtual machine (VM) system |
-
2014
- 2014-07-01 CN CN201410310784.8A patent/CN104050017B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101551756A (en) * | 2009-03-31 | 2009-10-07 | 成都市华为赛门铁克科技有限公司 | The virtual method and virtual device based on operating system layer |
CN102819712A (en) * | 2012-08-01 | 2012-12-12 | 龙芯中科技术有限公司 | Method and device for ensuring security of virtual machine operation system |
Also Published As
Publication number | Publication date |
---|---|
CN104050017A (en) | 2014-09-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10877793B2 (en) | Extending the base address register by modifying the number of read-only bits associated with a device to be presented to a guest operating system | |
JP5798485B2 (en) | Replacing physical hardware emulation with running | |
KR101296025B1 (en) | Improving nested virtualization performance in a computer system | |
US8595723B2 (en) | Method and apparatus for configuring a hypervisor during a downtime state | |
CN109478135A (en) | The UEFI of optimization reboots process | |
CN105830026A (en) | Apparatus and method for scheduling graphics processing unit workloads from virtual machines | |
CN104050012A (en) | Instruction Emulation Processors, Methods, And Systems | |
US10606677B2 (en) | Method of retrieving debugging data in UEFI and computer system thereof | |
CN103198122B (en) | Restart the method and apparatus of memory database | |
US9715403B2 (en) | Optimized extended context management for virtual machines | |
CN102096597A (en) | Virtual bus device using management engine | |
CN104583959A (en) | Enabling virtualization of processor resource | |
CN109408122A (en) | A kind of equipment starting method, electronic equipment and computer storage medium | |
US20150371036A1 (en) | Device simulation in a secure mode supported by hardware architectures | |
US20100205423A1 (en) | Bios, computer device and method for recovering bios | |
US9766918B2 (en) | Virtual system device identification using GPU to host bridge mapping | |
EP2325747A2 (en) | Virtual platform for prototyping system-on-chip designs | |
CN109885466B (en) | Simulation method, system and medium for processor C8000 | |
CN104050017B (en) | Method and device for controlling operating virtual machine | |
US9208080B2 (en) | Persistent memory garbage collection | |
CN108139906A (en) | Exception treatment | |
CN107861795B (en) | Method, system and device for simulating physical TCM chip and readable storage medium | |
US10282235B1 (en) | Single-click ejection of peripheral devices associated with virtual machines | |
US10379870B2 (en) | Supporting soft reboot in multi-processor systems without hardware or firmware control of processor state | |
CN104035811B (en) | The treating method and apparatus of virtual machine field data |
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 | ||
CP01 | Change in the name or title of a patent holder | ||
CP01 | Change in the name or title of a patent holder |
Address after: 100095 Building 2, Longxin Industrial Park, Zhongguancun environmental protection technology demonstration park, Haidian District, Beijing Patentee after: Loongson Zhongke Technology Co.,Ltd. Address before: 100095 Building 2, Longxin Industrial Park, Zhongguancun environmental protection technology demonstration park, Haidian District, Beijing Patentee before: LOONGSON TECHNOLOGY Corp.,Ltd. |