CN109408193A - Virtual machine realization method, device and computer equipment - Google Patents

Virtual machine realization method, device and computer equipment Download PDF

Info

Publication number
CN109408193A
CN109408193A CN201710695566.4A CN201710695566A CN109408193A CN 109408193 A CN109408193 A CN 109408193A CN 201710695566 A CN201710695566 A CN 201710695566A CN 109408193 A CN109408193 A CN 109408193A
Authority
CN
China
Prior art keywords
virtual machine
host
operating system
hardware device
processor
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
CN201710695566.4A
Other languages
Chinese (zh)
Other versions
CN109408193B (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.)
Loongson Technology Corp Ltd
Original Assignee
Loongson Technology Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Loongson Technology Corp Ltd filed Critical Loongson Technology Corp Ltd
Priority to CN201710695566.4A priority Critical patent/CN109408193B/en
Publication of CN109408193A publication Critical patent/CN109408193A/en
Application granted granted Critical
Publication of CN109408193B publication Critical patent/CN109408193B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4403Processor initialisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4406Loading of operating system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45575Starting, stopping, suspending or resuming virtual machine instances

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The application provides virtual machine realization method, device and computer equipment, wherein, this method comprises: starting host, execute the BIOS in the host, after the initialization for completing host by the BIOS, it is transferred to execution virtual machine, the virtual machine is controlled and simulates a virtual machine processor, and by the virtual machine processor loaded virtual machine operating system, and utilize the resource of VME operating system access host.The technical solution just directly can realize virtual machine in the BIOS of host, not need the operating system of starting host, substantially reduce the starting time of virtual machine, improve the starting efficiency of virtual machine, improve the usage experience of user after the BIOS starting of host.

Description

Virtual machine realization method, device and computer equipment
Technical field
This application involves field of computer technology more particularly to a kind of virtual machine realization methods, device and computer equipment.
Background technique
Virtual machine (Virtual Machine, VM), which refers to, has completion hardware system function, operation by what software was simulated Complete computer in a completely isolated environment.It, can by software virtual machine (or being aided with a small amount of hardware supported) To simulate another or multiple virtual computers on a physical computer, these virtual machines are completed just as really counting Calculation machine works like that.
Fig. 1 is the structural schematic diagram of conventional virtual machine.As shown in Figure 1, bottom is true physical machine, referred to as host, Virtual machine and machine thereon are known as belonging to virtual machine.For this structure of conventional virtual machine, the start-up course of virtual machine As follows: host starts the operating system of host first, then starts virtual machine, and then restarts the operation system run on virtual machine System could finally start the application program run on virtual machine.This structure of virtual machine is using virtual machine as local operation system One application program of system, therefore, the exploitation and debugging to virtual machine are more convenient.
However, the structural schematic diagram of conventional virtual machine has a problem that, i.e. the start-up course of virtual machine is divided into multiple ranks Section, only just can be carried out starting after native operating sys-tern normally starts, this makes the start-up course of virtual machine very tediously long, User experience is poor.
Summary of the invention
The application provides a kind of virtual machine realization method, device and computer equipment, to solve to open due to existing virtual machine Dynamic process tedious causes the problem of user experience difference.
The application first aspect provides a kind of virtual machine realization method, comprising:
Start host, executes the basic input-output system BIOS in the host;
After the initialization for completing the host by the BIOS, it is transferred to execution virtual machine;
It controls the virtual machine and simulates a virtual machine processor;
Institute is accessed by the virtual machine processor loaded virtual machine operating system, and using the VME operating system State the resource of host.
In the embodiment of the application, the program entry address of the virtual machine is provided in the BIOS.
In another embodiment of the application, before the control virtual machine simulates a virtual machine processor, Further include:
Judge whether the host and the instruction set that the virtual machine uses are consistent;
When the instruction set that the host and the virtual machine use is inconsistent, the machine instruction of the virtual machine is converted With the consistent machine instruction of instruction set type of the host.
In the another embodiment of the application, the resource that the host is accessed using the VME operating system, Include:
In the VME operating system, check that the VME operating system adds by the equipment manager of virtual machine The hardware device of load;
The access master is converted by access operation of the VME operating system to hardware device in the virtual machine The hardware device of machine.
Visit in above-described embodiment of the application, by the VME operating system to hardware device in the virtual machine Ask that operation is converted into the hardware device for accessing the host, comprising:
Visit by the hardware interface of hardware device, by the VME operating system to hardware device in the virtual machine Ask that operation is converted into the hardware device for accessing the host;
Wherein, the hardware interface of hardware device includes: port space, memory space, direct memory access space, interrupts.
The application second aspect provides a kind of virtual machine realization device, comprising:
Starting module executes the basic input-output system BIOS in the host for starting host;
Processing module is transferred to execution virtual machine after the initialization for completing the host by the BIOS;
Control module simulates a virtual machine processor for controlling the virtual machine;
Access modules are used for through the virtual machine processor loaded virtual machine operating system, and utilize the virtual machine The resource of host described in operating system access.
In the embodiment of the application, the program entry address of the virtual machine is provided in the BIOS.
In another embodiment of the application, the processing module is also used to control the virtual machine mould in control module Before a quasi- virtual machine processor, judge whether the host and the instruction set that the virtual machine uses are consistent, and described When the instruction set that host and the virtual machine use is inconsistent, by the finger of the machine instruction conversion and the host of the virtual machine Enable the collection consistent machine instruction of type.
In the another embodiment of the application, the access modules, for accessing institute using the VME operating system The resource of host is stated, specifically:
The access modules are specifically used in the VME operating system, are looked by the equipment manager of virtual machine The hardware device for seeing the VME operating system load, by the VME operating system to hardware device in the virtual machine Access operation be converted into the hardware device for accessing the host.
In above-described embodiment of the application, the access modules are specifically used for the VME operating system to institute The access operation for stating hardware device in virtual machine is converted into the hardware device for accessing the host, specifically:
The access modules, specifically for the hardware interface by hardware device, by the VME operating system to institute The access operation for stating hardware device in virtual machine is converted into the hardware device for accessing the host;
Wherein, the hardware interface of hardware device includes: port space, memory space, direct memory access space, interrupts.
The application third aspect provides a kind of computer equipment, including processor, memory and is stored in the memory Computer program that is upper and can running on a processor, wherein the processor realizes such as above-mentioned first when executing described program Method described in aspect.
The application fourth aspect provides a kind of computer readable storage medium, is stored thereon with computer program, the journey The method as described in above-mentioned first aspect is realized when sequence is executed by processor.
Virtual machine realization method, device and computer equipment provided by the embodiments of the present application are held first by starting host BIOS in row host is transferred to execution virtual machine, controls the virtual machine after the initialization for completing host secondly by the BIOS A virtual machine processor is simulated, and by the virtual machine processor loaded virtual machine operating system, and utilizes the virtual machine The resource of operating system access host.The technical solution, just can be directly in the BIOS of host after the BIOS starting of host It realizes virtual machine, does not need the operating system of starting host, substantially reduce the starting time of virtual machine, improve virtual machine Starting efficiency improves the usage experience of user.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is this Shen Some embodiments please for those of ordinary skill in the art without any creative labor, can be with It obtains other drawings based on these drawings.
Fig. 1 is the structural schematic diagram of conventional virtual machine;
Fig. 2 is the flow diagram of virtual machine realization method embodiment one provided by the present application;
Fig. 3 is the flow diagram of virtual machine realization method embodiment two provided by the present application;
Fig. 4 is the flow diagram of virtual machine realization method embodiment three provided by the present application;
Fig. 5 is the access transition diagram of the hardware device of the hardware device and host in virtual machine;
Fig. 6 is the structural schematic diagram of virtual machine realization device embodiment provided by the embodiments of the present application.
Specific embodiment
To keep the purposes, technical schemes and advantages of the embodiment of the present application clearer, below in conjunction with the embodiment of the present application In attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is Some embodiments of the present application, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art Every other embodiment obtained without creative efforts, shall fall in the protection scope of this application.
Virtual machine (Virtual Machine, VM) mainly by the method for software (or being aided with a small amount of hardware supported) come Fictionalize a computer, a computer actually in logic.Under normal conditions, the operating system operated on VM is used Guest OS is indicated.Virtual machine relies on local physical machine (referred to as host), and the instruction of virtual machine is executed by the physical machine Sequence (target program), and then execution is simulated on the local machine.Local physical machine is the computer being physically present, and uses HOST It indicates, the operating system run on HOST is indicated with Host OS.
Under normal conditions, virtual computer usually supports oneself a set of instruction set, referred to as virtual machine interpreter.Virtually Machine is commonly used in realizing the compatibility of software between the various processors.For example, the processor of a certain producer is based on no internal mutual Lock microprocessor (Microprocessor without Interlocked Piped Stages, the MIPS) instruction of pipelining-stage Collection, personal computer (personal computer, PC machine) are based on x86 instruction set, the i.e. finger of the instruction set and PC machine of virtual machine Enable collection be it is incompatible, therefore, the software of the PC machine based on x86 instruction set can not be directly in the processor based on MIPS instruction set Upper operation.If running the virtual machine of x86 instruction set on the machine of a certain processor (being based on MIPS instruction set), then can The operating system of virtual machine is enough run, and further runs all application programs based on VME operating system.
Since existing virtual machine is realized dependent on local physical machine (host), the structure of conventional virtual machine such as background skill Shown in Fig. 1 in art.Typical conventional virtual machine includes: Java Virtual Machine and QEMU virtual machine.Wherein, Java Virtual Machine is main Java bytecode program is run by one intermediate code enforcement engine of simulation.QEMU virtual machine is a kind of the cross-platform of open source Virtual machine can simulate several processors of X86, Arm, MIPS etc. ten, be realized at isomery by using binary translation technique Manage the simulation of device.
But regardless of which kind of virtual machine, the structure of conventional virtual machine be it is similar, start-up course is divided into multiple ranks Section, i.e. virtual machine are on startup it may first have to which then the operating system for starting host restarts virtual machine, and then start virtual The operating system of machine could finally start the application program of operation on a virtual machine.This boot sequence makes opening for virtual machine Dynamic process is slower, and user experience is poor.Further, since existing Virtual Machine Worker is under the form of application program, to local The use of hardware resource is very limited, the hardware resource for the interface access local that intelligence is provided by host operating system, Constrain the function and performance boost of virtual machine.
In view of the above-mentioned problems, this application provides a kind of virtual machine realization method, device and computer equipment, it can be direct Virtual machine is realized on a processor, changes the boot sequence of virtual machine, is shortened the start-up course of virtual machine, is improved user Usage experience.In the following, being described in detail by technical solution of the specific embodiment to the application.
It should be noted that these specific embodiments can be combined with each other below, for the same or similar concept Or process may repeat no more in certain embodiments.
Fig. 2 is the flow diagram of virtual machine realization method embodiment one provided by the present application.The present embodiment mainly utilizes Processor is realized.As shown in Fig. 2, virtual machine realization method provided by the embodiments of the present application, includes the following steps:
Step 21, starting host, execute the BIOS in host.
Calculating is cured to since basic input output system (Basic Input Output System, BIOS) is one group Program in machine on mainboard on a rom chip, after the program of its in store most important basic input and output of computer, booting Self-check program and system self-triggered program can provide the bottom, most direct hardware setting and control for computer.Cause The BIOS in host is first carried out in host (Host machine) starting in this.
After step 22, the initialization by above-mentioned BIOS completion host, it is transferred to execution virtual machine.
Specifically, after it boots up, host is initialized first with BIOS, initialization to be done Afterwards, execution virtual machine is transferred to by the program entry address for the virtual machine being arranged in BIOS, that is, is transferred to and executes starting virtual machine Operation.
The step indicates that processor after starting BIOS, i.e., after the initialization of completion host, just can directly initiate Virtual machine starts the operating system of host with processor in the prior art first, and the method that could start virtual machine is compared, this Virtual machine in application is more like a true PC machine in usage experience, is not influenced by host operating system, user makes With experiencing.
Step 23, the above-mentioned virtual machine of control simulate a virtual machine processor.
In embodiments herein, in order to realize the function of virtual machine, need to create the running example of a virtual machine. Specifically, control virtual machine first simulates a virtual machine processor, so that virtual machine can run void when starting virtual machine The operating system of quasi- machine, and then run all application programs based on VME operating system.
Step 24 is led by virtual machine processor loaded virtual machine operating system, and using VME operating system access The resource of machine.
When the running example of processor control one virtual machine of virtual machine creating, i.e., simulation has obtained one in virtual machine After virtual machine processor, the virtual machine processor that the processor of host can control in virtual machine brings into operation, and executes load The operation of VME operating system, this process are similar to host and are loaded directly into VME operating system.
After successfully starting up VME operating system in virtual machine, VME operating system operation can be controlled and be located at void Application program on quasi- machine.Since external equipment follows identical hardware specification, thus VME operating system is to virtual machine The access of middle external equipment can be converted into the external equipment of access host, and then be realized and be visited using VME operating system Ask the purpose of host resource.
Virtual machine realization method provided by the embodiments of the present application, first starting host, execute the BIOS in host, secondly logical It crosses after the initialization that the BIOS completes host, is transferred to execution virtual machine, control the virtual machine and simulate a virtual machine processor, And by the virtual machine processor loaded virtual machine operating system, and utilize the money of VME operating system access host Source.The technical solution just directly can realize virtual machine in the BIOS of host, not need to start after the BIOS starting of host The operating system of host substantially reduces the starting time of virtual machine, improves the starting efficiency of virtual machine, improve user's Usage experience.
Optionally, it in the virtual machine realization method that the above embodiments of the present application provide, is provided in above-mentioned BIOS virtual The program entry address of machine.
Specifically, in the embodiment of the present application, since processor needs to turn later by the initialization that BIOS completes host To execute virtual machine, so, in order to make BIOS execute at the end of can be transferred to automatically execute virtual machine program, the BIOS of host The middle program entry address for needing to be arranged virtual machine, such processor can directly pass through void after host initialization is completed The program entry address of quasi- machine is transferred to the operation for executing starting virtual machine.
As an example, designer, can be by increasing virtual machine journey in design processor in bios software The corresponding instruction in sequence entry address, and the initialization program in BIOS finally increases corresponding program, to realize that starting is virtual The operation of machine.
In embodiments herein, due to both the virtual machine processor simulated and host-processor based on instruction Collection may be different, in order to enable the processor simulated to run on the processor of host, it is also necessary to judge host and virtual Whether the instruction set that machine uses is consistent, referring specifically to the record being illustrated in fig. 3 shown below in embodiment.
Fig. 3 is the flow diagram of virtual machine realization method embodiment two provided by the present application.The present embodiment is to above-mentioned The further explanation of embodiment illustrated in fig. 2.Specifically, as shown in figure 3, virtual machine realization method provided by the embodiments of the present application, Include the following steps:
Step 31, starting host, execute the BIOS in the host.
After step 32, the initialization by above-mentioned BIOS completion host, it is transferred to execution virtual machine.
Step 33 judges whether the host and the instruction set that the virtual machine uses are consistent;If so, step 35 is executed, if it is not, Step 34 is first carried out, then executes step 35.
Under normal conditions, virtual machine and host can use a variety of instruction set, thus, the processor and virtual machine of host Processor is potentially based on different instruction set and realizes.Thus, in order to guarantee the application program (machine instruction) run on virtual machine Can normally be executed on host, the embodiment of the present application control virtual machine simulate one oneself virtual machine processor it Before, then firstly the need of judging whether the host and the instruction set that the virtual machine uses are consistent, and difference is executed according to judging result Operation.
The machine instruction of virtual machine is converted the consistent machine instruction of instruction set type with host by step 34.
When the instruction set for judging that virtual machine and depended on host use is not identical, at this point, the application journey on virtual machine Sequence then can not directly be run on host.At this point, the program of instruction conversion can be arranged in BIOS in the embodiment of the present application In, and then the machine instruction of virtual machine can be directly converted to the instruction with host when being transferred to execution virtual machine by processor Collect consistent machine instruction.
For example, binary translator can be set in virtual machine, it is inconsistent in the instruction set that virtual machine and host use When, it is converted using machine instruction of the binary translator to virtual machine, and then the machine instruction of virtual machine is converted into Machine instruction can be run on host, functionally equivalence.Wherein, which uses binary translation skill Art is realized.
Step 35, control virtual machine simulate a virtual machine processor.
When the instruction set that virtual machine uses is consistent with the instruction set of host, the machine instruction of virtual machine then can directly exist It is run on host, thus the processor of host can directly control virtual machine and simulate a virtual machine processor, the tool of the step Body realization is similar with recording in above-mentioned steps 23, and details are not described herein again.
Step 36 is accessed by virtual machine processor loaded virtual machine operating system, and using the VME operating system The resource of host.
In Detailed operating procedures and embodiment illustrated in fig. 2 one for step 31, step 32, step 35 and step 36 Implementation process is the same, and details are not described herein again.
Virtual machine realization method provided by the embodiments of the present application, by simulating a virtual machine processor in control virtual machine Before, judge whether host and the instruction set that virtual machine uses are consistent, and when the two is inconsistent, by the machine instruction of virtual machine The consistent machine instruction of instruction set type of conversion and host, the virtual machine processor simulated in this way can then be loaded directly into void Quasi- machine operating system, and using the resource of VME operating system access host, avoid the finger due to virtual machine and host Enable the inconsistent application program for causing virtual machine of collection can not be the problem of running on host.
On the basis of the above embodiments, Fig. 4 is that the process of virtual machine realization method embodiment three provided by the present application is shown It is intended to.As shown in figure 4, in the embodiment of the present application, the money using VME operating system access host in above-mentioned steps 24 Source may include steps of:
Step 41, in VME operating system, check that VME operating system adds by the equipment manager of virtual machine The hardware device of load.
In the embodiment of the present application, after virtual machine success loaded virtual machine operating system, virtual machine is similar to true Host it is the same, various external equipments can be loaded, certainly, virtual machine has oneself equipment manager, passes through the equipment pipe Reason device can check the hardware device (i.e. peripheral hardware) of VME operating system load.
As an example, the hardware device of VME operating system load is all external equipments for forming virtual machine, It can be similar with the hardware device that host can load, for example, the hardware device can be hard disk, video card, network interface card, general string Row bus (Universal Serial Bus, USB) printer etc..The embodiment of the present application does not load VME operating system Hardware device type and specific equipment be defined.
Step 42 converts access operation of the VME operating system to hardware device in virtual machine to the hard of access host Part equipment.
Optionally, due to the computer of different architecture, difference essentially consists in the instruction set of processor, ordinary circumstance Under, the hardware device (i.e. peripheral hardware) of load then follows identical hardware specification (for example, peripheral bus and standard interface (Peripheral Component Interface Express, PCIE) is card slot, and USB is that universal serial bus connects Mouthful, Serial Advanced Technology Attachment (Serial Advanced Technology Attachment, SATA) is hard-disk interface etc.). Therefore, the hardware device in the hardware device and host in virtual machine is virtually free from difference, thus, the hardware in host Equipment can be used directly in virtual machine, it can by VME operating system to the access operation of hardware device in virtual machine It is converted into the hardware device of access host.
Correspondingly, in the embodiment of the present application, by VME operating system to the access operation of hardware device in virtual machine It is converted into the hardware device of access host, specifically: by the hardware interface of hardware device, by VME operating system to virtual The access operation of hardware device is converted into the hardware device of access host in machine.Wherein, the hardware interface of hardware device includes: end Mouth space, direct memory access space, is interrupted at memory space.
Specifically, the hardware interface of a hardware device may include 4 parts, i.e. port space, memory space, DMA Space, interruption.Any operating system is all to access a hardware device by this 4 part.
For example, Fig. 5 is the access transition diagram of the hardware device of the hardware device and host in virtual machine.Such as Fig. 5 institute Show, in the embodiment of the present application, VME operating system, can be straight to the port space of virtual machine, the access of memory space Corresponding port space and the memory space of host are asked in receiving.For example, VME operating system is to the port space of virtual machine, storage The read-write operation in space can write direct corresponding port space and the memory space of host.Have in the hardware device of host When the operation of direct memory access (Direct Memory Access, DMA), the input data in the space DMA is written to virtual machine In the memory of middle corresponding hardware device.When the hardware device of host issues interrupt requests, which can directly embody Interrupt requests are issued to correspond to equipment in virtual machine to VME operating system.
Thus, by above-mentioned mechanism, the hardware device on All hosts transparent, indiscriminate can be grasped in virtual machine Make directly to use in system.
Virtual machine realization method provided by the embodiments of the present application passes through the equipment of virtual machine in VME operating system Manager can check the hardware device of VME operating system load, and by VME operating system to hardware in virtual machine The access operation of equipment is converted into the hardware device of access host.In the technical solution, loaded virtual machine operating system it is virtual Machine directly can manage and access all hardware equipment and resource of host, more than the virtual machine realized under application program form It is easy to implement the simulation of peripheral hardware, it is versatile, it realizes that cost is low, there is wide applicability.
It is worth noting that as an example, above-mentioned host can be the mainboard for being equipped with a certain producer's processor, it is main The BIOS of machine can be the program on the rom chip being cured on the mainboard, for example, can be realized using open source software PMON. Above-mentioned virtual machine can select X86 virtual machine, and the operating system of virtual machine can be Windows operating system, and hardware device can To be USB printer etc..In practical applications, the embodiment of the present application does not limit the concrete embodiment form of above-mentioned each component It is fixed, it can be configured according to actual needs.
Following is the application Installation practice, can be used for executing the application embodiment of the method.It is real for the application device Undisclosed details in example is applied, the application embodiment of the method is please referred to.
Fig. 6 is the structural schematic diagram of virtual machine realization device embodiment provided by the embodiments of the present application.As shown in fig. 6, this Apply for the virtual machine realization device that embodiment provides, may include starting module 61, processor module 62, control module 63 and visit Ask module 64.
Wherein, the starting module 61 executes the BIOS in the host for starting host.
The processing module 62 is transferred to execution virtual machine after the initialization for completing the host by the BIOS.
The control module 63 simulates a virtual machine processor for controlling the virtual machine.
The access modules 64 are used for through the virtual machine processor loaded virtual machine operating system, and utilize the void The resource of host described in quasi- machine operating system access.
Virtual machine realization device in the present embodiment can be used for executing the implementation of embodiment of the method shown in Fig. 2, specifically Implementation is similar with technical effect, and which is not described herein again.
Optionally, in the above-described embodiments, the program entry address of the virtual machine is provided in the BIOS.
Optionally, in the embodiment of the application, above-mentioned processing module 62 is also used to control in control module 63 described Before virtual machine simulates a virtual machine processor, judge whether the host and the instruction set that the virtual machine uses are consistent, And when the instruction set that the host and the virtual machine use is inconsistent, by the machine instruction conversion of the virtual machine with it is described The consistent machine instruction of instruction set type of host.
Optionally, in another embodiment of the application, above-mentioned access modules 64, for utilizing the virtual machine operations system System accesses the resource of the host, specifically:
The access modules 64 are specifically used in the VME operating system, pass through the equipment manager of virtual machine The hardware device for checking the VME operating system load, the VME operating system sets hardware in the virtual machine Standby access operation is converted into the hardware device for accessing the host.
Further, in above-described embodiment of the application, the access modules 64, specifically for grasping the virtual machine Make system and be converted into the hardware device for accessing the host to the access operation of hardware device in the virtual machine, specifically:
The access modules 64, specifically for the hardware interface by hardware device, by the VME operating system pair The access operation of hardware device is converted into the hardware device for accessing the host in the virtual machine;Wherein, hardware device is hard Part interface includes: port space, memory space, direct memory access space, interrupts.
Virtual machine realization device provided by the embodiments of the present application starts host by starting module, executes in the host BIOS is transferred to execution virtual machine, utilizes control module after the initialization for being completed host by above-mentioned BIOS using processing module It controls virtual machine and simulates a virtual machine processor, operated finally by access modules by virtual machine processor loaded virtual machine System, and utilize the resource of VME operating system access host.The technical solution does not need the operating system of starting host, section The virtual machine starting time has been saved, has improved user experience, and the virtual machine of the application can be in VME operating system The middle hardware device using host, versatile, cost of implementation is low.
The embodiment of the present application provides a kind of computer equipment, including processor, memory and is stored on the memory And the computer program that can be run on a processor, the processor are realized as shown in above-mentioned Fig. 2 to Fig. 5 when executing described program The method of embodiment.
The embodiment of the present application provides a kind of computer readable storage medium, is stored thereon with computer program, described program The method such as above-mentioned Fig. 2 to embodiment illustrated in fig. 5 is realized when being executed by processor.
Those of ordinary skill in the art will appreciate that: realize that all or part of the steps of above-mentioned each method embodiment can lead to The relevant hardware of program instruction is crossed to complete.Program above-mentioned can be stored in a computer readable storage medium.The journey When being executed, execution includes the steps that above-mentioned each method embodiment to sequence;And storage medium above-mentioned include: ROM, RAM, magnetic disk or The various media that can store program code such as person's CD.
Finally, it should be noted that the above various embodiments is only to illustrate the technical solution of the application, rather than its limitations;To the greatest extent Pipe is described in detail the application referring to foregoing embodiments, those skilled in the art should understand that: its according to So be possible to modify the technical solutions described in the foregoing embodiments, or to some or all of the technical features into Row equivalent replacement;And these are modified or replaceed, each embodiment technology of the application that it does not separate the essence of the corresponding technical solution The range of scheme.

Claims (12)

1. a kind of virtual machine realization method characterized by comprising
Start host, executes the basic input-output system BIOS in the host;
After the initialization for completing the host by the BIOS, it is transferred to execution virtual machine;
It controls the virtual machine and simulates a virtual machine processor;
The master is accessed by the virtual machine processor loaded virtual machine operating system, and using the VME operating system The resource of machine.
2. the method according to claim 1, wherein being provided with the program entry of the virtual machine in the BIOS Address.
3. method according to claim 1 or 2, which is characterized in that simulate one virtually in the control virtual machine Before machine processor, further includes:
Judge whether the host and the instruction set that the virtual machine uses are consistent;
Machine instruction conversion and institute when the instruction set that the host and the virtual machine use is inconsistent, by the virtual machine State the consistent machine instruction of instruction set type of host.
4. method according to claim 1 or 2, which is characterized in that described to access institute using the VME operating system State the resource of host, comprising:
In the VME operating system, the VME operating system load is checked by the equipment manager of virtual machine Hardware device;
The access host is converted by access operation of the VME operating system to hardware device in the virtual machine Hardware device.
5. according to the method described in claim 4, it is characterized in that, by the VME operating system to hard in the virtual machine The access operation of part equipment is converted into the hardware device for accessing the host, comprising:
By the hardware interface of hardware device, the VME operating system grasps the access of hardware device in the virtual machine It is converted into the hardware device for accessing the host;
Wherein, the hardware interface of hardware device includes: port space, memory space, direct memory access space, interrupts.
6. a kind of virtual machine realization device characterized by comprising
Starting module executes the basic input-output system BIOS in the host for starting host;
Processing module is transferred to execution virtual machine after the initialization for completing the host by the BIOS;
Control module simulates a virtual machine processor for controlling the virtual machine;
Access modules are used for through the virtual machine processor loaded virtual machine operating system, and utilize the virtual machine operations System accesses the resource of the host.
7. device according to claim 6, which is characterized in that be provided with the program entry of the virtual machine in the BIOS Address.
8. device according to claim 6 or 7, which is characterized in that the processing module is also used to control in control module Before the virtual machine simulates a virtual machine processor, judge instruction set that the host and the virtual machine use whether one Cause, and when the instruction set that the host and the virtual machine use is inconsistent, by the machine instruction conversion of the virtual machine with The consistent machine instruction of instruction set type of the host.
9. device according to claim 6 or 7, which is characterized in that the access modules, for being grasped using the virtual machine The resource of the host is accessed as system, specifically:
The access modules are specifically used in the VME operating system, check institute by the equipment manager of virtual machine State the hardware device of VME operating system load, the visit by the VME operating system to hardware device in the virtual machine Ask that operation is converted into the hardware device for accessing the host.
10. device according to claim 9, which is characterized in that the access modules, specifically for the virtual machine is grasped Make system and be converted into the hardware device for accessing the host to the access operation of hardware device in the virtual machine, specifically:
The access modules, specifically for the hardware interface by hardware device, by the VME operating system to the void The access operation of hardware device is converted into the hardware device for accessing the host in quasi- machine;
Wherein, the hardware interface of hardware device includes: port space, memory space, direct memory access space, interrupts.
11. a kind of computer equipment, including processor, memory and it is stored on the memory and can runs on a processor Computer program, which is characterized in that the processor is realized when executing described program such as any one of the claims 1-5 institute The method stated.
12. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that described program is processed Such as the claims 1-5 described in any item methods are realized when device executes.
CN201710695566.4A 2017-08-15 2017-08-15 Virtual machine implementation method and device and computer equipment Active CN109408193B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710695566.4A CN109408193B (en) 2017-08-15 2017-08-15 Virtual machine implementation method and device and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710695566.4A CN109408193B (en) 2017-08-15 2017-08-15 Virtual machine implementation method and device and computer equipment

Publications (2)

Publication Number Publication Date
CN109408193A true CN109408193A (en) 2019-03-01
CN109408193B CN109408193B (en) 2020-11-17

Family

ID=65454021

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710695566.4A Active CN109408193B (en) 2017-08-15 2017-08-15 Virtual machine implementation method and device and computer equipment

Country Status (1)

Country Link
CN (1) CN109408193B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6851111B2 (en) * 2000-12-15 2005-02-01 International Business Machines Corporation System and method for class loader constraint checking
CN1716205A (en) * 2004-06-30 2006-01-04 微软公司 Systems and methods for initializing multiple virtual processors within a single virtual machine
CN1916854A (en) * 2005-08-19 2007-02-21 联想(北京)有限公司 System the method for managing and configuring virtual machine
CN104714824A (en) * 2015-01-09 2015-06-17 青岛海信电器股份有限公司 Starting method of application programs

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6851111B2 (en) * 2000-12-15 2005-02-01 International Business Machines Corporation System and method for class loader constraint checking
CN1716205A (en) * 2004-06-30 2006-01-04 微软公司 Systems and methods for initializing multiple virtual processors within a single virtual machine
CN1916854A (en) * 2005-08-19 2007-02-21 联想(北京)有限公司 System the method for managing and configuring virtual machine
CN104714824A (en) * 2015-01-09 2015-06-17 青岛海信电器股份有限公司 Starting method of application programs

Also Published As

Publication number Publication date
CN109408193B (en) 2020-11-17

Similar Documents

Publication Publication Date Title
US9880867B2 (en) Method and subsystem for data exchange between a guest operating system and a virtualization layer
JP5345652B2 (en) Unified storage device based on partially virtualized machine
KR101903817B1 (en) Virtual disk storage techniques
Graziano A performance analysis of Xen and KVM hypervisors for hosting the Xen Worlds Project
US8789069B2 (en) On-the-fly replacement of physical hardware with emulation
US8830228B2 (en) Techniques for enabling remote management of servers configured with graphics processors
CN107430570B (en) Additional secure execution environment with SR-IOV and xHCI-IOV
US10289785B1 (en) Platform architecture creation for a system-on-chip
US20090265708A1 (en) Information Processing Apparatus and Method of Controlling Information Processing Apparatus
JP2014515148A (en) Virtual storage disk technology
CN102207896A (en) Virtual machine crash file generation techniques
US10606677B2 (en) Method of retrieving debugging data in UEFI and computer system thereof
US8887139B2 (en) Virtual system and method of analyzing operation of virtual system
KR20220050895A (en) Data retention technique using memory aperture flush order
CN104572165A (en) UEFI (Unified Extensible Firmware Interface) firmware implementation method based on Feiteng server
US9672047B1 (en) Systems and methods for accessing a bootable partition on a serial peripheral interface device
EP3336696A1 (en) Implementing device models for virtual machines with reconfigurable hardware
CN110516447A (en) A kind of method and apparatus of identification terminal simulator
US8145471B2 (en) Non-destructive simulation of a failure in a virtualization environment
Li et al. FEMU: A firmware-based emulation framework for SoC verification
US20160246629A1 (en) Gpu based virtual system device identification
Torbić et al. Hyper-V and ESXi hypervisors comparison in Windows Server 12 virtual environment
CN114765051A (en) Memory test method and device, readable storage medium and electronic equipment
CN109656758B (en) Debugging method and system for heterogeneous dual-processor system chip
CN106951268A (en) A kind of Shen prestige platform supports the implementation method of NVMe hard disk startups

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
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.

CP01 Change in the name or title of a patent holder