WO2012100535A1 - 超级内核组件的升级方法和计算机系统 - Google Patents
超级内核组件的升级方法和计算机系统 Download PDFInfo
- Publication number
- WO2012100535A1 WO2012100535A1 PCT/CN2011/079176 CN2011079176W WO2012100535A1 WO 2012100535 A1 WO2012100535 A1 WO 2012100535A1 CN 2011079176 W CN2011079176 W CN 2011079176W WO 2012100535 A1 WO2012100535 A1 WO 2012100535A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- hypervisor
- upgrade
- instruction
- breakpoint
- function
- Prior art date
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
- G06F8/656—Updates while running
Definitions
- the present invention relates to the field of computer technology, and in particular to an upgrade method and a computer system for a hyper-kernel Hypervisor component. Background technique
- virtual machine software can simulate one or more virtual computers on a physical computer, and these virtual machines work like real computers.
- the virtual machine can install an operating system, install applications, Access network resources and more.
- the virtual machine is like working on a real computer.
- the hypervisor component of the communication device A needs to be upgraded, the service on the communication device A is first migrated to another communication device B through the hot migration technology, and then the service of the communication device A is stopped, and the upgrade is performed. After the component of the Hypervisor of the communication device A is to be upgraded, the communication device A is restarted, and the service executed on the communication device B is then migrated to the communication device.
- the embodiment of the present invention provides an upgrade method and a computer system for the Hypervisor component to reduce the device resources required for upgrading the Hypervisor component and reduce the impact of the upgrade on the service.
- the embodiment of the present invention provides the following technical solutions:
- a method for upgrading a hyper-kernel Hypervisor component including: The virtual machine kernel calls the hypervisor interface of the hypervisor, and loads an upgrade file for upgrading the target function in the hypervisor component to the address space of the hypervisor, and the upgrade file includes an upgrade function corresponding to the target function;
- the virtual machine kernel calls the Hypervisor's super-call interface to replace the start position instruction of the target function in the Hypervisor component that needs to be upgraded with the first interrupt breakpoint instruction;
- the virtual machine kernel calls the Hypervisor's supercall interface to replace the first interrupt breakpoint instruction.
- the jump instruction points to an upgrade function in the upgrade file in the address space.
- a computer system comprising: a central processing unit CPU, a memory, wherein the memory is used to store a program corresponding to the program code, wherein the CPU runs a virtual machine kernel and a super kernel Hypervisor:
- the virtual machine kernel is used to call the hypervisor's supercall interface, which will be used for the upgrade.
- An upgrade file of the target function in the Hypervisor component is loaded into the address space of the Hypervisor, the upgrade file includes an upgrade function corresponding to the target function; a hypercall interface of the hypervisor is called, and an objective function in the Hypervisor component to be upgraded is required.
- the start position instruction is replaced with a first interrupt breakpoint instruction;
- the virtual machine core is further configured to: when the interrupt handler in the virtual machine kernel determines that the breakpoint causing the breakpoint exception is caused by the first interrupt breakpoint instruction, invoke the Hypervisor's supercall interface to replace
- the first interrupt breakpoint instruction is a jump instruction required for upgrading to upgrade an objective function in the Hypervisor component that needs to be upgraded to the upgrade function, wherein the jump instruction points to an upgrade in the address space The upgrade function in the file.
- the hypervisor of the embodiment of the present invention provides a super-call interface
- the virtual machine kernel calls the super-call interface of the hyper-kernel hypervisor, loads the upgrade file for upgrading the hypervisor component into the address space of the hypervisor, and invokes the hypervisor hypercall.
- the interface replaces the start position instruction of the target function in the Hypervisor component that needs to be upgraded with the interrupt breakpoint instruction; when it is found that the interrupt handler determines that the breakpoint causing the breakpoint abnormality is caused by the interrupt breakpoint instruction, Call the Hypervisor's super-call interface, upgrade the target function in the Hypervisor component that needs to be upgraded, and upgrade it to the upgrade function corresponding to the target function in the upgrade file.
- the hypervisor Since the hypervisor is used to provide the hyper-call interface to upgrade the Hypervisor component online, it is not required.
- the hot migration service to other devices reduces the device resources required to upgrade the Hypervisor components. It also reduces the impact of upgrading the Hypervisor components on the upper-layer services.
- the upgrade mechanism does not need to interrupt services, and the real-time performance is high. It is also relatively short.
- FIG. 1 is a schematic diagram of a virtual system operation architecture according to an embodiment of the present invention.
- FIG. 2 is a schematic flowchart of a method for upgrading a Hypervisor component according to an embodiment of the present invention
- FIG. 3 is a schematic structural diagram of a virtual system module according to an embodiment of the present invention
- FIG. 3 is a schematic diagram of an upgrade memory area division according to an embodiment of the present disclosure.
- FIG. 4 is a schematic flowchart of a method for upgrading a Hypervisor component according to an embodiment of the present invention
- FIG. 5 is a schematic diagram of a computer system according to an embodiment of the present invention. detailed description
- Embodiments of the present invention provide an upgrade method and a computer system for a hyper-kernel Hypervisor component.
- the technical solutions in the embodiments of the present invention will be clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is an embodiment of the invention, but not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without departing from the inventive scope should fall within the scope of the present invention.
- a virtualized environment can include the following elements:
- Hypervisor is a software layer between hardware and virtual machine operating system, mainly responsible for central processing (CPU) scheduling and memory allocation between virtual machines.
- Hypervisor not only abstracts the hardware layer, but also supports the operation of each virtual machine, because each virtual machine shares the same hardware processing environment.
- the Hypervisor in the virtualization system works directly with the hardware, and the Hypervisor runs at the CPU RingO level (that is, has the highest access to the hardware).
- Domain U is a virtual machine
- Domain 0 can be regarded as a management node of other virtual machines
- Domain 0 is usually the only virtual machine running on the hypervisor, scheduling the hypervisor, and having the right to access physical I/O resources, and virtual Other virtual machines running on the system interact.
- the application scenario of the embodiment of the present invention is mainly for online upgrade of the Hypervisor component in a virtualized environment, which is described in detail below through specific embodiments.
- An upgrade method of a hyper-kernel Hypervisor component provided by an embodiment of the present invention, as shown in FIG. 2, specifically includes the following steps:
- the virtual machine kernel invokes a Hypervisor super-call interface, and loads an upgrade file for upgrading the target function in the Hypervisor component to the address space of the Hypervisor, and the upgrade file includes an upgrade function corresponding to the target function.
- the above objective function is a function to be upgraded (old function).
- the new function run by the program is an upgrade function (new function) in the upgrade file, and the target function is upgraded to an upgrade function.
- the virtual machine kernel in this embodiment is a kernel of a virtual machine (such as a domain 0 or other similar function virtual machine) running on the hypervisor (in which, for example, an upgrade management module can be set),
- the above super-kernel Hypervisor provides a super-call interface, and the virtual machine kernel can access the hypervisor through the hyper-call interface provided by the hypervisor.
- the user space such as an application
- the virtual machine kernel in the embodiment of the present invention can proxy the user space to access the Hypervisor to perform operations such as upgrading the Hypervisor component.
- the hypervisor interface of the hypervisor is loaded, and the upgrade file for upgrading the hypervisor component is loaded into the address space of the hypervisor.
- the specific information may include: calling the hypervisor of the hypervisor, and dividing the address space of the hypervisor. Upgrade memory Zone; Call the hypervisor's supercall interface to load the upgrade file used to upgrade the hypervisor component into the upgrade memory area in the address space of the hypervisor.
- the embodiment of the present invention further includes:
- Hypervisor's super-call interface is invoked, and the upgrade file used to upgrade the Hypervisor component is loaded into the upgrade memory area in the address space of the above Hypervisor;
- Hypervisor's super-call interface is called, and an upgrade memory area is further divided in the Hypervisor address space, so that there is enough upgrade memory area in the Hypervisor's address space to load the above upgrade file.
- the virtual machine kernel can also obtain the size of the upgrade file by other means (for example, directly counting the number of bytes, etc.), and according to the obtained size of the upgrade file, determine whether the current upgrade memory area of the Hypervisor address space is sufficient. The remaining space to load the upgrade file. If the upgrade memory area of the Hypervisor address space is large enough, the virtual machine kernel can also default to the Hypervisor address space. The current upgrade memory area has enough free space to load the upgrade file. Therefore, it is not necessary to upgrade the memory area beforehand. The remaining space is used to load the upgrade file for judgment, but can be loaded directly.
- the upgrade management module can also call the hypervisor hypercall interface to allocate part of the space of the upgrade memory area in the address space of the hypervisor. Divided for use by other programs.
- the "upgrading file for upgrading the Hypervisor component to the upgrade memory area in the address space of the above Hypervisor” may include:
- the virtual machine kernel invokes the hypervisor interface of the hypervisor, and replaces the start position instruction of the target function in the Hypervisor component to be upgraded with the first interrupt breakpoint instruction;
- the virtual machine core sets an upgrade trigger point by replacing the start position instruction of the target function in the Hypervisor component that needs to be upgraded with the first interrupt breakpoint instruction, and subsequently the system interrupts the first interrupt breakpoint instruction.
- an upgrade of the target function in the Hypervisor component is triggered.
- the virtual machine kernel calls the Hypervisor's supercall interface to replace the first interrupt breakpoint instruction.
- the virtual machine kernel calls the Hypervisor's supercall interface to replace the first interrupt breakpoint instruction.
- the virtual machine kernel may first call the Hypervisor's super-call interface to generate an equivalent code of the instruction to be overridden by the jump (JMP) instruction in the target function in the Hypervisor component that needs to be upgraded.
- the jump instruction points to an upgrade function corresponding to the target function in the upgrade file loaded into the Hypervisor address space (ie, the jump instruction is a jump instruction pointing to the upgrade function corresponding to the target function); and then the Hypervisor is called again. Calling the interface, replacing the instruction of the start position of the above objective function with the first interrupt breakpoint instruction;
- the interrupt handler can determine whether the breakpoint causing the breakpoint exception is caused by the first interrupt breakpoint.
- the command is caused (ie, it is determined whether the breakpoint abnormality is caused by the upgrade); if not, the breakpoint processing is performed according to the processing program corresponding to the breakpoint abnormality; if it is determined that the breakpoint abnormality is caused by the first interrupt breakpoint instruction (ie, the breakpoint exception is generated due to the upgrade, and the breakpoint exception is to activate the upgrade function corresponding to the target function in the Hypervisor component), then the virtual machine kernel can call the Hypervisor's supercall interface to check whether the CPU is executing the target function.
- the virtual machine kernel can call the hypervisor interface of the hypervisor to obtain the call stack of the CPU corresponding to the hypervisor. According to the obtained call stack, check the current function execution of each CPU, and then check whether the CPU is executing.
- the above objective function if it is checked that no CPU is executing the target function, the virtual machine kernel can be adjusted With the hypervisor's super call interface, replace the interrupt breakpoint instruction at the start of the target function with a jump instruction (the jump instruction points to the upgrade function corresponding to the target function), and set the return address of the breakpoint exception.
- the upgrade function will be executed after the breakpoint exception is returned. Subsequently, when a thread executes the above-mentioned destination function again, it will jump to the upgrade function corresponding to the target function according to the jump instruction.
- the interrupt handler determines that the breakpoint exception is caused by the first interrupt breakpoint instruction (ie, due to an upgrade, and the breakpoint exception is for the upgrade function corresponding to the target function in the active Hypervisor component)
- virtual The kernel checks that the CPU is executing the target function, and the virtual machine kernel can call the hypervisor of the hypervisor, replace the interrupt breakpoint instruction at the start position of the target function with a jump instruction, and the breakpoint is abnormal.
- the return address is set to the start address of the equivalent code of the above objective function, and the equivalent code will be executed after the breakpoint exception is returned. Subsequently, when a thread executes the above-mentioned destination function again, it jumps to the upgrade function corresponding to the target function according to the jump instruction.
- the virtual machine kernel can create a deferred upgrade kernel thread that is upgraded when the CPU executes the target function.
- the virtual machine kernel when the virtual machine kernel generates the equivalent code of the instruction to be covered by the jump instruction in the target function in the Hypervisor component, if there are several pieces of the starting position of the target function to be covered by the jump instruction
- the length of the instruction is known (for example, some instruction of fixed length, the length of the instruction to be replaced may be greater than or equal to the length of the jump instruction, for example, the jump instruction is 12 bytes, and the target function to be covered by it
- the length of several instructions in the starting position is 15 bytes.
- the virtual machine core can copy several instructions whose starting position of the target function will be replaced according to the length of the jump instruction, and generate corresponding equivalent code; If the length of several instructions of the start position of the target function replaced by the jump instruction is unknown, the virtual machine kernel can be based on the instruction code table (the operation code and operand of various instructions are recorded in the instruction code table) and The starting position of the target function in the Hypervisor component that needs to be upgraded will be the number of bytes to be replaced by the jump instruction (ie the length of the jump instruction), one by one Identifying the length of the instruction (including the opcode, and possibly the operand) that the start position of the target function in the Hypervisor component will be replaced by the jump instruction, and then copying the start position of the target function based on the recognized length Several instructions will be replaced by it, and a corresponding equivalent code will be generated.
- the interrupt handler determines whether the breakpoint exception is caused by the second interrupt breakpoint instruction (ie, determines whether the breakpoint exception is caused by the upgrade); if not, according to the breakpoint exception
- the processing program performs breakpoint processing; if the interrupt handler determines that the breakpoint exception is caused by the second interrupt breakpoint instruction (ie, it is determined that the breakpoint exception is generated due to the upgrade, and the breakpoint exception is to restore the upgrade), the virtual The kernel can call the super call interface to check whether the CPU of the CPU is executing the upgrade function corresponding to the target function in the above Hypervisor component.
- the virtual machine is virtual.
- the kernel may call the hypervisor interface of the hypervisor, restore the instruction whose position is covered by the jump instruction, and set the return address of the breakpoint exception to the start address of the equivalent code of the target function; The equivalent code will be executed after the breakpoint exception returns. Subsequently, when a thread executes the above-mentioned destination function again, the upgrade function corresponding to the target function is not executed, but the above-mentioned destination function is executed.
- the interrupt handler determines that the breakpoint exception is caused by the second interrupt breakpoint instruction (ie, due to an upgrade, and the breakpoint exception is to restore the upgrade); and the virtual machine kernel checks that the CPU is executing the hypervisor
- the upgrade function corresponding to the target function in the component the virtual machine kernel calls the hypervisor interface of the hypervisor, restores the instruction that the start position of the target function is covered by the jump instruction, and sets the return address of the breakpoint exception to the above The starting address of the upgrade function; the upgrade function will be executed after the breakpoint exception is returned. Subsequently, when a thread executes the above-mentioned destination function again, the upgrade function corresponding to the target function is not executed, but the destination function is executed.
- the virtual machine kernel can create a deferred restore kernel thread, and then restore the target function after the CPU executes the upgrade function corresponding to the target function.
- the virtual machine core of the embodiment may include multiple modules for collaborative upgrade.
- the virtual machine kernel is generally used to describe the corresponding The execution of the steps, without using its various modules to describe the corresponding steps, for example, an upgrade management module can be set in the virtual machine kernel, and the upgrade management module is responsible for proxy access to the hypervisor, and the hypervisor component upgrade management, when running in the hypervisor
- the upgrade agent module can be optionally loaded, and the steps performed by the various functional modules of the virtual machine kernel can of course describe the steps performed by the virtual machine kernel.
- the hypervisor of this embodiment provides a super-call interface
- the virtual machine kernel calls the super-call interface of the hyper-kernel hypervisor, loads the upgrade file for upgrading the hypervisor component into the address space of the hypervisor, and invokes the hypervisor interface of the hypervisor.
- the interrupt handler finds that the breakpoint causing the breakpoint exception is caused by the interrupt breakpoint instruction, the Hypervisor is called.
- the super-call interface upgrades the target function in the Hypervisor component that needs to be upgraded to the upgrade function corresponding to the target function in the upgrade file. Because the Hypervisor provides the super-call interface to upgrade the Hypervisor component online, the hot migration service is not required.
- the device resources required to upgrade the Hypervisor component are relatively reduced, and the impact of upgrading the Hypervisor component on the upper layer service is also reduced.
- the upgrade mechanism does not need to interrupt the service, and the real-time performance is high.
- the upgrade time is also relatively short.
- the upgrade management module is deployed in the kernel of the domain O.
- the deployment management module can be deployed in the kernel of the domain 0 as shown in Figure 3-a.
- the upgrade management module deployed in the kernel of the domain 0 can proxy access to the hypervisor. Including the upgrade management of Hypervisor components.
- specific steps may include:
- the user space application sends a Hypervisor component upgrade instruction to an upgrade management module deployed in a kernel of Domain 0;
- the hyper-kernel Hypervisor in this embodiment provides a super-call interface.
- the upgrade management module deployed in the kernel of Domain 0 can access the hypervisor through the hyper-call interface provided by the hypervisor.
- the user space such as the application
- the upgrade management module deployed in the kernel of Domain 0 can proxy the user space to access the hypervisor to perform operations such as upgrading the hypervisor component.
- a user space application of Domain 0 or other virtual machine may invoke a system call (Syscall) interface to send a Hypervisor component to an upgrade management module deployed in the kernel of Domain 0 by "upgrading device files".
- the upgrade instruction instructs the upgrade management module to load the upgrade file for upgrading the hypervisor component and upgrade the hypervisor component.
- the upgrade management module deployed in the kernel of Domain 0 invokes the super-call interface of the hyper-kernel hypervisor, and the upgrade file for upgrading the hypervisor component (for convenience of description, the upgrade file cartridge for upgrading the hypervisor component may be referred to as the target hypervisor).
- the component upgrade file is loaded into the address space of the hypervisor.
- the upgrade management module may, for example, invoke the super-call interface of the hyper-kernel hypervisor to directly load the upgrade file for upgrading the hypervisor component into the address space of the hypervisor; or, to upgrade the complexity of the upgrade management, upgrade
- the management module can also call the Hypervisor's super-call interface to divide the upgrade memory area in the address space of the hypervisor. (Upgrade the memory area can be dedicated to cache upgrade related data, which can facilitate upgrade management, and the upgraded memory area can be divided into three. b)); call the Hypervisor's super-call interface, and load the upgrade file used to upgrade the Hypervisor component into the upgrade memory area of the Hypervisor's address space.
- the size of the space in the upgrade memory area can be specifically set according to specific needs.
- a space of 50 MB, 100 MB, or other size can be allocated in the address space of the hypervisor as an upgrade memory area.
- the upgrade management module can also call the hypervisor's super-call interface, and then allocate an upgrade memory area in the address space of the hypervisor; of course, if there is too much free space in the upgrade memory area (for example, some of the space is always unused), upgrade The management module can also call the hypervisor's super-call interface to divide the part of the upgrade memory area in the address space of the hypervisor into other programs.
- the method for creating an upgrade file for upgrading the Hypervisor component may include: compiling the modified Hypervisor component source code (upgrade source code), compiling the compiled environment of the original compiled virtualized image, and obtaining the target hypervisor component upgrade file;
- the obtained target Hypervisor component upgrade file is connected to the target Hypervisor component upgrade file that can be loaded and run; further,
- the relocation information of all symbols in the target hypervisor upgrade file can also be converted into offset relocation information and saved to the target hypervisor upgrade file.
- the absolute address symbol file can record the preferred loading address (absolute address in the memory) of the next upgrade file, the relative address symbol file can be recorded, the preferred loading address of the next upgrade file, and the earliest (or some) Times) The difference between the preferred addresses of the upgrade files loaded into memory.
- the upgrade management module can be Before the upgrade file for upgrading the Hypervisor component is loaded into the upgrade memory area of the address space of the Hypervisor, the information is relocated according to the offset included in the upgrade file (the size of the upgrade file can be roughly determined according to the offset relocation information). Determine whether the current upgrade memory area of the Hypervisor address space has enough free space to load the upgrade file; if not, the upgrade management module can call the Hypervisor super call interface to further allocate an upgrade memory area in the Hypervisor address space (new division) The upgraded memory area and the original upgrade memory area can be managed uniformly.
- the upgrade management module can also obtain the size of the upgrade file by other means (for example, directly counting the number of bytes, etc.), and according to the obtained size of the upgrade file, determine whether the current upgrade memory area of the Hypervisor address space is sufficient. The remaining space to load the upgrade file.
- the upgrade management module may also default to the Hypervisor address space.
- the current upgrade memory area has enough free space to load the upgrade file, so the memory area may not be judged in advance. There is enough free space to load the upgrade file, which can be loaded directly.
- the upgrade management module loads the upgrade file for upgrading the Hypervisor component into the upgrade memory area of the address space of the hypervisor
- the method includes: comparing the preferred load address recorded in the upgrade file used to upgrade the hypervisor component, and Whether the starting address of the upgrade memory area to be loaded into the address space of the Hypervisor is the same; if the same, the upgrade management module can copy the upgrade file for upgrading the Hypervisor component to the corresponding upgrade memory area in the address space of the Hypervisor; Differently, the upgrade management module may relocate the symbol in the upgrade file used to upgrade the Hypervisor component, determine the address in the upgrade file to be loaded into the memory, and copy the relocated upgrade file to The corresponding upgrade memory area in the address space of the Hypervisor.
- the level management module can relocate the symbols in the upgrade file used to upgrade the Hypervisor component according to the difference between the start address of the upgrade memory area to be loaded into the address space of the hypervisor and the preferred load address recorded in the upgrade file. , get the upgrade file code that can be executed in the new location.
- the upgrade file includes three symbols of ABC, the offset relocation information of symbol A is 10, the offset relocation information of symbol B is 20, and the offset relocation information of symbol C is 30;
- the preferred load address recorded in the file is 0X000100, and the actual address to be loaded into the memory is 0X000500.
- the virtual machine kernel can first relocate the symbols in the upgrade file to ensure that the symbols in the upgrade file are loaded into the memory. The address is determined by relocation to determine that A's load address is 0X000510 (0X000500+10), B's load address is 0X000520 (0X000500+20); C's load address is 0X000530 (0X000500+10).
- the upgrade management module invokes the Hypervisor interface of the Hypervisor, and the Hypervisor component corresponding to the upgrade file is valid.
- the upgraded Hypervisor component corresponding to the effective upgrade file can be regarded as the function that is used to upgrade the target function, and is set to the state that can be executed (including the target function in the Hypervisor component that needs to be upgraded, upgrade) For the upgrade function in the upgrade file corresponding to the target function, etc.).
- the upgrade management module can implement the upgraded Hypervisor component corresponding to the upgrade file in a variety of ways.
- the upgrade management module may first invoke the hypervisor interface of the hypervisor to generate an equivalent code of an instruction to be overwritten by the jump instruction in the target function in the hypervisor component to be upgraded, where the jump The instruction points to an upgrade function corresponding to the target function (ie, the jump instruction is a jump instruction pointing to an upgrade function corresponding to the target function).
- an equivalent code which may include:
- the upgrade management module allocates memory space for the equivalent code
- the upgrade management module generates the equivalent code of the instruction covered by the jump instruction in the target function in the generated Hypervisor component, and if the instruction is to be overwritten by the jump instruction, the start position of the target function is several instructions.
- the length is known (for example some instructions that will be replaced by a fixed length will be The length of the replacement instruction may be greater than or equal to the length of the jump instruction.
- the jump instruction is 12 bytes, and the start position of the target function to be replaced by it is several bytes of length 15 bytes;), then upgrade The management module may copy a number of instructions to be replaced by the starting position of the target function according to the length of the jump instruction, and generate a corresponding equivalent code; if the starting position of the target function to be replaced by the jump instruction is several
- the upgrade management module can be based on the instruction code table (the operation code and operand of various instructions are recorded in the instruction code table) and the starting position of the target function in the Hypervisor component will be required by the jump instruction.
- the number of bytes to be replaced ie, the length of the jump instruction
- identifying the instruction at the beginning of the target function in the Hypervisor component that needs to be upgraded which will be replaced by the jump instruction (including the opcode, and possibly the operand).
- Length and then copying a number of instructions to be replaced by the starting position of the objective function according to the identified length, and generating a corresponding Code.
- the upgrade management module can automatically disassemble and parse the replaced instruction; for the fine instruction system, the replaced instruction can be directly copied.
- the jump instruction is also included in the instruction, and when the corresponding equivalent code is generated, it is necessary to first determine that the jump instruction is absolute.
- the jump instruction (the target address pointed to by it is an absolute address) or the relative jump instruction (the target address pointed to by it is an absolute address)
- the corresponding equivalent code can be directly generated; if it is a relative jump instruction,
- After generating the corresponding equivalent code it is necessary to modify the target address pointed to by the jump instruction according to the position in the equivalent code, so that when the equivalent code is executed, the jump instruction can still be The modified target address, jump to the location where you should jump.
- the upgrade management module may further add a jump instruction at the end of the equivalent code according to specific needs, and the destination address of the jump instruction is set to be replaced by the jump instruction at the start position of the target function in the Hypervisor component.
- the next instruction of the instruction causes a thread to jump to the next instruction position and continue execution after executing the equivalent code. It can be understood that if the end of the equivalent code is originally a jump instruction or other interrupt instruction, it is not necessary to add a jump instruction at the end of the equivalent code.
- the upgrade management module may call the hypervisor interface of the hypervisor to replace the instruction at the start position of the target function with the interrupt.
- Point instruction D1 (wherein the interrupt breakpoint instruction D1 is written in atomic write mode).
- the thread executes the interrupt breakpoint instruction D1, it triggers a breakpoint exception and starts. Breakpoint exception handler.
- the breakpoint exception handling program of the DomainO system can be extended.
- the extended breakpoint processing program can determine the cause of the breakpoint abnormality, including determining whether the breakpoint abnormality is due to the upgrade. produce.
- the Hypervisor will not be preempted, so there will be no multiple thread stacks in the Hypervisor, so just consider whether the stack of each CPU falls on the target function under the multi-core architecture.
- the domain 0 is bound to execute on a certain CPU. Since Domain 0 directly calls the hypervisor, if Domain 0 is bound to execute on a certain CPU, the corresponding Hypervisor must be bound accordingly. Executing on the CPU, this is beneficial to check whether the CPU is executing the target function in the Hypervisor component, because the upgrade management module acquires the call stack of the CPU corresponding to the Hypervisor by calling the hypervisor interface of the hypervisor, and checks the CPU. The current function execution to determine whether there is a CPU executing the target function in the Hypervisor component. If the domain 0 is bound to a CPU, the upgrade management module only needs to acquire one CPU (the Hypervisor runs). The call stack of the CPU, based on the call stack of a CPU, the current function execution of the CPU, to determine whether the CPU is executing the target function in the Hypervisor component.
- the breakpoint exception handler can determine the breakpoint. Whether the abnormality is caused by the upgrade; if not, the breakpoint processing is performed according to the processing program corresponding to the breakpoint abnormality; if it is determined that the breakpoint abnormality is caused by the interrupt breakpoint instruction D1 (that is, due to the upgrade, and The breakpoint exception is for the upgrade function corresponding to the target function in the Hypervisor component, and the upgrade management module checks that no CPU is executing the target function. In the actual application, the upgrade management module can call the hypervisor of the hypervisor to obtain the Hypervisor.
- the calling stack of the CPU checks (or can also check) the current function execution of each CPU one by one, and further checks whether the CPU is executing the above objective function, and the upgrade management module can call Hypervisor's super call interface, replacing the breakpoint command D1 at the beginning of the target function
- the jump instruction points to the upgrade function corresponding to the target function
- the return address of the breakpoint exception to the start address of the upgrade function, and the breakpoint will be returned after the exception is returned.
- the upgrade function is lined up. Subsequently, when a thread executes the above-mentioned destination function again, it will jump to the upgrade function corresponding to the target function according to the jump instruction.
- the upgrade management module checks that the CPU is executing the target function, the upgrade management module calls the hypervisor interface of the hypervisor, replaces the interrupt breakpoint instruction D1 at the start position of the target function with a jump instruction, and replaces the The return address of the point exception is set to the start address of the equivalent code of the above objective function, and the equivalent code is executed after the breakpoint exception is returned. Subsequently, when the start position of the above objective function is executed again, it jumps to the upgrade function corresponding to the target function according to the jump instruction.
- the upgrade management module can create a delayed upgrade kernel thread, and then upgrade the target function after the CPU executes the target function.
- the interrupt breakpoint instruction INT3 opcode is OxCC (where the interrupt breakpoint instruction INT3 only has the opcode, There is no operand)
- the upgrade management module can write the interrupt breakpoint command D2 at the beginning of all target functions that need to be restored (in a similar manner to the valid upgrade function). Among them, the interrupt breakpoint instruction is written in atomic write mode 2).
- the breakpoint exception handler can determine whether the breakpoint exception is caused by the upgrade (ie, whether it is caused by the interrupt breakpoint instruction D2); if not, according to the breakpoint exception corresponding to the processing The program performs breakpoint processing.
- the upgrade management module checks that no CPU is executing the target function corresponding to the Hypervisor component.
- the upgrade function the upgrade management module calls the hypervisor interface of the hypervisor, and restores the instruction that the start position of the target function is covered by the jump instruction (may be Resume the instruction covered by the jump instruction after the interrupt breakpoint instruction D2, wait for all other parts of the target function to be restored, and finally replace all interrupt breakpoint instructions with the overwritten target function instruction), and then break the breakpoint
- the exception return address is set to the start address of the equivalent code of the target function; the equivalent code will be executed after the breakpoint exception is returned. Subsequently, when the start position to the above objective function is executed again, the upgrade function corresponding to the objective function is not executed, but the destination function is executed.
- the breakpoint exception handler determines that the breakpoint exception is caused by the interrupt breakpoint instruction D2 (ie, due to an upgrade, and the breakpoint exception is to restore the upgrade); And checking that the CPU is executing the upgrade function corresponding to the target function in the Hypervisor component, the upgrade management module calls the hypervisor interface of the hypervisor, and restores the instruction that the start position of the target function is covered by the jump instruction, and the instruction is broken.
- the return address of the point exception is set to the start address of the above upgrade function; the upgrade function will be executed after the breakpoint exception is returned.
- the upgrade management module can create a delayed restore kernel thread, and then restore the target function after the CPU executes the upgrade function corresponding to the target function.
- the hypervisor of this embodiment provides a super-call interface
- the upgrade management module deployed in the Domain 0 kernel calls the super-call interface of the hyper-kernel hypervisor, and loads the upgrade file for upgrading the hypervisor component to the hypervisor.
- the address space, and the hypervisor interface of the hypervisor is called to validate the upgraded Hypervisor component of the upgrade file. Since the hypervisor is provided with the super-call interface to upgrade the Hypervisor component online, the hot migration service is not required to other devices, and the upgrade is relatively reduced.
- the device resources occupied by the Hypervisor component are also beneficial to reduce the impact of upgrading the Hypervisor component on the upper layer service.
- the upgrade mechanism does not need to interrupt the service, and the real-time performance is relatively high, and the upgrade time is relatively short.
- a computer system provided by an embodiment of the present invention may include: a central processing unit CPU 510, a memory 520, and a memory 520 for storing program codes;
- the virtual machine kernel is used to call the Hypervisor's super-call interface, and the upgrade file for upgrading the target function in the Hypervisor component is loaded into the address space of the above Hypervisor.
- the upgrade file includes an upgrade function corresponding to the above objective function; Calling the interface, replacing the start position instruction of the target function in the Hypervisor component that needs to be upgraded with the first interrupt breakpoint instruction; the breakpoint is the hypervisor call of the hypervisor when the virtual machine kernel is caused by the first interrupt breakpoint instruction described above. And replacing the first interrupt breakpoint instruction with the jump instruction required for the upgrade to upgrade the target function in the Hypervisor component to be upgraded to the upgrade function, where the jump instruction points to the upgrade file in the address space Upgrade function.
- the virtual machine kernel can invoke the hypervisor's super-call interface to allocate an upgrade memory area in the address space of the hypervisor; invoke the Hypervisor's super-call interface to load the upgrade file for upgrading the hypervisor component to the hypervisor.
- the upgrade memory area in the address space can be invoked
- the hypervisor interface of the hypervisor is called to allocate an upgrade memory area in the address space of the hypervisor; determine whether the current upgrade memory area of the hypervisor address space has enough free space to load the above upgrade file; if enough, the hypervisor super is called. Calling the interface, loading the upgrade file for upgrading the Hypervisor component into the upgrade memory area in the address space of the above Hypervisor; if not, calling the Hypervisor's super call interface, and then dividing an upgrade memory area in the Hypervisor address space, so that the Hypervisor There is enough upgrade memory area in the address space to load the above upgrade file.
- the virtual machine kernel can also obtain the size of the upgrade file by other means (for example, directly counting the number of bytes, etc.), and according to the obtained size of the upgrade file, determine whether the current upgrade memory area of the Hypervisor address space is sufficient. The remaining space to load the upgrade file. If the upgrade memory area of the Hypervisor address space is large enough, the virtual machine kernel can also default to the Hypervisor address space. The current upgrade memory area has enough free space to load the upgrade file. Therefore, it is not necessary to upgrade the memory area beforehand. The remaining space is used to load the upgrade file for judgment, but can be loaded directly.
- the virtual machine kernel can also call the Hypervisor's super-call interface to allocate part of the upgraded memory area in the Hypervisor's address space to other programs.
- the virtual machine kernel compares the preferred load address recorded in the upgrade file used to upgrade the Hypervisor component, and whether the start address of the upgrade memory area to be loaded into the address space of the hypervisor is the same; if the same, it will be used for the upgrade
- the upgrade file of the Hypervisor component is copied to the corresponding upgrade memory area in the address space of the Hypervisor; if different, the symbol corresponding to the above objective function in the upgrade file for upgrading the Hypervisor component is relocated to determine the upgrade file.
- the target function corresponding to the symbol will be loaded into the address in the upgrade memory area, and the above relocated upgrade file will be copied to the corresponding upgrade memory area in the address space of the Hypervisor.
- the virtual machine kernel is specifically configured to: "call the Hypervisor's super-call interface, replace the first interrupt breakpoint instruction with the jump instruction required for the upgrade to move the target function in the Hypervisor component that needs to be upgraded. Upgrade to the above upgrade function":
- the hypervisor interface of the Hypervisor is called, the interrupt breakpoint instruction at the start position of the target function is replaced with a jump instruction, and the return address of the breakpoint exception is set to the start address of the upgrade function;
- the hypervisor interface of the hypervisor is called to generate an equivalent code of the instruction in the target function to be overwritten by the jump instruction; the hypervisor interface of the hypervisor is called, and the interrupt breakpoint instruction at the start position of the target function is replaced with the jump Rotate the instruction and set the return address of the breakpoint exception to the starting address of the above equivalent code.
- the virtual machine kernel is further used to: when the upgrade is required to be upgraded, the virtual machine kernel calls the hypervisor interface of the hypervisor, and replaces the instruction of the start position of the target function with the second interrupt breakpoint instruction; the second interrupt breakpoint instruction When caused, the virtual machine kernel calls the hypervisor interface of the hypervisor to restore the upgrade function upgraded by the above objective function in the above hypervisor component to the above objective function.
- the second interrupt breakpoint instruction may be written at the beginning of all the target functions that need to be restored, in a similar manner to the valid upgrade function. (Where, the interrupt breakpoint instruction is written in atomic write mode). when When the thread executes the second interrupt breakpoint instruction, a breakpoint exception is triggered, and the breakpoint exception handler is started.
- the interrupt handler determines whether the breakpoint exception is caused by the second interrupt breakpoint instruction (ie, determines whether the breakpoint exception is caused by the upgrade); if not, according to the breakpoint exception
- the processing program performs breakpoint processing; if the interrupt handler determines that the breakpoint exception is caused by the second interrupt breakpoint instruction (ie, it is determined that the breakpoint exception is generated due to the upgrade, and the breakpoint exception is to restore the upgrade), the virtual The kernel can call the super call interface to check whether the CPU of the CPU is executing the upgrade function corresponding to the target function in the above Hypervisor component.
- the virtual machine is virtual.
- the kernel may call the hypervisor interface of the hypervisor, restore the instruction whose position is covered by the jump instruction, and set the return address of the breakpoint exception to the start address of the equivalent code of the target function; The equivalent code will be executed after the breakpoint exception returns. Subsequently, when a thread executes the start position of the above objective function again, the upgrade function corresponding to the target function is not executed, but the above objective function is executed.
- the interrupt handler determines that the breakpoint exception is caused by the second interrupt breakpoint instruction (ie, due to an upgrade, and the breakpoint exception is to restore the upgrade); and the virtual machine kernel checks that the CPU is executing the hypervisor
- the upgrade function corresponding to the target function in the component the virtual machine kernel calls the hypervisor interface of the hypervisor, restores the instruction that the start position of the target function is covered by the jump instruction, and sets the return address of the breakpoint exception to the above The starting address of the upgrade function; the upgrade function will be executed after the breakpoint exception is returned.
- the virtual machine kernel can create a delayed restore kernel thread, and then restore the target function after the CPU executes the upgrade function corresponding to the target function.
- the embodiment of the present invention provides a super-call interface through the hypervisor, and the virtual machine kernel calls the super-call interface of the hyper-kernel hypervisor, loads the upgrade file for upgrading the hypervisor component into the address space of the hypervisor, and invokes the hypervisor's super-call.
- the interface is used to validate the upgraded Hypervisor component of the upgrade file. Because the Hypervisor provides a hyper-call interface to upgrade the Hypervisor component online, it does not require hot-migration services to other devices. The equipment resources required to upgrade the Hypervisor components are also reduced, and the impact of upgrading the Hypervisor components on the upper layer services is also reduced.
- the upgrade mechanism does not need to interrupt the service, and the real-time performance is relatively high, and the upgrade time is relatively short.
- the program may be stored in a computer readable storage medium, and the storage medium may include: Read-only memory, random access memory, disk or optical disk, etc.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Stored Programmes (AREA)
Abstract
超级内核组件的升级方法和计算机系统。其中,一种超级内核组件的升级方法,包括:虚拟机内核调用超级内核的超级调用接口,将用于升级超级内核组件中的目标函数的升级文件加载到超级内核的地址空间;虚拟机内核调用超级内核的超级调用接口,将需要升级目标函数的起始位置指令替换为中断断点指令;当虚拟机内核中的中断处理程序判断出引起断点异常的断点是由该中断断点指令引起时,虚拟机内核调用超级内核的超级调用接口,替换第一中断断点指令为升级所需的跳转指令以将需要升级的超级内核组件中的目标函数升级为升级函数。本发明实施例的技术方案,能够减少升级超级内核组件需占用的设备资源,并减少升级对业务的影响。
Description
超级内核组件的升级方法和计算机系统
本申请要求于 2011 年 01 月 30 日提交中国专利局、 申请号为 201110033485.0、 发明名称为 "超级内核组件的升级方法和计算机系统" 的中 国专利申请的优先权, 其全部内容通过引用结合在本申请中。 技术领域
本发明涉及计算机技术领域,具体涉及超级内核 Hypervisor组件的升级方 法和计算机系统。 背景技术
目前通过虚拟机软件,例如可以在一台物理计算机上模拟出一台或多台虚 拟的计算机, 而这些虚拟机就像真正的计算机那样进行工作,虚拟机上可安装 操作系统、 安装应用程序、访问网络资源等等。 对于在虚拟机中运行的应用程 序而言, 虚拟机就像是在真正的计算机中进行工作。
在虚拟化系统中,在运行一段时间后, 若发现某些功能存在不足或存在缺 陷, 可以替换某些系统组件并重新启动系统或服务来增强、 修复系统功能, 以 达到系统安全、 稳定的目的。 但是, 在电信产品领域中, 对于产品的可靠性通 常要求非常高,通过替换组件后再重启系统的方法, 已经不能满足电信级虚拟 化产品的可靠性要求。
现有技术中, 若需要升级通信设备 A的超级内核 (Hypervisor )组件, 通 常是先通过热迁移技术将通信设备 A上的业务迁移到另一通信设备 B , 然后停 止通信设备 A的业务, 升级通信设备 A的 Hypervisor的待升级组件后, 重启通信 设备 A, 再将通信设备 B上执行的业务再迁移到通信设备 。
现有升级 Hypervisor组件的方式需要占用较多设备资源,并且业务热迁移 过程也可能影响到业务的流畅运转。 发明内容
本发明实施例提供超级内核 Hypervisor组件的升级方法和计算机系统, 以 减少升级 Hypervisor组件需占用的设备资源, 并减少升级对业务的影响。
为解决上述技术问题, 本发明实施例提供以下技术方案:
一种超级内核 Hypervisor组件的升级方法, 包括:
虚拟机内核调用 Hypervisor的超级调用接口,将用于升级 Hypervisor组件 中的目标函数的升级文件加载到所述 Hypervisor的地址空间,所述升级文件包 括与所述目标函数对应的升级函数;
虚拟机内核调用 Hypervisor 的超级调用接口, 将需要升级的 Hypervisor 组件中的目标函数的起始位置指令替换为第一中断断点指令;
当虚拟机内核中的中断处理程序判断出引起断点异常的断点是由所述第 一中断断点指令引起时,虚拟机内核调用 Hypervisor的超级调用接口,替换所 述第一中断断点指令为升级所需的跳转指令以将所述需要升级的 Hypervisor 组件中的目标函数升级为所述升级函数,其中所述跳转指令指向所述地址空间 中的升级文件中的升级函数。
一种计算机系统, 包括: 中央处理器 CPU, 存储器, 所述存储器用于存 程序代码对应的程序, 其中, 所述 CPU 中运行有虚拟机内核以及超级内核 Hypervisor:
所述虚拟机内核用于调用 Hypervisor 的超级调用接口, 将用于升级
Hypervisor组件中的目标函数的升级文件加载到所述 Hypervisor的地址空间, 所述升级文件包括与所述目标函数对应的升级函数;调用 Hypervisor的超级调 用接口,将需要升级的 Hypervisor组件中的目标函数的起始位置指令替换为第 一中断断点指令;
所述虚拟机内核还用于,当所述虚拟机内核中的中断处理程序判断出引起 断点异常的断点是由所述第一中断断点指令引起时,调用 Hypervisor的超级调 用接口,替换所述第一中断断点指令为升级所需的跳转指令以将所述需要升级 的 Hypervisor组件中的目标函数升级为所述升级函数,其中所述跳转指令指向 所述地址空间中的升级文件中的升级函数。
由上可见, 本发明实施例的 Hypervisor提供超级调用接口, 而虚拟机内核 则调用超级内核 Hypervisor的超级调用接口,将用于升级 Hypervisor组件的升 级文件加载到 Hypervisor的地址空间,调用 Hypervisor的超级调用接口,将需 要升级的 Hypervisor组件中的目标函数的起始位置指令替换为中断断点指令; 当发现中断处理程序判断出引起断点异常的断点是由该中断断点指令引起时,
调用 Hypervisor的超级调用接口,将需要升级的 Hypervisor组件中的目标函数, 升级为升级文件中与该目标函数对应的升级函数,由于是利用 Hypervisor提供 超级调用接口对 Hypervisor组件进行在线升级,故而不需要热迁移业务到其它 设备,相对减少了升级 Hypervisor组件需占用的设备资源, 同时也有利于减少 了升级 Hypervisor组件对上层业务的影响; 并且该升级机制无需中断业务, 且 实时性较高, 升级时间也相对较短。 附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所 需要使用的附图作筒单地介绍,显而易见地, 下面描述中的附图仅仅是本发明 的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提 下, 还可以根据这些附图获得其他的附图。
图 1是本发明实施例提供的一种虚拟系统运行架构示意图;
图 2是本发明实施例提供的一种 Hypervisor组件的升级方法流程示意图; 图 3-a是本发明实施例提供的一种虚拟系统模块架构示意图;
图 3-b是本发明实施例提供的一种升级内存区划分示意图;
图 4是本发明实施例提供的一种 Hypervisor组件的升级方法流程示意图; 图 5是本发明实施例提供的一种计算机系统示意图。 具体实施方式
本发明实施例提供超级内核 Hypervisor组件的升级方法和计算机系统。 为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施 例中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描述, 显然, 所 描述的实施例仅仅是本发明一部分的实施例, 而不是全部的实施例。基于本发 明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所 有其他实施例, 都应当属于本发明保护的范围。
为便于理解, 下面先筒单介绍一种虚拟系统运行架构。
参见图 1 , 一个虚拟化环境可包括如下相互配合的元素:
Hypervisor、 Domain O^Domain U等。
其中, Hypervisor是一个介于硬件和虚拟机操作系统之间的软件层, 主要
负责在各虚拟机之间进行中央处理器( CPU, central processing unit )调度和内 存分配。 Hypervisor不仅抽象出硬件层, 同时支撑着各虚拟机的运行, 因为各 虚拟机共享同一个硬件处理环境。 虚拟化系统中的 Hypervisor直接跟硬件打交 道, Hypervisor运行于 CPU RingO级(即对硬件具有最高访问权限)。
Domain U为虚拟机, Domain 0可看成是其它虚拟机的管理节点, Domain 0 通常是唯一运行在 Hypervisor之上的虚拟机,调度 Hypervisor, 并拥有访问物理 I/O资源的权限, 同时和虚拟系统上运行的其它虚拟机进行交互。
本发明实施例的应用场景, 主要是针对虚拟化环境下对 Hypervisor组件进 行在线升级, 下面通过具体实施例进行详细介绍。 本发明实施例提供的一种超级内核 Hypervisor组件的升级方法, 参见图 2, 具体包括如下步骤:
参见图 2, 具体步骤可以包括:
210、 虚拟机内核调用 Hypervisor的超级调用接口, 将用于升级 Hypervisor 组件中的目标函数的升级文件加载到上述 Hypervisor的地址空间, 上述升级文 件包括与上述目标函数对应的升级函数;
其中, 上述目标函数为要被升级的函数(旧函数), 目标函数升级后, 程 序运行的新函数为升级文件中的升级函数(新函数), 即将目标函数升级为升 级函数。
需要说明的是, 本实施例中的虚拟机内核为运行在 Hypervisor之上的虚拟 机(例如 Domain 0或其它类似功能的虚拟机)的内核(该内核中例如可设置有 升级管理模块), 同时, 上述超级内核 Hypervisor提供超级调用接口, 虚拟机内 核可以通过 Hypervisor提供的超级调用接口来访问 Hypervisor。鉴于在虚拟化环 境下, 用户空间 (如应用程序)是无法直接访问 Hypervisor的, 本发明实施例 中的虚拟机内核可代理用户空间访问 Hypervisor,以执行 Hypervisor组件升级等 操作。
其中, 本发明实施例中 "调用 Hypervisor的超级调用接口, 将用于升级 Hypervisor组件的升级文件加载到上述 Hypervisor的地址空间 " 具体可包括: 调用 Hypervisor的超级调用接口,在 Hypervisor的地址空间划分出升级内存
区; 调用 Hypervisor的超级调用接口,将用于升级 Hypervisor组件的升级文件加 载到该 Hypervisor的地址空间中的升级内存区。
更具体的, 本发明实施例还包括:
调用 Hypervisor的超级调用接口,在 Hypervisor的地址空间划分出升级内存 区;
判断 Hypervisor地址空间当前的升级内存区是否有足够的剩余空间加载上 述升级文件;
若够, 则调用 Hypervisor的超级调用接口,将用于升级 Hypervisor组件的升 级文件加载到上述 Hypervisor的地址空间中的升级内存区;
若不够, 则调用 Hypervisor的超级调用接口, 在 Hypervisor地址空间再划分 出一块升级内存区, 使得 Hypervisor的地址空间中有足够的升级内存区来加载 上述升级文件。
当然, 虚拟机内核亦可通过其它方式(例如可直接统计字节数等), 获得 该升级文件的大小, 并根据获得的该升级文件的大小, 判断 Hypervisor地址空 间当前的升级内存区是否有足够的剩余空间来加载该升级文件。 若 Hypervisor 地址空间的升级内存区足够大, 则虚拟机内核亦可默认为 Hypervisor地址空间 当前的升级内存区有足够的剩余空间来加载该升级文件,故而事先亦可不对升 级内存区是否有足够的剩余空间来加载该升级文件进行判断,而可直接进行加 载。
当然, 若升级内存区的剩余空间过多(例如升级内存区中的部分空间始终 未用), 升级管理模块也可调用 Hypervisor的超级调用接口, 将 Hypervisor的地 址空间中的升级内存区的部分空间划分给其它程序使用。
其中, "将用于升级 Hypervisor组件的升级文件加载到上述 Hypervisor的地 址空间中的升级内存区" 具体可包括:
比较用于升级 Hypervisor组件的升级文件中记录的首选加载地址, 和其将 要加载到 Hypervisor的地址空间的升级内存区的起始地址是否相同;
若相同,则将用于升级 Hypervisor组件的升级文件拷贝到 Hypervisor的地址 空间中的对应升级内存区; 若不同, 则对用于升级 Hypervisor组件的升级文件 中与上述目标函数对应的符号进行重定位,以确定上述升级文件中的符号对应
的目标函数将加载到升级内存区中的地址,将上述重定位后的升级文件拷贝到 Hypervisor的地址空间中的对应升级内存区。
220、 虚拟机内核调用 Hypervisor的超级调用接口, 将需升级的 Hypervisor 组件中的目标函数的起始位置指令替换为第一中断断点指令;
其中, 虚拟机内核通过将需要升级的 Hypervisor组件中的目标函数的起始 位置指令替换为第一中断断点指令, 来设置一个升级触发点,后续便可在第一 中断断点指令引起系统断点异常时, 触发执行 Hypervisor组件中的该目标函数 的升级。
230、 当虚拟机内核中的中断处理程序判断出引起断点异常的断点是由上 述第一中断断点指令引起时, 虚拟机内核调用 Hypervisor的超级调用接口, 替 换上述第一中断断点指令为升级所需的跳转指令以将上述需要升级的 Hypervisor组件中的目标函数升级为上述升级函数, 其中, 上述跳转指令指向 上述地址空间中的升级文件中的升级函数。
在一种应用场景下, 例如虚拟机内核可以先调用 Hypervisor的超级调用接 口, 生成需要升级的 Hypervisor组件中的目标函数中, 将要被跳转( JMP )指 令所覆盖的指令的等价代码, 该跳转指令指向加载到 Hypervisor地址空间的上 述升级文件中与该目标函数对应的升级函数(即, 该跳转指令为指向该目标函 数对应的升级函数的跳转指令); 而后再调用 Hypervisor的超级调用接口,将上 述目标函数的起始位置的指令替换为第一中断断点指令;
当系统产生断点异常时(该断点异常可能是由中断断点指令产生,也可能 是其它原因而产生), 中断处理程序可判断引起断点异常的断点是否是由第一 中断断点指令引起(即判断该断点异常是否因升级而产生); 若否, 则按照该 断点异常对应的处理程序进行断点处理;若判断出该断点异常是由第一中断断 点指令引起(即断点异常因升级而产生, 且该断点异常是为了生效 Hypervisor 组件中的目标函数对应的升级函数 ),则虚拟机内核可调用 Hypervisor的超级调 用接口, 检查是否有 CPU在执行该目标函数(在实际应用中, 虚拟机内核可调 用 Hypervisor的超级调用接口获取 Hypervisor对应的 CPU的调用栈,根据获取的 该调用栈, 检查各 CPU当前的函数执行情况, 进而可检查到有没有 CPU在执行 上述目标函数), 若检查到没有 CPU在执行该目标函数, 则虚拟机内核可以调
用 Hypervisor的超级调用接口, 将该目标函数的起始位置的中断断点指令替换 为跳转指令(该跳转指令指向该目标函数对应的升级函数), 并将该断点异常 的返回地址设置为上述升级函数的起始地址,断点异常返回后将执行该升级函 数。后续, 当某线程再次执行到上述目的函数的起始位置时,会根据跳转指令, 跳转到该目标函数对应的升级函数执行。
此外, 若中断处理程序判断出该断点异常是由第一中断断点指令引起(即 因升级而产生, 且该断点异常是为了生效 Hypervisor组件中的目标函数对应的 升级函数), 并且虚拟机内核检查到有 CPU正在执行该目标函数, 则虚拟机内 核可调用 Hypervisor的超级调用接口, 将该目标函数的起始位置的中断断点指 令替换为跳转指令,并将该断点异常的返回地址设置为上述目标函数的等价代 码的起始地址, 断点异常返回后将执行该等价代码。 后续, 当某线程再次执行 到上述目的函数的起始位置时,会根据跳转指令,跳转到该目标函数对应的升 级函数执行。 或者, 虚拟机内核可创建一个延迟升级内核线程, 当 CPU执行完 目标函数, 再升级该目标函数。
在实际应用中, 虚拟机内核在生成 Hypervisor组件中的目标函数中, 将要 被跳转指令所覆盖的指令的等价代码时,若将被跳转指令覆盖的目标函数的起 始位置的若干条指令的长度是已知(例如是固定长度的某些指令,将被替换指 令的长度可能大于或等于跳转指令的长度, 例如跳转指令为 12字节, 而将被其 覆盖的目标函数的起始位置若干条指令的长度为 15字节 ), 则虚拟机内核可根 据跳转指令的长度,拷贝目标函数的起始位置将被其替换的若干条指令, 并生 成对应的等价代码;若将被跳转指令替换的目标函数的起始位置若干条指令的 长度是未知的, 则虚拟机内核可以根据指令码表(指令码表中记录了各种指令 的操作码和操作数)和需要升级的 Hypervisor组件中的目标函数的起始位置将 要被跳转指令所要替换的字节数 (即跳转指令的长度), 逐条识别出该 Hypervisor组件中的目标函数的起始位置将被跳转指令替换的指令(包括操作 码, 还可能包括操作数)的长度, 而后再根据该识别出的长度拷贝目标函数的 起始位置将被其替换的若干条指令, 并生成对应的等价代码。
需要说明的是, 上述生效升级文件所对应升级的 Hypervisor组件的方式仅 为举例说明, 基于该实现思想, 还可以得到其它一种或多种实施方式, 此处不
再一一赞述。
此外, 若需要还原升级(可能是用户空间指示还原升级), 可按照与生效 升级函数的类似方式,在所有需要还原的目标函数的开始位置写入中断断点指 令(其中, 以原子写入方式写入中断断点指令), 可称第二中断断点指令。 当 线程执行到该第二中断断点指令时,触发产生断点异常, 启动断点异常处理程 序。
当系统产生断点异常时,中断处理程序判断该断点异常是否由第二中断断 点指令引起(即判断该断点异常是否因升级而产生); 若否, 则按照该断点异 常对应的处理程序进行断点处理;若中断处理程序判断出该断点异常是第二中 断断点指令引起(即判断出该断点异常因升级而产生,且该断点异常是为了还 原升级 ), 虚拟机内核可超级调用接口检查是否有中央处理器 CPU正在执行上 述 Hypervisor组件中的目标函数对应的升级函数, 若检查到没有中央处理器 CPU正在执行 Hypervisor组件中的目标函数对应的升级函数, 则虚拟机内核可 调用 Hypervisor的超级调用接口, 还原该目标函数的起始位置被跳转指令所覆 盖的指令,并将该断点异常的返回地址设置为该目标函数的等价代码的起始地 址; 断点异常返回后将执行该等价代码。 后续, 当某线程再次执行到上述目的 函数的起始位置时, 就不会执行该目标函数对应的升级函数了, 而是执行上述 目的函数。
此外, 若中断处理程序判断出该断点异常是由第二中断断点指令引起(即 因升级而产生,且该断点异常是为了还原升级);并且虚拟机内核检查到有 CPU 正在执行 Hypervisor组件中的目标函数对应的升级函数, 则虚拟机内核调用 Hypervisor的超级调用接口, 还原该目标函数的起始位置被跳转指令所覆盖的 指令, 并将该断点异常的返回地址设置为上述升级函数的起始地址; 断点异常 返回后将执行该升级函数。后续, 当某个线程再次执行到上述目的函数的起始 位置时, 就不会执行该目标函数对应的升级函数了, 而是执行该目的函数。 或 者, 虚拟机内核可创建一个延迟还原内核线程, 当 CPU执行完目标函数对应的 升级函数后, 再还原该目标函数。
可以理解的是,本实施例的虚拟机内核中可能包括多个用于协同升级的模 块, 为了说明方便, 而本发明实施例中一般统一使用虚拟机内核来描述相应的
步骤的执行, 而不使用其各模块来描述相应的步骤, 例如虚拟机内核中可设置 一升级管理模块, 由该升级管理模块负责代理访问 Hypervisor, 进行 Hypervisor 组件升级管理, 当该运行在 Hypervisor之上的虚拟机的内核启动后, 可选择加 载该升级代理模块,而虚拟机内核的各个功能模块执行的步骤当然也都可以描 述由虚拟机内核执行的步骤。
由上可见, 本实施例的 Hypervisor提供超级调用接口, 而虚拟机内核则调 用超级内核 Hypervisor的超级调用接口,将用于升级 Hypervisor组件的升级文件 加载到 Hypervisor的地址空间,调用 Hypervisor的超级调用接口,将需要升级的 Hypervisor组件中的目标函数的起始位置指令替换为中断断点指令; 当发现中 断处理程序判断出引起断点异常的断点是由该中断断点指令引起时, 调用 Hypervisor的超级调用接口,将需要升级的 Hypervisor组件中的目标函数,升级 为升级文件中与该目标函数对应的升级函数, 由于是利用 Hypervisor提供超级 调用接口对 Hypervisor组件进行在线升级,故而不需要热迁移业务到其它设备, 相对减少了升级 Hypervisor组件需占用的设备资源, 同时也有利于减少了升级 Hypervisor组件对上层业务的影响; 并且, 该升级机制无需中断业务, 且实时 性较高, 升级时间也相对较短。 为便于更好的理解本发明技术方案,下面通过举例场景对本发明实施例的 上述技术方案进行详细描述。
其中, 本实施例中主要以在 Domain O的内核中部署升级管理模块, 升级管 理模块部署位置示意图可如图 3-a所示, 部署在 Domain 0的内核中的升级管理 模块能够代理访问 Hypervisor, 包括进行 Hypervisor组件升级管理等。
对于在其它虚拟机内核中部署升级管理模块的场景可类推。
参见图 4, 具体步骤可以包括:
401、 用户空间的应用程序, 向部署在 Domain 0的内核中的升级管理模块 发送 Hypervisor组件升级指令;
当 Domain O的内核启动后, 可选择加载该升级管理模块。 本实施例中的超 级内核 Hypervisor提供超级调用接口, 部署在 Domain 0的内核中的升级管理模 块可以通过 Hypervisor提供的超级调用接口来访问 Hypervisor。鉴于在虚拟化环
境下,用户空间(如应用程序 )是无法直接访问 Hypervisor的,而部署在 Domain 0的内核中的升级管理模块可代理用户空间访问 Hypervisor, 以执行 Hypervisor 组件升级等操作。
在一种应用场景下, Domain 0或其它虚拟机的用户空间的应用程序可调用 系统调用 (Syscall )接口, 通过 "升级设备文件", 向部署在 Domain 0的内核 中的升级管理模块发送 Hypervisor组件升级指示, 指示升级管理模块加载用于 升级 Hypervisor组件的升级文件, 升级 Hypervisor组件。
402、部署在 Domain 0的内核的升级管理模块调用超级内核 Hypervisor的超 级调用接口, 将用于升级 Hypervisor组件的升级文件 (为便于描述, 可将用于 升级 Hypervisor组件的升级文件筒称为目标 Hypervisor组件升级文件 )加载到 Hypervisor的地址空间。
在一种应用场景下, 升级管理模块例如可调用超级内核 Hypervisor的超级 调用接口,直接将用于升级 Hypervisor组件的升级文件加载到 Hypervisor的地址 空间; 或者, 为筒化升级管理的复杂度, 升级管理模块也可先调用 Hypervisor 的超级调用接口, 在 Hypervisor的地址空间划分出升级内存区 (升级内存区可 以专用于緩存升级相关数据, 这样可便于升级管理, 划分出的升级内存区可图 3-b所示); 再调用 Hypervisor的超级调用接口, 将用于升级 Hypervisor组件的升 级文件加载到 Hypervisor的地址空间的升级内存区。 其中, 升级内存区的空间 的划分大小可根据具体需要来具体设定, 例如可在 Hypervisor的地址空间划分 出 50MB、 100MB或其它大小的空间作为升级内存区, 当然, 若升级内存区的 剩余空间不足, 升级管理模块还可调用 Hypervisor的超级调用接口, 在 Hypervisor的地址空间再划分出一块升级内存区; 当然, 若升级内存区的剩余 空间过多(例如其中的部分空间始终未用 ),升级管理模块也可调用 Hypervisor 的超级调用接口, 将 Hypervisor的地址空间中的升级内存区的部分空间划分给 其它程序使用。
其中, 制作用于升级 Hypervisor组件的升级文件的方式可以包括: 将修改 之后的 Hypervisor组件源代码 (升级源代码),在原编译虚拟化映像的编译环境 上编译, 获得目标 Hypervisor组件升级文件; 将编译获得的目标 Hypervisor组件 升级文件连接成能够被加载运行的目标 Hypervisor组件升级文件; 进一步的,
还可将目标该 Hypervisor升级文件中的所有符号的重定位信息转换成偏移重定 位信息, 并保存到目标 Hypervisor升级文件中。
进一步的,还可以生成下一次制作升级文件使用的绝对地址符号文件和相 对地址符号文件。其中, 绝对地址符号文件可记录下一次制作的升级文件的首 选加载地址(内存中的绝对地址), 相对地址符号文件可记录, 下一次制作的 升级文件的首选加载地址, 与此前最早(或者某次)加载到内存中的升级文件 的首选地址之间的差值。
在实际应用中, 若在制作升级文件时,将升级文件中所有符号的重定位信 息转换成偏移重定位信息, 并保存到该升级文件中, 则在此场景下, 升级管理 模块可在将用于升级 Hypervisor组件的升级文件加载到 Hypervisor的地址空间 的升级内存区之前,先根据该升级文件中包含的偏移重定位信息(根据偏移重 定位信息可大致确定该升级文件的大小 ) ,判断 Hypervisor地址空间当前的升级 内存区是否有足够的剩余空间来加载该升级文件; 若不够, 则升级管理模块可 调用 Hypervisor的超级调用接口,在 Hypervisor地址空间再划分出一块升级内存 区 (新划分出的升级内存区和原有的升级内存区可统一管理)。 当然, 升级管 理模块亦可通过其它方式(例如可直接统计字节数等), 获得该升级文件的大 小, 并根据获得的该升级文件的大小, 判断 Hypervisor地址空间当前的升级内 存区是否有足够的剩余空间来加载该升级文件。 当然, 若 Hypervisor地址空间 的升级内存区足够大, 则升级管理模块亦可默认为 Hypervisor地址空间当前的 升级内存区有足够的剩余空间来加载该升级文件,故而事先亦可不判断升级内 存区是否有足够的剩余空间来加载该升级文件, 而可直接进行加载。
在一种应用场景下, 升级管理模块将用于升级 Hypervisor组件的升级文件 加载到 Hypervisor的地址空间的升级内存区可包括: 比较用于升级 Hypervisor 组件的升级文件中记录的首选加载地址, 和其将要加载到 Hypervisor的地址空 间的升级内存区的起始地址是否相同; 若相同, 则升级管理模块可将该用于升 级 Hypervisor组件的升级文件拷贝到 Hypervisor的地址空间中的对应升级内存 区; 若不同, 则升级管理模块可对该用于升级 Hypervisor组件的升级文件中的 符号进行重定位, 以确定该升级文件中的符号将加载到内存中的地址,将该重 定位后的升级文件拷贝到 Hypervisor的地址空间中的对应升级内存区。 例如升
级管理模块可根据将要加载到 Hypervisor的地址空间的升级内存区的起始地 址, 和升级文件中记录的首选加载地址的差值, 对该用于升级 Hypervisor组件 的升级文件中的符号进行重定位, 获得可在新位置执行的升级文件代码。
举个具体的例子, 假设升级文件包括 ABC三个符号, 符号 A的偏移重定位 信息为 10, 符号 B的偏移重定位信息为 20, 符号 C的偏移重定位信息为 30; 若 升级文件中记录的首选加载地址为 0X000100, 而实际要加载到内存的首地址 为 0X000500, 虚拟机内核可先对该升级文件中的符号进行重定位, 确定该升 级文件中的符号将加载到内存中的地址, 通过重定位确定出 A的加载地址为 0X000510 ( 0X000500+10 ), B的加载地址为 0X000520 ( 0X000500+20 ); C的 加载地址为 0X000530 ( 0X000500+10 )。
403、升级管理模块调用 Hypervisor的超级调用接口, 生效上述升级文件所 对应升级的 Hypervisor组件。
其中, 生效升级文件所对应升级的 Hypervisor组件, 可看成是将 Hypervisor 即是用于升级目标函数的函数), 设置为可被执行的状态 (包括将需要升级的 Hypervisor组件中的目标函数, 升级为升级文件中与该目标函数对应的升级函 数等)。升级管理模块可通过多种方式, 生效升级文件所对应升级的 Hypervisor 组件。
在一种应用场景下, 例如升级管理模块可以先调用 Hypervisor的超级调用 接口, 生成需要升级的 Hypervisor组件中的目标函数中, 将要被跳转指令覆盖 的指令的等价代码, 其中, 该跳转指令指向该目标函数对应的升级函数(即该 跳转指令为指向该目标函数对应的升级函数的跳转指令)。
为便于理解, 下面举例一种生成等价代码的方法, 可包括:
升级管理模块为等价代码分配内存空间;
生成 Hypervisor组件中的目标函数中, 将要被跳转指令覆盖的指令的等价 代码, 并将该等价代码拷贝到为等价代码分配内存空间。
在实际应用中, 升级管理模块在生成 Hypervisor组件中的目标函数中, 将 被跳转指令覆盖的指令的等价代码时,若将被跳转指令覆盖的目标函数的起始 位置若干条指令的长度是已知(例如将被替换的是固定长度的某些指令,将被
替换指令的长度可能大于或等于跳转指令的长度, 例如, 跳转指令为 12字节, 而将要被其替换的目标函数的起始位置若干条指令的长度为 15字节;), 则升级 管理模块可根据跳转指令的长度,拷贝目标函数的起始位置将被其替换的若干 条指令, 并生成对应的等价代码; 若将要被跳转指令替换的目标函数的起始位 置若干条指令的长度是未知的, 则升级管理模块可以根据指令码表(指令码表 中记录了各种指令的操作码和操作数)和 Hypervisor组件中的目标函数的起始 位置将被跳转指令所要替换的字节数(即跳转指令的长度), 逐条识别出需要 升级的 Hypervisor组件中的目标函数的起始位置将要被跳转指令替换的指令 (包括操作码, 还可能包括操作数)的长度, 而后再根据该识别出的长度拷贝 目标函数的起始位置将被其替换的若干条指令, 并生成对应的等价代码。在一 种应用场景下,对于复杂指令系统,升级管理模块可自动反汇编解析被替换的 指令; 对于精筒指令系统, 可直接复制被替换的指令。
特别的, 若需升级的 Hypervisor组件中的目标函数的起始位置将被跳转指 令替换的指令中也包括跳转指令, 则生成对应的等价代码时, 需要先确定该跳 转指令是绝对跳转指令(其指向的目标地址为绝对地址)还是相对跳转指令(其 指向的目标地址为绝对地址), 若是绝对跳转指令, 可直接生成对应的等价代 码; 若是相对跳转指令, 则在生成对应的等价代码后, 则需要根据该跳转指令 在该等价代码中的位置,修改其所指向的目标地址,使得当执行该等价代码该 跳转指令时, 仍可根据修改后的目标地址, 跳转到原来应该跳转到的位置。
此外,升级管理模块还可以根据具体需要,在等价代码的末尾可再添加一 条跳转指令, 该跳转指令的目的地址设置为 Hypervisor组件中的目标函数的起 始位置被跳转指令替换的指令的下一条指令,使得某线程在执行完该等价代码 后, 跳转到该下一条指令位置继续执行。 可以理解的是, 若等价代码的末尾本 来就是一条跳转指令或其它中断指令,则可无需在该等价代码的末尾再添加一 条跳转指令。
在生成 Hypervisor组件中的目标函数中, 将被跳转指令所覆盖的指令的等 价代码后, 升级管理模块可调用 Hypervisor的超级调用接口, 将上述目标函数 的起始位置的指令替换为中断断点指令 D1 (其中, 以原子写入方式写入中断 断点指令 Dl )。 当线程执行到该中断断点指令 D1时, 触发产生断点异常, 启动
断点异常处理程序。
本实施例中, 可扩展 DomainO系统的断点异常处理程序, 当接收到断点信 号时,扩展后的断点处理程序可判断该断点异常发生的原因, 包括判断断点异 常是否因升级而产生。
在目前的虚拟化系统中, Hypervisor是不会被抢占的, 因此在 Hypervisor 中不会存在多个线程栈的情况, 因此只要考虑在多核架构下, 每个 CPU的栈是 否落在目标函数。
本实施例中考虑, 将 Domain 0绑定在某一 CPU上执行, 由于 Domain 0直接 调用 Hypervisor, 因此, 若将 Domain 0绑定在某一 CPU上执行, 则相应的, Hypervisor也必然被绑定在该 CPU上执行, 这样有利于筒化检查 CPU否是在执 行 Hypervisor组件中的目标函数的机制, 因为,升级管理模块在调用 Hypervisor 的超级调用接口获取 Hypervisor对应的 CPU的调用栈, 检查该 CPU当前的函数 执行情况, 以确定是否有 CPU在执行 Hypervisor组件中的目标函数时, 若在将 Domain 0绑定在某一 CPU上执行的场景下, 则升级管理模块只需要获取一个 CPU ( Hypervisor运行的 CPU ) 的调用栈, 根据一个 CPU的调用栈, 对该一个 CPU当前的函数执行情况, 以确定该一个 CPU是否在执行 Hypervisor组件中的 目标函数时。
当 Domain O系统产生断点异常时(该断点异常可能是由上述中断断点指令 D1产生, 即因升级而产生, 也可能是其它原因而产生), 断点异常处理程序可 判断该断点异常是否因升级而产生; 若否, 则按照该断点异常对应的处理程序 进行断点处理; 若判断出该断点异常是由上述中断断点指令 D1引起(即因升 级而产生, 并且该断点异常是为了生效 Hypervisor组件中的目标函数对应的升 级函数 ), 且升级管理模块检查到没有 CPU在执行该目标函数(在实际应用中, 升级管理模块可调用 Hypervisor的超级调用接口获取 Hypervisor对应的 CPU的 调用栈, 根据获取的该调用栈, 逐个检查(或也可同时检查)各 CPU当前的函 数执行情况, 进而可检查到有没有 CPU在执行上述目标函数), 则升级管理模 块可以调用 Hypervisor的超级调用接口, 将该目标函数的起始位置的中断断点 指令 D1替换为跳转指令(该跳转指令指向该目标函数对应的升级函数 ), 并将 该断点异常的返回地址设置为上述升级函数的起始地址,断点异常返回后将执
行该升级函数。 后续, 当某线程再次执行到上述目的函数的起始位置时, 会根 据跳转指令, 跳转到该目标函数对应的升级函数执行。
此外, 若断点异常处理程序判断出该断点异常是由上述中断断点指令 D1 引起的 (即因升级而产生, 且该断点异常是为了生效 Hypervisor组件中的目标 函数对应的升级函数 ),并且升级管理模块检查到有 CPU正在执行该目标函数, 则升级管理模块调用 Hypervisor的超级调用接口, 将该目标函数的起始位置的 中断断点指令 D1替换为跳转指令, 并将该断点异常的返回地址设置为上述目 标函数的等价代码的起始地址, 而断点异常返回后将执行该等价代码。 后续, 当再次执行到上述目的函数的起始位置时,会根据跳转指令,跳转到该目标函 数对应的升级函数执行。 或者, 升级管理模块可创建一个延迟升级内核线程, 当 CPU执行完目标函数后, 再升级该目标函数。
在实际应用中,为确保 JMP指令写入的原子性,可从后往前逐个字节写入, 例如, 若中断断点指令 INT3操作码是 OxCC (其中, 中断断点指令 INT3只有操 作码, 没有操作数), 可先把 JMP指令的操作数字节写入 INT3的后一个字节的 位置, 再把 JMP操作码替换 INT3的操作码 0xCC。
需要说明的是, 上述生效升级文件所对应升级的 Hypervisor组件的方式仅 为举例说明, 基于该实现思想, 还可以得到其它一种或多种实施方式, 此处不 再一一赞述。
此外, 若需要还原升级(可能是用户空间的应用程序指示还原升级), 升 级管理模块可按照与生效升级函数的类似方式,在所有需要还原的目标函数的 开始位置写入中断断点指令 D2 (其中, 以原子写入方式写入中断断点指令 2 )。
当某线程执行到该中断断点指令时,触发产生断点异常, 启动断点异常处 理程序。 当 Domain 0系统产生断点异常时, 断点异常处理程序可判断该断点异 常是否因升级而产生(即是否由中断断点指令 D2引起); 若否, 则按照该断点 异常对应的处理程序进行断点处理。
若判断出该断点异常是由中断断点指令 D2引起(即因升级而产生, 且该 断点异常是为了还原升级); 并且升级管理模块检查到没有 CPU正在执行 Hypervisor组件中的目标函数对应的升级函数,则升级管理模块调用 Hypervisor 的超级调用接口,还原该目标函数的起始位置被跳转指令所覆盖的指令(可先
恢复中断断点指令 D2之后的被跳转指令覆盖的指令, 待所有目标函数其它部 分都还原完后, 最后将所有的中断断点指令替换为被覆盖的目标函数指令 ), 并将该断点异常的返回地址设置为该目标函数的等价代码的起始地址;断点异 常返回后将执行该等价代码。后续,当再次执行到上述目的函数的起始位置时, 就不会执行该目标函数对应的升级函数了, 而是执行该目的函数。
此外, 当 Domain 0系统产生断点异常时, 若断点异常处理程序判断出该断 点异常是由中断断点指令 D2引起(即因升级而产生, 且该断点异常是为了还 原升级);并且检查到有 CPU正在执行 Hypervisor组件中的目标函数对应的升级 函数, 则升级管理模块调用 Hypervisor的超级调用接口, 还原该目标函数的起 始位置被跳转指令所覆盖的指令,并将该断点异常的返回地址设置为上述升级 函数的起始地址; 断点异常返回后将执行该升级函数。 后续, 当再次执行到上 述目的函数的起始位置时, 就不会执行该目标函数对应的升级函数了, 而是执 行该目的函数。 或者, 升级管理模块可创建一个延迟还原内核线程, 当 CPU执 行完目标函数对应的升级函数后, 再还原该目标函数。
由上可见, 本实施例的 Hypervisor提供超级调用接口, 而部署在 Domain 0 内核中的升级管理模块则调用超级内核 Hypervisor的超级调用接口, 将用于升 级 Hypervisor组件的升级文件力口载到 Hypervisor的地址空间, 并调用 Hypervisor 的超级调用接口来生效升级文件所对应升级的 Hypervisor组件, 由于是利用 Hypervisor提供超级调用接口对 Hypervisor组件进行在线升级,故而不需要热迁 移业务到其它设备, 相对减少了升级 Hypervisor组件需占用的设备资源, 同时 也有利于减少了升级 Hypervisor组件对上层业务的影响; 并且, 该升级机制无 需中断业务, 且实时性较高, 升级时间也相对较短。
进一步的, 通过生成等效代码的机制, 可实现无缝升级, 进一步减少对上 层业务的影响。 参见图 5、 基于上述实施例, 本发明实施例提供的一种计算机系统, 可包 括: 中央处理器 CPU 510, 存储器 520, 存储器 520用于存储程序代码; 中央处
虚拟机内核用于调用 Hypervisor的超级调用接口, 将用于升级 Hypervisor 组件中的目标函数的升级文件加载到上述 Hypervisor的地址空间, 上述升级文 件包括与上述目标函数对应的升级函数; 调用 Hypervisor的超级调用接口, 将 需要升级的 Hypervisor组件中的目标函数的起始位置指令替换为第一中断断点 指令; 断点是虚拟机内核由上述第一中断断点指令引起时, 调用 Hypervisor的超级调 用接口,替换上述第一中断断点指令为升级所需的跳转指令以将上述需要升级 的 Hypervisor组件中的目标函数升级为上述升级函数, 其中上述跳转指令指向 上述地址空间中的升级文件中的升级函数。
在一种应用场景下, 虚拟机内核可调用 Hypervisor的超级调用接口, 在 Hypervisor的地址空间划分出升级内存区; 调用 Hypervisor的超级调用接口,将 用于升级 Hypervisor组件的升级文件加载到该 Hypervisor的地址空间中的升级 内存区。
举例来说,调用 Hypervisor的超级调用接口,在 Hypervisor的地址空间划分 出升级内存区; 判断 Hypervisor地址空间当前的升级内存区是否有足够的剩余 空间加载上述升级文件; 若够, 则调用 Hypervisor的超级调用接口, 将用于升 级 Hypervisor组件的升级文件加载到上述 Hypervisor的地址空间中的升级内存 区; 若不够, 则调用 Hypervisor的超级调用接口, 在 Hypervisor地址空间再划分 出一块升级内存区, 使得 Hypervisor的地址空间中有足够的升级内存区来加载 上述升级文件。
当然, 虚拟机内核亦可通过其它方式(例如可直接统计字节数等), 获得 该升级文件的大小, 并根据获得的该升级文件的大小, 判断 Hypervisor地址空 间当前的升级内存区是否有足够的剩余空间来加载该升级文件。 若 Hypervisor 地址空间的升级内存区足够大, 则虚拟机内核亦可默认为 Hypervisor地址空间 当前的升级内存区有足够的剩余空间来加载该升级文件,故而事先亦可不对升 级内存区是否有足够的剩余空间来加载该升级文件进行判断,而可直接进行加 载。
当然, 若升级内存区的剩余空间过多(例如升级内存区中的部分空间始终
未用 ) , 虚拟机内核也可调用 Hypervisor的超级调用接口, 将 Hypervisor的地址 空间中的升级内存区的部分空间划分给其它程序使用。
其中, 虚拟机内核可比较用于升级 Hypervisor组件的升级文件中记录的首 选加载地址, 和其将要加载到 Hypervisor的地址空间的升级内存区的起始地址 是否相同; 若相同, 则将用于升级 Hypervisor组件的升级文件拷贝到 Hypervisor 的地址空间中的对应升级内存区; 若不同, 则对用于升级 Hypervisor组件的升 级文件中与上述目标函数对应的符号进行重定位,以确定上述升级文件中的符 号对应的目标函数将加载到升级内存区中的地址,将上述重定位后的升级文件 拷贝到 Hypervisor的地址空间中的对应升级内存区。
其中, 上述虚拟机内核具体用于通过如下方式来实现 "调用 Hypervisor的 超级调用接口,替换上述第一中断断点指令为升级所需的跳转指令以将上述需 要升级的 Hypervisor组件中的目标函数升级为上述升级函数":
检查是否有中央处理器 CPU在执行上述目标函数;
若否, 则调用 Hypervisor的超级调用接口, 将上述目标函数的起始位置的 中断断点指令替换为跳转指令,并将断点异常的返回地址设置为上述升级函数 的起始地址;
若是, 调用 Hypervisor的超级调用接口, 生成上述目标函数中将要被跳转 指令覆盖的指令的等价代码; 调用 Hypervisor的超级调用接口, 将上述目标函 数的起始位置的中断断点指令替换为跳转指令,并将断点异常的返回地址设置 为上述等价代码的起始地址。
上述虚拟机内核还用于, 在需要还原升级时, 虚拟机内核调用 Hypervisor 的超级调用接口, 将上述目标函数的起始位置的指令替换为第二中断断点指 令; 述第二中断断点指令引起时, 虚拟机内核调用 Hypervisor的超级调用接口, 将 上述 Hypervisor组件中由上述目标函数升级的升级函数还原为上述目标函数。
在一种应用场景下, 若需要还原升级(其中可能是用户空间指示还原升 级), 可按照与生效升级函数的类似方式, 在所有需要还原的目标函数的开始 位置写入第二中断断点指令(其中, 以原子写入方式写入中断断点指令)。 当
线程执行到该第二中断断点指令时,触发产生断点异常, 启动断点异常处理程 序。 当系统产生断点异常时, 中断处理程序判断该断点异常是否由第二中断断 点指令引起(即判断该断点异常是否因升级而产生); 若否, 则按照该断点异 常对应的处理程序进行断点处理;若中断处理程序判断出该断点异常是第二中 断断点指令引起(即判断出该断点异常因升级而产生,且该断点异常是为了还 原升级 ), 虚拟机内核可超级调用接口检查是否有中央处理器 CPU正在执行上 述 Hypervisor组件中的目标函数对应的升级函数, 若检查到没有中央处理器 CPU正在执行 Hypervisor组件中的目标函数对应的升级函数, 则虚拟机内核可 调用 Hypervisor的超级调用接口, 还原该目标函数的起始位置被跳转指令所覆 盖的指令,并将该断点异常的返回地址设置为该目标函数的等价代码的起始地 址; 断点异常返回后将执行该等价代码。 后续, 当某线程再次执行到上述目的 函数的起始位置时, 就不会执行该目标函数对应的升级函数了, 而是执行上述 目的函数。此外, 若中断处理程序判断出该断点异常是由第二中断断点指令引 起(即因升级而产生, 且该断点异常是为了还原升级); 并且虚拟机内核检查 到有 CPU正在执行 Hypervisor组件中的目标函数对应的升级函数, 则虚拟机内 核调用 Hypervisor的超级调用接口, 还原该目标函数的起始位置被跳转指令所 覆盖的指令, 并将该断点异常的返回地址设置为上述升级函数的起始地址; 断 点异常返回后将执行该升级函数。后续, 当某个线程再次执行到上述目的函数 的起始位置时, 就不会执行该目标函数对应的升级函数了, 而是执行该目的函 数。 或者, 虚拟机内核可创建一个延迟还原内核线程, 当 CPU执行完目标函数 对应的升级函数后, 再还原该目标函数。
本发明实施例基于上述方法实施例来实现,虚拟机内核的其他操作可以参 见上述方法实施例中的相关说明,本领域技术人员可以根据方法实施例中的相 关说明来实现在计算机系统中升级的各种操作, 在此不再赘述。
综上, 本发明实施例通过 Hypervisor提供超级调用接口, 而虚拟机内核则 调用超级内核 Hypervisor的超级调用接口,将用于升级 Hypervisor组件的升级文 件加载到 Hypervisor的地址空间,并调用 Hypervisor的超级调用接口来生效升级 文件所对应升级的 Hypervisor组件,由于是利用 Hypervisor提供超级调用接口对 Hypervisor组件进行在线升级, 故而不需要热迁移业务到其它设备, 相对减少
了升级 Hypervisor组件需占用的设备资源,同时也有利于减少了升级 Hypervisor 组件对上层业务的影响; 并且, 该升级机制无需中断业务, 且实时性较高, 升 级时间也相对较短。
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步 骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读 存储介质中, 存储介质可以包括: 只读存储器、 随机存储器、 磁盘或光盘等。
述, 以上实施例的说明只是用于帮助理解本发明的方法及其核心思想; 同时, 对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围 上均会有改变之处, 综上, 本说明书内容不应理解为对本发明的限制。
Claims
1、 一种超级内核 Hypervisor组件的升级方法, 其特征在于, 包括: 虚拟机内核调用 Hypervisor的超级调用接口,将用于升级 Hypervisor组件中 的目标函数的升级文件加载到所述 Hypervisor的地址空间, 所述升级文件包括 与所述目标函数对应的升级函数;
虚拟机内核调用 Hypervisor的超级调用接口,将需要升级的 Hypervisor组件 中的目标函数的起始位置指令替换为第一中断断点指令;
当虚拟机内核中的中断处理程序判断出引起断点异常的断点是由所述第 一中断断点指令引起时, 虚拟机内核调用 Hypervisor的超级调用接口, 替换所 述第一中断断点指令为升级所需的跳转指令以将所述需要升级的 Hypervisor组 件中的目标函数升级为所述升级函数, 其中, 所述跳转指令指向所述地址空间 中的升级文件中的升级函数。
2、 根据权利要求 1所述的方法, 其特征在于,
所述调用 Hypervisor的超级调用接口,将用于升级 Hypervisor组件的升级文 件加载到所述 Hypervisor的地址空间, 包括:
调用 Hypervisor的超级调用接口,在 Hypervisor的地址空间划分出升级内存 区; 调用 Hypervisor的超级调用接口,将用于升级 Hypervisor组件的升级文件加 载到所述 Hypervisor的地址空间中的升级内存区。
3、 根据权利要求 2所述的方法, 其特征在于, 所述调用 Hypervisor的超级 调用接口,在 Hypervisor的地址空间划分出升级内存区; 调用 Hypervisor的超级 调用接口,将用于升级 Hypervisor组件的升级文件加载到所述 Hypervisor的地址 空间中的升级内存区, 包括:
调用 Hypervisor的超级调用接口,在 Hypervisor的地址空间划分出升级内存 区;
判断 Hypervisor地址空间当前的升级内存区是否有足够的剩余空间加载所 述升级文件;
若够, 则调用 Hypervisor的超级调用接口,将用于升级 Hypervisor组件的升 级文件加载到所述 Hypervisor的地址空间中的升级内存区;
若不够, 则调用 Hypervisor的超级调用接口, 在 Hypervisor地址空间再划分 出一块升级内存区, 使得 Hypervisor的地址空间中有足够的升级内存区来加载 所述升级文件。
4、 根据权利要求 2或 3所述的方法, 其特征在于,
所述将用于升级 Hypervisor组件的升级文件加载到所述 Hypervisor的地址 空间中的升级内存区, 包括:
比较用于升级 Hypervisor组件的升级文件中记录的首选加载地址, 和其将 要加载到 Hypervisor的地址空间的升级内存区的起始地址是否相同;
若相同,则将用于升级 Hypervisor组件的升级文件拷贝到 Hypervisor的地址 空间中的对应升级内存区; 若不同, 则对用于升级 Hypervisor组件的升级文件 中与所述目标函数对应的符号进行重定位,以确定所述升级文件中的符号对应 的目标函数将加载到升级内存区中的地址,将所述重定位后的升级文件拷贝到 Hypervisor的地址空间中的对应升级内存区。
5、 根据权利要求 1所述的方法, 其特征在于, 虚拟机内核调用 Hypervisor 的超级调用接口,替换所述第一中断断点指令为升级所需的跳转指令以将所述 需要升级的 Hypervisor组件中的目标函数升级为所述升级函数, 包括:
检查是否有中央处理器 CPU在执行所述目标函数;
若否, 则调用 Hypervisor的超级调用接口, 将所述目标函数的起始位置的 中断断点指令替换为跳转指令,并将断点异常的返回地址设置为所述升级函数 的起始地址;
若是, 调用 Hypervisor的超级调用接口, 生成所述目标函数中将要被跳转 指令覆盖的指令的等价代码; 调用 Hypervisor的超级调用接口, 将所述目标函 数的起始位置的中断断点指令替换为跳转指令,并将断点异常的返回地址设置 为所述等价代码的起始地址。
6、 根据权利要求 5所述的方法, 其特征在于, 所述方法还包括:
在需要还原升级时, 虚拟机内核调用 Hypervisor的超级调用接口, 将所述 目标函数的起始位置的指令替换为第二中断断点指令;
当虚拟机内核中的中断处理程序判断出引起断点异常的断点是由所述第 二中断断点指令引起时, 虚拟机内核调用 Hypervisor的超级调用接口, 将所述 Hypervisor组件中由所述目标函数升级的升级函数还原为所述目标函数。
7、 根据权利要求 6所述的方法, 其特征在于, 将所述 Hypervisor组件中由 所述目标函数升级的升级函数还原为所述目标函数, 包括:
检查是否有 CPU正在执行所述升级函数;
若否, 则调用 Hypervisor的超级调用接口, 还原所述目标函数的起始位置 被跳转指令所覆盖的指令,并将断点异常的返回地址设置为所述等价代码的起 始地址;
若是, 则调用 Hypervisor的超级调用接口, 还原所述目标函数的起始位置 被跳转指令所覆盖的指令,并将断点异常的返回地址设置为所述升级函数的起 始地址。
8、 一种计算机系统, 其特征在于, 包括中央处理器 CPU, 存储器, 所述 码来运行与程序代码对应的程序, 其中, 所述 CPU中运行有虚拟机内核以及超 级内核 Hypervisor:
所述虚拟机内核用于调用 Hypervisor的超级调用接口, 将用于升级 Hypervisor组件中的目标函数的升级文件加载到所述 Hypervisor的地址空间,所 述升级文件包括与所述目标函数对应的升级函数; 调用 Hypervisor的超级调用 接口, 将需要升级的 Hypervisor组件中的目标函数的起始位置指令替换为第一 中断断点指令;
所述虚拟机内核还用于,当所述虚拟机内核中的中断处理程序判断出引起 断点异常的断点是由所述第一中断断点指令引起时, 调用 Hypervisor的超级调 用接口,替换所述第一中断断点指令为升级所需的跳转指令以将所述需要升级 的 Hypervisor组件中的目标函数升级为所述升级函数, 其中所述跳转指令指向 所述地址空间中的升级文件中的升级函数。
9、根据权利要求 8所述的计算机系统, 其特征在于, 所述虚拟机内核具体 用于通过如下方式来实现调用 Hypervisor的超级调用接口, 替换所述第一中断 断点指令为升级所需的跳转指令以将所述需要升级的 Hypervisor组件中的目标 函数升级为所述升级函数:
检查是否有中央处理器 CPU在执行所述目标函数;
若否, 则调用 Hypervisor的超级调用接口, 将所述目标函数的起始位置的 中断断点指令替换为跳转指令,并将断点异常的返回地址设置为所述升级函数 的起始地址;
若是, 调用 Hypervisor的超级调用接口, 生成所述目标函数中将要被跳转 指令覆盖的指令的等价代码; 调用 Hypervisor的超级调用接口, 将所述目标函 数的起始位置的中断断点指令替换为跳转指令,并将断点异常的返回地址设置 为所述等价代码的起始地址。
10、 根据权利要求 8或 9所述的计算机系统, 其特征在于,
所述虚拟机内核还用于, 在需要还原升级时, 虚拟机内核调用 Hypervisor 的超级调用接口, 将所述目标函数的起始位置的指令替换为第二中断断点指 第二中断断点指令引起时, 虚拟机内核调用 Hypervisor的超级调用接口, 将所 述 Hypervisor组件中由所述目标函数升级的升级函数还原为所述目标函数。
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
EP20110856751 EP2557498B1 (en) | 2011-01-30 | 2011-08-31 | Updating method and computer system for hypervisor components |
US13/437,317 US20120198431A1 (en) | 2011-01-30 | 2012-04-02 | Method for upgrading hypervisor component and computer system |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110033485.0 | 2011-01-30 | ||
CN201110033485.0A CN102073529B (zh) | 2011-01-30 | 超级内核组件的升级方法和计算机系统 |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US13/437,317 Continuation US20120198431A1 (en) | 2011-01-30 | 2012-04-02 | Method for upgrading hypervisor component and computer system |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2012100535A1 true WO2012100535A1 (zh) | 2012-08-02 |
Family
ID=44032075
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2011/079176 WO2012100535A1 (zh) | 2011-01-30 | 2011-08-31 | 超级内核组件的升级方法和计算机系统 |
Country Status (2)
Country | Link |
---|---|
EP (1) | EP2557498B1 (zh) |
WO (1) | WO2012100535A1 (zh) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110347417A (zh) * | 2019-07-11 | 2019-10-18 | 南京沁恒微电子股份有限公司 | 固定向量表mcu的iap程序升级方法 |
CN112181454A (zh) * | 2020-09-21 | 2021-01-05 | 西安微电子技术研究所 | 一种无人值守设备的远程升级系统及方法 |
CN116414424A (zh) * | 2023-06-09 | 2023-07-11 | 建信金融科技有限责任公司 | 热更新方法、装置、设备及存储介质 |
CN118092983A (zh) * | 2024-04-26 | 2024-05-28 | 飞音车联网(苏州)有限公司 | 一种防无法开机错误的软件升级方法、单片机及存储介质 |
Families Citing this family (21)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102902599B (zh) | 2012-09-17 | 2016-08-24 | 华为技术有限公司 | 虚拟机内部故障处理方法、装置及系统 |
US10127068B2 (en) | 2016-06-30 | 2018-11-13 | Amazon Technologies, Inc. | Performance variability reduction using an opportunistic hypervisor |
US10318311B2 (en) | 2016-06-30 | 2019-06-11 | Amazon Technologies, Inc. | Memory allocation techniques at partially-offloaded virtualization managers |
CN108108202A (zh) * | 2016-11-23 | 2018-06-01 | 阿里巴巴集团控股有限公司 | 一种热插拔方法和装置 |
US11218364B2 (en) | 2018-06-25 | 2022-01-04 | Amazon Technologies, Inc. | Network-accessible computing service for micro virtual machines |
US12106132B2 (en) | 2018-11-20 | 2024-10-01 | Amazon Technologies, Inc. | Provider network service extensions |
US10833949B2 (en) | 2018-11-20 | 2020-11-10 | Amazon Technologies, Inc | Extension resource groups of provider network services |
US10848418B1 (en) | 2019-06-24 | 2020-11-24 | Amazon Technologies, Inc. | Packet processing service extensions at remote premises |
US11520530B2 (en) | 2019-09-24 | 2022-12-06 | Amazon Technologies, Inc. | Peripheral device for configuring compute instances at client-selected servers |
US11113046B1 (en) | 2019-09-24 | 2021-09-07 | Amazon Technologies, Inc. | Integration and remote control of a pre-assembled computer system into a server for a virtualization service |
US11243589B1 (en) | 2019-09-24 | 2022-02-08 | Amazon Technologies, Inc. | Remote power button actuation device for a pre-assembled computer system integrated into a server for a virtualization service |
US11064017B2 (en) | 2019-09-24 | 2021-07-13 | Amazon Technologies, Inc. | Peripheral device enabling virtualized computing service extensions |
US11853771B1 (en) | 2019-09-24 | 2023-12-26 | Amazon Technologies, Inc. | Offload card based virtualization of a pre-assembled computer system integrated into a server for a virtualization service |
US11650869B2 (en) | 2019-11-27 | 2023-05-16 | Amazon Technologies, Inc. | Quantum computing service with local edge devices supporting multiple quantum computing technologies |
US11605016B2 (en) | 2019-11-27 | 2023-03-14 | Amazon Technologies, Inc. | Quantum computing service supporting local execution of hybrid algorithms |
US11704715B2 (en) | 2019-11-27 | 2023-07-18 | Amazon Technologies, Inc. | Quantum computing service supporting multiple quantum computing technologies |
US11605033B2 (en) | 2019-11-27 | 2023-03-14 | Amazon Technologies, Inc. | Quantum computing task translation supporting multiple quantum computing technologies |
US11569997B1 (en) | 2020-03-09 | 2023-01-31 | Amazon Technologies, Inc. | Security mechanisms for data plane extensions of provider network services |
US11977957B2 (en) | 2021-08-03 | 2024-05-07 | Amazon Technologies, Inc. | Quantum computing program compilation using cached compiled quantum circuit files |
US11797276B1 (en) | 2021-09-30 | 2023-10-24 | Amazon Technologies, Inc. | Assisted composition of quantum algorithms |
US11907092B2 (en) | 2021-11-12 | 2024-02-20 | Amazon Technologies, Inc. | Quantum computing monitoring system |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090064136A1 (en) * | 2007-08-27 | 2009-03-05 | International Business Machines Corporation | Utilizing system configuration information to determine a data migration order |
US20090210888A1 (en) * | 2008-02-14 | 2009-08-20 | Microsoft Corporation | Software isolated device driver architecture |
US7827443B2 (en) * | 2005-02-10 | 2010-11-02 | International Business Machines Corporation | Processor instruction retry recovery |
CN102073529A (zh) * | 2011-01-30 | 2011-05-25 | 华为技术有限公司 | 超级内核组件的升级方法和计算机系统 |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8776041B2 (en) * | 2007-02-05 | 2014-07-08 | Microsoft Corporation | Updating a virtual machine monitor from a guest partition |
US8631404B2 (en) * | 2010-02-18 | 2014-01-14 | Red Hat Israel, Ltd. | Mechanism for downloading hypervisor updates via a virtual hardware device using existing virtual machine-host channels |
-
2011
- 2011-08-31 WO PCT/CN2011/079176 patent/WO2012100535A1/zh active Application Filing
- 2011-08-31 EP EP20110856751 patent/EP2557498B1/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7827443B2 (en) * | 2005-02-10 | 2010-11-02 | International Business Machines Corporation | Processor instruction retry recovery |
US20090064136A1 (en) * | 2007-08-27 | 2009-03-05 | International Business Machines Corporation | Utilizing system configuration information to determine a data migration order |
US20090210888A1 (en) * | 2008-02-14 | 2009-08-20 | Microsoft Corporation | Software isolated device driver architecture |
CN102073529A (zh) * | 2011-01-30 | 2011-05-25 | 华为技术有限公司 | 超级内核组件的升级方法和计算机系统 |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110347417A (zh) * | 2019-07-11 | 2019-10-18 | 南京沁恒微电子股份有限公司 | 固定向量表mcu的iap程序升级方法 |
CN110347417B (zh) * | 2019-07-11 | 2023-08-29 | 南京沁恒微电子股份有限公司 | 固定向量表mcu的iap程序升级方法 |
CN112181454A (zh) * | 2020-09-21 | 2021-01-05 | 西安微电子技术研究所 | 一种无人值守设备的远程升级系统及方法 |
CN112181454B (zh) * | 2020-09-21 | 2023-04-07 | 西安微电子技术研究所 | 一种无人值守设备的远程升级系统及方法 |
CN116414424A (zh) * | 2023-06-09 | 2023-07-11 | 建信金融科技有限责任公司 | 热更新方法、装置、设备及存储介质 |
CN116414424B (zh) * | 2023-06-09 | 2023-09-12 | 建信金融科技有限责任公司 | 热更新方法、装置、设备及存储介质 |
CN118092983A (zh) * | 2024-04-26 | 2024-05-28 | 飞音车联网(苏州)有限公司 | 一种防无法开机错误的软件升级方法、单片机及存储介质 |
Also Published As
Publication number | Publication date |
---|---|
EP2557498A4 (en) | 2014-03-12 |
EP2557498B1 (en) | 2015-05-20 |
CN102073529A (zh) | 2011-05-25 |
EP2557498A1 (en) | 2013-02-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2012100535A1 (zh) | 超级内核组件的升级方法和计算机系统 | |
Olivier et al. | A binary-compatible unikernel | |
US9996384B2 (en) | Virtual machine homogenization to enable migration across heterogeneous computers | |
US9996374B2 (en) | Deployment and installation of updates in a virtual environment | |
US8839228B2 (en) | System and method for updating an offline virtual machine | |
KR102084816B1 (ko) | Bpram을 사용한 소프트웨어 애플리케이션들의 레이아웃 및 실행 | |
Ao et al. | Faasnap: Faas made fast using snapshot-based vms | |
US20120198431A1 (en) | Method for upgrading hypervisor component and computer system | |
US11645068B2 (en) | Method for implementing function jump, apparatus, and computer storage medium | |
US20090089815A1 (en) | Method and system for performing i/o operations using a hypervisor | |
JP2005322242A (ja) | 仮想環境からのハードウェアへの直接アクセスの提供 | |
US10678677B1 (en) | Continuous debugging | |
JP2007509387A (ja) | オペレーティングシステム | |
WO2022135429A1 (zh) | 快速启动方法 | |
EP3846028A1 (en) | Method and device for resuming execution of application, and computer | |
US11061695B2 (en) | Unikernel provisioning | |
US11693722B2 (en) | Fast memory mapped IO support by register switch | |
US9235426B2 (en) | Multicore processor system, computer product, and notification method for updating operating system | |
US20120246634A1 (en) | Portable virtual applications | |
CN114090171A (zh) | 虚拟机创建方法、迁移方法及计算机可读介质 | |
US20240211246A1 (en) | Method and Apparatus for Upgrading Client Software | |
CN115136133A (zh) | 按需代码执行的单次使用执行环境 | |
US12105649B2 (en) | Method for maintaining a running software service through a soft reboot of an operating system (OS) kernel | |
Wang et al. | Efficient Memory Overcommitment for {I/O} Passthrough Enabled {VMs} via Fine-grained Page Meta-data Management | |
US11720348B2 (en) | Computing node allocation based on build process specifications in continuous integration environments |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 11856751 Country of ref document: EP Kind code of ref document: A1 |
|
WWE | Wipo information: entry into national phase |
Ref document number: 2011856751 Country of ref document: EP |
|
NENP | Non-entry into the national phase |
Ref country code: DE |