Virtual machine memory data migration method, CPU chip and server
By distributing the virtual machine memory page information table to multiple slave security processors for parallel processing, it solves the problem of long interaction during virtual machine migration, improves migration efficiency and reduces downtime.
Patent Information
- Application Number
- CN201911290531.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-12-13
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2039-12-13
AI Technical Summary
During the virtual machine migration process based on secure virtualization technology, the interaction between the virtual machine monitor and the security processor takes a long time, resulting in low migration efficiency and increased downtime.
By dividing the virtual machine memory page information table into multiple memory page information table segments and distributing them to multiple slave security processors for parallel processing, the interaction time between the virtual machine monitor and the security processor is reduced and migration efficiency is improved.
It improves the efficiency of virtual machine memory data migration, reduces migration time overhead and downtime, and enhances the processing efficiency of the migration process.
Smart Images

Figure CN111158853B
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of virtual machine migration, and in particular to a virtual machine memory data migration method, a CPU chip, and a server. Background Art
[0002] When a virtual machine based on secure virtualization technology is migrating, the virtual machine monitor and the security processor need to interact. The interaction process is time-consuming, and only one page of memory is processed at a time, resulting in low migration efficiency and a long process. Summary of the invention
[0003] In view of this, an embodiment of the present application provides a virtual machine memory data migration method, a CPU chip and a server, which can improve the migration efficiency of virtual machine memory data.
[0004] In a first aspect, an embodiment of the present application provides a method for migrating virtual machine memory data, which is applied to a sending end, including: a virtual machine monitor puts virtual machine memory page information that needs to be migrated into a memory page information table, and sends the memory page information table to a main security processor; the main security processor divides the memory page information table into two or more memory page information table segments, and sends different memory page information table segments to different slave security processors; each slave security processor reads the virtual machine memory data according to the received memory page information table segments, and processes the read virtual machine memory data and sends it to the main security processor, and the main security processor sends the processed virtual machine memory data to the virtual machine monitor; the virtual machine monitor sends the processed virtual machine memory data and migration information to a target machine to migrate the virtual machine memory data, wherein the migration information includes the virtual machine memory page information that needs to be migrated or the memory page information table.
[0005] According to a specific implementation of the present application, after the virtual machine monitor puts the virtual machine memory page information that needs to be migrated into the memory page information table, the method also includes: the virtual machine monitor determines whether the number of items in the memory page information table reaches a threshold value, and if the number of items in the memory page information table reaches the threshold value, the memory page information table is sent to the main security processor; wherein, one item in the memory page information table corresponds to at least one virtual machine memory page information that needs to be migrated.
[0006] According to a specific implementation of the present application, the main security processor divides the memory page information table into more than two memory page information table segments, including: the main security processor divides the memory page information table into more than two memory page information table segments according to the number of main security processors and slave security processors; the number of the more than two memory page information table segments is less than or equal to the sum of the number of main security processors and slave security processors.
[0007] According to a specific implementation of the present application, the main security processor divides the memory page information table into more than two memory page information table segments, including: the main security processor divides the memory page information table into a first basic segment and a second basic segment; according to the number of the main security processor and the slave security processors that are idle at the current moment, the first basic segment is divided into more than two first sub-segments; the number of the more than two first sub-segments is less than or equal to the sum of the number of the main security processor and the slave security processors that are idle at the current moment;
[0008] The sending of different memory page information table segments to different slave security processors includes: sending different first sub-segments to different slave security processors that are idle at the current moment; dividing the second basic segment into more than two second sub-segments according to the number of slave security processors that are idle at the next moment; the number of the more than two second sub-segments is less than or equal to the number of slave security processors that are idle at the next moment;
[0009] The sending of different memory page information table segments to different slave security processors includes: sending different second sub-segments to different slave security processors that are idle at the next moment.
[0010] According to a specific implementation of the present application, each slave security processor reads the virtual machine memory data according to the received memory page information table segment, and sends the read virtual machine memory data to the main security processor after processing, including: each slave security processor reads the virtual machine memory data according to the received memory page information table segment, and sends the read virtual machine memory data to the main security processor after encrypting or encrypting and generating integrity verification data.
[0011] According to a specific implementation of the present application, before determining whether the number of items in the memory page information table reaches a threshold, the method further includes: dynamically negotiating with the receiving end to determine the threshold; or determining the threshold according to a migration network status.
[0012] According to a specific implementation of the present application, each slave security processor reads the virtual machine memory data according to the received memory page information table segment, and sends the read virtual machine memory data to the main security processor after processing, including: each slave security processor reads the virtual machine memory data according to the received memory page information table segment, and sends the read virtual machine memory data to the main security processor after processing via a local cryptographic coprocessor.
[0013] According to a specific implementation of the present application, when the main security processor divides the memory page information table into two or more memory page information table segments and sends different memory page information table segments to different slave security processors, the method also includes: the main security processor itself retains a memory page information table segment; after the main security processor sends different memory page information table segments to different slave security processors, the main security processor reads the virtual machine memory data according to the memory page information table segments retained by itself, and processes the read virtual machine memory data.
[0014] In a second aspect, an embodiment of the present application provides another method for migrating virtual machine memory data, which is applied to a receiving end, and includes: a virtual machine monitor receives virtual machine memory data and migration information that need to be migrated, and the migration information includes memory page information or a memory page information table of the virtual machine memory data that needs to be migrated; if the migration information includes memory page information of the virtual machine memory data that needs to be migrated, the memory page information is placed in a memory page information table; the virtual machine monitor sends the memory page information table to a main security processor; the main security processor divides the memory page information table into two or more memory page information table segments, and sends different memory page information table segments to different slave security processors; each slave security processor reads the virtual machine memory data that needs to be migrated according to the received memory page information table segments, and processes the read virtual machine memory data that needs to be migrated and sends it to the main security processor.
[0015] According to a specific implementation of the present application, if the migration information includes memory page information of virtual machine memory data that needs to be migrated, after the memory page information is placed in a memory page information table, the method further includes: determining whether the number of items in the memory page information table reaches a threshold value, and if the number of items in the memory page information table reaches the threshold value, executing the step of sending the memory page information table to the main security processor; wherein, one item in the memory page information table corresponds to at least one piece of virtual machine memory page information that needs to be migrated.
[0016] According to a specific implementation of the present application, the main security processor divides the memory page information table into more than two memory page information table segments, including: the main security processor divides the memory page information table into more than two memory page information table segments according to the number of main security processors and slave security processors; the number of the more than two memory page information table segments is less than or equal to the sum of the number of main security processors and slave security processors.
[0017] According to a specific implementation of the present application, the main security processor divides the memory page information table into more than two memory page information table segments, including: the main security processor divides the memory page information table into a first basic segment and a second basic segment; according to the number of the main security processor and the slave security processors that are idle at the current moment, the first basic segment is divided into more than two first sub-segments; the number of the more than two first sub-segments is less than or equal to the sum of the number of the main security processor and the slave security processors that are idle at the current moment;
[0018] The sending of different memory page information table segments to different slave security processors includes: sending different first sub-segments to different slave security processors that are idle at the current moment; dividing the second basic segment into more than two second sub-segments according to the number of slave security processors that are idle at the next moment; the number of the more than two second sub-segments is less than or equal to the number of slave security processors that are idle at the next moment;
[0019] The sending of different memory page information table segments to different slave security processors includes: sending different second sub-segments to different slave security processors that are idle at the next moment.
[0020] According to a specific implementation of the present application, each slave security processor reads the virtual machine memory data that needs to be migrated according to the received memory page information table segment, and processes and sends the read virtual machine memory data that needs to be migrated to the main security processor, including: each slave security processor reads the virtual machine memory data that needs to be migrated according to the received memory page information table segment, and decrypts the read virtual machine memory data that needs to be migrated, or sends the decryption and integrity verification to the main security processor after the data is successfully sent.
[0021] According to a specific implementation of the present application, before determining whether the number of items in the memory page information table reaches a threshold, the method further includes: dynamically negotiating with the sending end to determine the threshold; or determining the threshold according to a migration network status.
[0022] According to a specific implementation of the present application, each slave security processor reads the virtual machine memory data that needs to be migrated according to the received memory page information table segment, and sends the read virtual machine memory data that needs to be migrated to the main security processor after processing, including: each slave security processor reads the virtual machine memory data that needs to be migrated according to the received memory page information table segment, and sends the read virtual machine memory data that needs to be migrated to the main security processor after processing via a local cryptographic coprocessor.
[0023] According to a specific implementation of the present application, when the main security processor divides the memory page information table into two or more memory page information table segments and sends different memory page information table segments to different slave security processors, the method also includes: the main security processor retains a memory page information table segment for itself; after the main security processor sends different memory page information table segments to different slave security processors, the main security processor reads the virtual machine memory data according to the memory page information table segments retained by itself, and processes the read virtual machine memory data.
[0024] In a third aspect, an embodiment of the present application provides a CPU chip, including: a processor core, a master security processor and a slave security processor; wherein:
[0025] The processor core is used to run a virtual machine monitor, so as to put the virtual machine memory page information that needs to be migrated into a memory page information table through the virtual machine monitor; and send the memory page information table to a main security processor; the main security processor is electrically connected to the processing core, and is used to divide the memory page information table into two or more memory page information table segments, and send different memory page information table segments to different slave security processors; the slave security processors, which are more than two in number, are electrically connected to the main security processor respectively, and are used to read the virtual machine memory data according to the received memory page information table segments, and send the read virtual machine memory data to the main security processor after processing, so that the main security processor sends the processed virtual machine memory data to the virtual machine monitor; the processor core is also used to send the processed virtual machine memory data and migration information to a target machine through the virtual machine monitor to migrate the virtual machine memory data, wherein the migration information includes the virtual machine memory page information that needs to be migrated or the memory page information table.
[0026] According to a specific implementation of the present application, the processor core is also used to: determine whether the number of items in the memory page information table reaches a threshold through the virtual machine monitor; if the number of items in the memory page information table reaches the threshold, send the memory page information table to the main security processor; an item in the memory page information table corresponds to at least one virtual machine memory page information that needs to be migrated.
[0027] According to a specific embodiment of the present application, the main security processor is specifically used to: divide the memory page information table into more than two memory page information table segments according to the number of the main security processor and the slave security processors; the number of the more than two memory page information table segments is less than or equal to the sum of the number of the main security processor and the slave security processors.
[0028] According to a specific embodiment of the present application, the main security processor is also used to: divide the memory page information table into a first basic segment and a second basic segment; divide the first basic segment into two or more first sub-segments according to the number of the main security processor and the slave security processors that are idle at the current moment; the number of the more than two first sub-segments is less than or equal to the sum of the number of the main security processor and the slave security processors that are idle at the current moment; send different first sub-segments to different slave security processors that are idle at the current moment; divide the second basic segment into two or more second sub-segments according to the number of slave security processors that are idle at the next moment; the number of the more than two second sub-segments is less than or equal to the number of slave security processors that are idle at the next moment; send different second sub-segments to different slave security processors that are idle at the next moment.
[0029] According to a specific implementation of the present application, the slave security processor is specifically used to: read the virtual machine memory data according to the received memory page information table segment, and send the read virtual machine memory data to the master security processor after encrypting it or encrypting it and generating integrity verification data.
[0030] According to a specific implementation of the present application, the processor core is further used to dynamically negotiate with a receiving end virtual machine monitor to determine the threshold through a local virtual machine monitor, or to determine the threshold according to a migration network state.
[0031] According to a specific implementation of the present application, the slave security processor is specifically used to read the virtual machine memory data according to the received memory page information table segment, and send the read virtual machine memory data to the master security processor after processing by the local cryptographic coprocessor.
[0032] According to a specific implementation of the present application, the main security processor is also used to: when dividing the memory page information table into two or more memory page information table segments and sending different memory page information table segments to different slave security processors, retain a memory page information table segment for itself; and after sending different memory page information table segments to different slave security processors, read the virtual machine memory data according to the memory page information table segments retained by itself, and process the read virtual machine memory data.
[0033] In a fourth aspect, an embodiment of the present application provides another CPU chip, comprising: a processor core, a master security processor and a slave security processor; wherein:
[0034] The processor core is used to run a virtual machine monitor to receive virtual machine memory data and migration information that need to be migrated through the virtual machine monitor, wherein the migration information includes memory page information or a memory page information table of the virtual machine memory data that needs to be migrated; if the migration information includes memory page information of the virtual machine memory data that needs to be migrated, the memory page information is placed in a memory page information table; the memory page information table is sent to a main security processor; the main security processor is electrically connected to the processor core and is used to divide the memory page information table into two or more memory page information table segments; different memory page information table segments are sent to different slave security processors; the slave security processors are more than two in number and are respectively electrically connected to the main security processor and are used to read the virtual machine memory data that needs to be migrated according to the received memory page information table segments, and send the read virtual machine memory data that needs to be migrated to the main security processor after processing.
[0035] According to a specific embodiment of the present application, the processor core is also used to: determine whether the number of items in the memory page information table reaches a threshold through the virtual machine monitor; if the number of items in the memory page information table reaches the threshold, send the memory page information table to the main security processor; wherein, one item in the memory page information table corresponds to at least one virtual machine memory page information that needs to be migrated.
[0036] According to a specific embodiment of the present application, the main security processor is also used to: divide the memory page information table into more than two memory page information table segments according to the number of main security processors and slave security processors; the number of the more than two memory page information table segments is less than or equal to the sum of the number of main security processors and slave security processors.
[0037] According to a specific implementation of the present application, the master security processor is also used to: divide the memory page information table into a first basic segment and a second basic segment; divide the first basic segment into two or more first sub-segments according to the number of slave security processors that are idle at the current moment; the number of the two or more first sub-segments is less than or equal to the number of slave security processors that are idle at the current moment; send different first sub-segments to different slave security processors that are idle at the current moment; divide the second basic segment into two or more second sub-segments according to the number of slave security processors that are idle at the next moment; the number of the two or more second sub-segments is less than or equal to the number of slave security processors that are idle at the next moment; and send different second sub-segments to different slave security processors that are idle at the next moment.
[0038] According to a specific implementation of the present application, the slave security processor is specifically used to: read the virtual machine memory data that needs to be migrated according to the received memory page information table segment, and decrypt the read virtual machine memory data that needs to be migrated, or send it to the main security processor after successful decryption and integrity verification.
[0039] According to a specific implementation of the present application, the core processor is further used to determine the threshold through dynamic negotiation between the local virtual machine monitor and the sending end virtual machine monitor, or to determine the threshold according to the migration network state.
[0040] According to a specific embodiment of the present application, the slave security processor is specifically used to: read the virtual machine memory data that needs to be migrated according to the received memory page information table segment, and send the read virtual machine memory data that needs to be migrated to the master security processor after processing by the local cryptographic coprocessor.
[0041] According to a specific implementation of the present application, the main security processor is also used to: when dividing the memory page information table into two or more memory page information table segments and sending different memory page information table segments to different slave security processors, retain a memory page information table segment for itself; and after sending different memory page information table segments to different slave security processors, read the virtual machine memory data according to the memory page information table segments retained by itself, and process the read virtual machine memory data.
[0042] In a fifth aspect, an embodiment of the present application provides a server, comprising: a shell, a processor, a memory, a circuit board and a power supply circuit, wherein the circuit board is placed inside the space enclosed by the shell, and the processor and the memory are arranged on the circuit board; the power supply circuit is used to supply power to various circuits or devices of the above-mentioned electronic device; the memory is used to store executable program code; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the migration method described in any of the aforementioned embodiments.
[0043] In the virtual machine memory data migration method, CPU chip and server of the embodiment of the present application, the virtual machine migration sending end can use the virtual machine memory page information table to send the memory page information that needs to be migrated to the main security processor for processing in batches, rather than processing them one page at a time, thereby improving processing efficiency. In addition, in the present application, after the virtual machine monitor sends the memory page information table to the main security processor, the main security processor can segment a memory page information table and dispatch it to multiple slave security processors to realize concurrent processing of multiple pages of memory, reduce the interaction time between the virtual machine monitor and the security processor, further improve migration efficiency, reduce migration time overhead, and reduce downtime. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0045] Figure 1 This is a flow chart of a method for migrating virtual machine memory data according to an embodiment of the present application;
[0046] Figure 2 This is a schematic diagram of the structure of a memory page information table in an embodiment of the present application;
[0047] Figure 3 This is a flowchart of a method for migrating virtual machine memory data according to another embodiment of the present application;
[0048] Figure 4 This is a flowchart of a method for migrating virtual machine memory data according to another embodiment of the present application;
[0049] Figure 5 This is a flow chart of a method for migrating virtual machine memory data according to an embodiment of the present application;
[0050] Figure 6 This is a flowchart of a method for migrating virtual machine memory data according to another embodiment of the present application;
[0051] Figure 7 This is a flowchart of a method for migrating virtual machine memory data according to another embodiment of the present application;
[0052] Figure 8 This is a flowchart of a method for migrating virtual machine memory data according to another embodiment of the present application;
[0053] Fig. 9 This is a flowchart of a method for migrating virtual machine memory data according to another embodiment of the present application;
[0054] Fig.10 This is a block diagram of a CPU chip according to an embodiment of the present application;
[0055] Fig.11 This is a block diagram of a CPU chip according to another embodiment of the present application;
[0056] Fig.12 This is a schematic diagram of the structure of a server according to an embodiment of the present application. DETAILED DESCRIPTION
[0057] The main purpose of the embodiments of the present application is to provide a virtual machine memory data migration method, device, electronic device and storage medium. When performing virtual machine migration, multiple security processors can be used to process the data of multiple virtual machine memory pages in parallel to improve the migration efficiency of virtual machine memory data. The virtual machine memory data migration method and device can be applied to the migration of virtual machine memory data between virtual machines based on secure virtualization technology.
[0058] The embodiments of the present application are described in detail below in conjunction with the accompanying drawings. It should be clear that the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0059] Virtual Machine (VM) technology simulates running other client operating systems on a host computer architecture. The simulated client can have the same architecture as the host computer or a different architecture.
[0060] Hardware virtualization is a popular virtualization technology. Hardware virtualization directly virtualizes the hardware system of the host system for use by virtual machines. Hardware virtualization uses a virtual machine monitor (VMM) to isolate the virtual system from the host hardware. VMM, also known as a virtual machine manager, can run directly on the system hardware or on the host operating system. VMM implements the mapping from virtual resources to physical resources and uses local physical resources for calculations. When a virtual system accesses system resources, VMM will take over the request and return the processing result to the virtual machine system, thus realizing the virtualization of multiple hardware devices and ensuring the effective isolation of the virtual system.
[0061] Virtual machine migration is a very important application scenario in virtualization technology, which may include physical-to-virtual migration (P2V) and virtual-to-virtual migration (V2V). Among them, P2V migration refers to migrating the operating system on a physical server and its application software and data to a virtual server managed by a VMM. V2V migration is moving operating systems and data between virtual machines. A virtual machine migrates from a VMM on a physical machine to a VMM on another physical machine. The types of these two VMMs can be the same or different. Virtual machine migration in this application mainly refers to V2V migration.
[0062] For the migration of VM memory status, a pre-copy strategy can be adopted. After the migration starts, the source host VM is still running, and the destination host VM has not yet started. The migration sends the memory data of the source host VM to the destination host VM through a cycle. In the first round of the cycle, all memory page data is sent, and in each subsequent cycle, the dirty pages written by the VM in the previous pre-copy process are sent. When the time is right, the pre-copy cycle ends and the shutdown copy phase begins. The source host is suspended and no more memory is updated. The dirty pages in the last cycle are transferred to the destination host VM. The pre-copy mechanism greatly reduces the amount of memory data that needs to be transferred in the shutdown copy phase, thereby greatly reducing the downtime. However, for the memory part that updates very quickly, it will become dirty in each cycle process and need to be repeated pre-copy, which also leads to a large number of cycles and a longer migration time.
[0063] For virtual machines based on secure virtualization technology, since their memory data is encrypted using the virtual machine encryption key, the virtual machine monitor needs to interact with the security processor during migration. The migration process of ordinary virtual machines and virtual machines based on secure virtualization technology differs as follows:
[0064] For common virtual machine migration, after the virtual machine monitor obtains the memory page to be migrated, it directly sends the memory page data and related information to the receiving end.
[0065] When a virtual machine based on secure virtualization technology is being migrated, since its memory is encrypted, when the virtual machine monitor obtains the memory page that needs to be migrated, it needs to first transfer the memory page to the security processor for processing, and then wait for the security processor to complete the processing, and then the virtual machine monitor continues to search for the next memory page that needs to be migrated. Repeat the above process until the migration end condition is met.
[0066] When a virtual machine based on secure virtualization technology is migrating, the virtual machine monitor and the security processor need to interact, which is time-consuming, and only one page of memory is processed at a time, resulting in low migration efficiency and a long process. In an embodiment of the present application, a hardware platform supporting secure virtualization may have multiple security processors. Among them, the security processor can be a processor that can independently generate keys and perform encryption and decryption, and it can have an independent processor and storage unit inside, which can store keys and feature data, etc.
[0067] In addition, during the migration of a virtual machine, the virtual machine downtime is the time interval between when the virtual machine monitor stops the virtual machine and when it resumes the virtual machine, which determines the experience of virtual machine migration, and the processing time of the virtual machine memory page will directly affect the downtime. When a virtual machine based on secure virtualization technology is migrated, the downtime will also increase significantly because the virtual machine's memory page needs to be processed by the security processor.
[0068] Figure 1 This is a flow chart of a method for migrating virtual machine memory data according to an embodiment of the present application, which is applied to a sending end, that is, applied to a virtual machine migration sending end. The method may include the following steps:
[0069] S100: Put the memory page information of the virtual machine to be migrated into the memory page information table.
[0070] A virtual machine memory page is a block (called a page frame) on the host machine's physical memory. A virtual machine memory page is a page frame on the host machine's physical memory. A virtual machine memory page may correspond to a piece of virtual machine memory page information. The virtual machine memory page information may be in the form of an array or a list.
[0071] Each piece of virtual machine memory page information may include a physical memory address, a corresponding physical memory length, and an indication of whether the data in the memory page has been modified (e.g., a flag bit 1 may be used to indicate that the data in the memory page has been modified, and a flag bit 0 may be used to indicate that the data in the memory page has not been modified). If a piece of virtual machine memory page information contains an indication that the data in the memory page has been modified, it indicates that the piece of virtual machine memory page information is the virtual machine memory page information that needs to be migrated (moved out).
[0072] The virtual machine memory page information may be stored in a memory controller (also referred to as a memory manager). The sending end virtual machine monitor may obtain the virtual machine memory page information that needs to be migrated by scanning the virtual machine memory page information in the sending end memory controller.
[0073] In the first round of migration, since all memory page data needs to be sent, each piece of virtual machine memory page information is the virtual machine memory page information that needs to be migrated.
[0074] When it is not the first round of migration, only the dirty page memory data written by the VM in the previous round of pre-copying needs to be sent. Therefore, only part of the virtual machine memory page information may be the virtual machine memory page information that needs to be migrated.
[0075] The sending end virtual machine monitor puts the acquired virtual machine memory page information that needs to be migrated into the memory page information table. The memory page information table can be referred to as an information table or table. The memory page information table can include multiple items, and each item can be stored in sequence in the memory page information table. Each item can correspond to at least one virtual machine memory page information that needs to be migrated. The memory page information table can be in the form of an array, a list, or a linked list. Figure 2 Schematic diagram of the structure of a memory page information table in one embodiment of the present application.
[0076] S102: Send the memory page information table to the main security processor.
[0077] In this embodiment, the platform based on security virtualization has multiple security processors, and there is a master-slave relationship between the multiple security processors; one of the security processors is a master security processor used to manage other security processors; the other security processors are called slave security processors.
[0078] The sending end virtual machine monitor, after putting the memory page information of the virtual machine to be migrated into the memory page information table, sends the memory page information table to the main security processor.
[0079] S104: Divide the memory page information table into two or more memory page information table segments, and send different memory page information table segments to different slave security processors.
[0080] The sending end main security processor can dynamically segment the memory page information table according to the number of local main security processors and slave security processors. In an example, the number of memory page information table segments divided by the sending end main security processor is less than or equal to the sum of the number of local main security processors and slave security processors.
[0081] In some cases, not all slave security processors may be in an idle state. Therefore, in some embodiments, the main security processor at the sending end may also dynamically segment the memory page information table according to the number of local main security processors and currently idle slave security processors. Specifically, the main security processor at the sending end may divide the memory page information table into more than two memory page information table segments according to the number of local main security processors and currently idle slave security processors; the number of the more than two memory page information table segments is less than or equal to the sum of the number of local main security processors at the sending end and the currently idle slave security processors. In one example, the number of memory page information table segments divided by the main security processor at the sending end is equal to the number of local main security processors and currently idle slave security processors, so as to maximize the utilization of local main security processors and currently idle slave security processors and improve the efficiency of data processing.
[0082] The sending end main security processor can determine the local currently idle slave security processor by querying the idle flag bit of the slave security processor. The sending end main security processor can also determine the local currently idle slave security processor by receiving the idle interrupt signal sent by the local slave security processor.
[0083] After the sending end master security processor divides the memory page information table into two or more memory page information table segments, the different memory page information table segments are sent to different local slave security processors that are currently idle.
[0084] In a specific example, for a memory page information table containing 30 items, the sending end main security processor determines that the number of local slave security processors that are currently idle is 3 by querying the idle flag bit of the local slave security processor (if it is 0, it means idle), that is, the slave security processors C1, C2 and C3 are in idle state. Based on this, the sending end main security processor divides the memory page information table into at least 3 sub-segments, namely segment D1, segment D2 and segment D3, and sends segment D1 to slave security processor C1 for processing, sends segment D2 to slave security processor C2 for processing, and sends segment D3 to slave security processor C3 for processing.
[0085] Since the data size of different virtual machine memory pages may be different, or the processing speed of different slave security processors may be different, when different slave security processors process different virtual machine memory page data, some slave security processors may complete the processing first and be in an idle state in advance. In order to adapt to this situation and further improve the data processing efficiency, in some embodiments, for the same memory page information table, the main security processor of the sending end may perform two segmentation processes. Specifically, the main security processor of the sending end may first divide the memory page information table into a first basic segment and a second basic segment. The number of items included in the first basic segment may be greater than the number of items included in the second basic segment, and the two may be in a certain multiple or proportional relationship. In one example, the ratio of the number of items included in the first basic segment to the number of items included in the second basic segment may be 5:1, in another example, the ratio of the number of items included in the first basic segment to the number of items included in the second basic segment may be 3:1, and in another example, the ratio of the number of items included in the first basic segment to the number of items included in the second basic segment may be 2:1.
[0086] After the main security processor at the sending end divides the memory page information table into the first basic segment and the second basic segment, the first basic segment can be divided into two or more first sub-segments according to the number of the main security processor and the currently idle slave security processors in the local area, and different first sub-segments are sent to different slave security processors that are currently idle in the local area. Among them, the number of first sub-segments is less than or equal to the sum of the number of the main security processor and the currently idle slave security processors. In one example, the number of first sub-segments divided by the main security processor is equal to the sum of the number of the local main security processor and the currently idle slave security processors, so as to maximize the use of the local main security processor and the currently idle slave security processors, and improve the efficiency of data processing.
[0087] After the main security processor at the transmitting end sends two or more first sub-segments to different local slave security processors respectively, while waiting for these slave security processors to process data, it can determine the number of slave security processors that are idle at the next moment, that is, determine the number of slave security processors that are idle in advance among the above slave security processors at the next moment, and divide the second basic segment into two or more second sub-segments according to the number of slave security processors that are idle at the next moment, and send different second sub-segments to different slave security processors that are idle at the next moment. The number of second sub-segments is less than or equal to the number of slave security processors that are idle at the next moment. In one example, the number of second sub-segments divided by the main security processor at the transmitting end is equal to the number of slave security processors that are idle at the next moment locally, so as to maximize the use of the slave security processors that are idle at the next moment locally, and further improve the efficiency of data processing.
[0088] In a specific example, for a memory page information table containing 50 items, the main security processor at the sending end first divides the memory page information table into a first basic segment D1 (containing 40 items) and a second basic segment D2 (containing 10 items). The main security processor at the sending end determines that the number of slave security processors in the local idle state at the current moment is 5 by querying the idle flag bit of the local slave security processor (if it is 0, it means idle), that is, the slave security processors C1, C2, C3, C4 and C5 are in the idle state, and the main security processor at the sending end divides the first basic segment D1 into at least 5 first sub-segments, namely, segment D11, segment D12, segment D13, segment D14 and segment D15, and sends segment D11 to the slave security processor C1 for processing, sends segment D12 to the slave security processor C2 for processing, sends segment D13 to the slave security processor C3 for processing, sends segment D14 to the slave security processor C4 for processing, and sends segment D15 to the slave security processor C5 for processing.
[0089] While waiting for the slave security processors C1, C2, C3, C4 and C5 to process data, the main security processor at the sending end determines that the idle slave security processors at the next moment are C1 and C3 (indicating that C1 and C3 are idle before C2, C4 and C5). Based on this, the main security processor at the sending end divides the second basic segment D2 into at least two second sub-segments, namely, segment D21 and segment D22, and sends segment D21 to the slave security processor C1 for processing, and sends segment D22 to the slave security processor C3 for processing. In this way, the idle slave security processors at the next moment can be utilized to the maximum extent, further improving the efficiency of data processing.
[0090] S106. Each slave security processor reads the virtual machine memory data according to the received memory page information table segment, and processes the read virtual machine memory data and sends it to the master security processor.
[0091] Each slave security processor reads the virtual machine memory data according to the physical memory address and the physical memory length recorded in the received memory page information table segment, and processes the read virtual machine memory data.
[0092] In some implementations, each slave security processor may encrypt the read virtual machine memory data. Specifically, a symmetric encryption algorithm (such as DES, 3DES or AES) may be used for symmetric encryption, or an asymmetric encryption algorithm (such as RSA, ECC or other algorithms) may be used for asymmetric encryption.
[0093] In some implementations, each slave security processor may generate integrity check data in addition to encrypting the read virtual machine memory data to prevent data tampering. In one example, each slave security processor may generate a message digest using a hash algorithm (MD5, SHA1, etc.).
[0094] In some embodiments, after each slave security processor encrypts the read virtual machine memory data or encrypts and generates integrity verification data, the encrypted virtual machine memory data and / or the generated integrity verification data may also be compressed to save network traffic consumed during data transmission.
[0095] In some embodiments, when the main security processor divides the memory page information table into two or more memory page information table segments and sends different memory page information table segments to different slave security processors, the main security processor itself can retain a memory page information table segment, that is, the main security processor itself can also process the memory page information table segment. Specifically, after the main security processor sends different memory page information table segments to different slave security processors, the main security processor can read the virtual machine memory data according to the memory page information table segments retained by itself during the processing by the slave security processor, and process the read virtual machine memory data. In this way, the main security processor and the slave security processor can process the memory page information table segments in parallel to improve processing efficiency.
[0096] The sending end may have multiple cryptographic coprocessors locally, which may be integrated inside the security processor or located outside the security processor. In some embodiments, in order to improve data processing efficiency, each slave security processor may send the read virtual machine memory data to the local cryptographic coprocessor for processing.
[0097] Each slave security processor processes the read virtual machine memory data and sends it to the sending end master security processor.
[0098] S108: Send the processed virtual machine memory data and migration information to the target machine to migrate the virtual machine memory data.
[0099] The main security processor sends the processed virtual machine memory data to the sending end virtual machine monitor, and the sent end virtual machine monitor sends the processed virtual machine memory data and migration information to the target machine to migrate the virtual machine memory data.
[0100] The migration information may include the virtual machine memory page information or the memory page information table that needs to be migrated. In order to facilitate the receiver to perform integrity check on the received virtual machine memory data, the migration information may also include integrity check data.
[0101] According to the above steps S100-S108, migration of at least part of the virtual machine memory data can be achieved. If there is still dirty page memory data to be migrated after performing a round of migration according to the above steps S100-S108, the above steps S100-S108 can be repeatedly performed until the migration end condition is met. The migration end condition can be that the number of dirty pages remaining in the next round is estimated to be lower than a predetermined threshold value (such as lower than 3) based on the number of dirty pages migrated in the most recent rounds (such as the most recent three rounds), or the number of migration cycles reaches a predetermined threshold value (such as 30 times).
[0102] The virtual machine memory page information table records a certain number of memory page information. The memory page data corresponding to these memory page information needs to be processed by the security processor (such as decryption) before it can be sent to the virtual machine migration receiving end. In the virtual machine memory data migration method of this embodiment, the virtual machine migration sending end can use the virtual machine memory page information table to send the memory page information that needs to be migrated to the main security processor for processing in batches, rather than processing one page at a time, which can provide processing efficiency. In addition, in this application, there is a master-slave relationship between multiple security processors, and the main security processor is used to manage the slave security processor; after the virtual machine monitor sends the memory page information table to the main security processor, the main security processor can segment a memory page information table and dispatch it to multiple slave security processors to realize concurrent processing of multiple pages of memory, reduce the interaction time between the virtual machine monitor and the security processor, improve migration efficiency, reduce migration time overhead, and reduce downtime; in addition, when multiple slave security processors concurrently process multiple pages of memory, the main security processor can also process the memory page information table segments in parallel, further improve data processing efficiency, reduce the interaction time between the virtual machine monitor and the security processor, and improve migration efficiency.
[0103] Figure 3 This is a flowchart of a virtual machine memory data migration method according to another embodiment of the present application. Figure 3 , this embodiment and Figure 1 The embodiments shown are basically the same, except that, in this embodiment, after the virtual machine monitor puts the virtual machine memory page information that needs to be migrated into the memory page information table, the method may further include the steps of:
[0104] S101. Determine whether the number of items in the memory page information table reaches a threshold.
[0105] The virtual machine monitor determines whether the number of items in the memory page information table reaches a threshold value, and if the number of items in the memory page information table reaches the threshold value, sends the memory page information table to the main security processor.
[0106] As mentioned above, for memory parts that are updated very quickly, memory pages may become dirty during each loop process, requiring repeated pre-copying, which also results in a large number of loops and a longer migration time. In this regard, the present application uses a threshold to centrally control the number of items in the memory page information table, that is, the number of dirty pages in a loop is centrally controlled by the threshold, so that a certain number of dirty pages can be centrally transmitted in a loop, which can effectively reduce the number of loops and shorten the migration time.
[0107] The threshold value may be predetermined as a fixed value. Specifically, it may be determined according to the processing capability of the security processor and the processing capability of the virtual machine monitor. For example, when the threshold value increases to a certain value, the performance is no longer significantly improved, and this value may be used as the threshold value. For example, it may be 30, 40, 45 or 50.
[0108] In some implementations, the threshold value may also be determined by the virtual machine monitor of the transmitting end and the virtual machine monitor of the receiving end in a negotiation manner. For example, the minimum value of the processing capacity (e.g., the amount of data processed per second) of the security processor and the virtual machine monitor of the transmitting end and the receiving end may be taken as the threshold value. The threshold value may also be determined by dynamic negotiation during the data processing process to fully utilize the processing capacity of the security processor and the virtual machine monitor.
[0109] In some implementations, the threshold value may also be determined based on the migration network state. In one example, a range may be determined based on the processing capabilities (including maximum processing capabilities and minimum processing capabilities) of the security processor and virtual machine monitor at the transmitting or receiving end. When the network state is good and the speed of data transmission exceeds the processing capability, the value of the maximum processing capability is taken as the threshold value. When the network state is not good and the speed of data transmission is lower than the processing capability, a value close to the minimum processing capability is taken as the threshold value (not lower than the minimum processing capability).
[0110] The following uses an embodiment as an example to illustrate a virtual machine memory data migration method applied to a virtual machine migration sending end.
[0111] Figure 4 This is a flowchart of a virtual machine memory data migration method according to another embodiment of the present application. Figure 4 The virtual machine memory data migration method of this embodiment may include the following steps:
[0112] S300: Obtain memory page information of the virtual machine that needs to be migrated.
[0113] After the migration begins, the virtual machine monitor at the sending end continuously obtains the memory page information of the virtual machine that needs to be migrated.
[0114] S302: Put the memory page information into the virtual machine memory page information table.
[0115] The virtual machine monitor at the sending end puts the acquired virtual machine memory page information that needs to be migrated into the virtual machine memory page information table until the number of items in the memory page information table reaches a certain threshold.
[0116] S304: Determine whether the number of items in the memory page information table reaches a threshold.
[0117] The sending end virtual machine monitor puts the acquired virtual machine memory page information to be migrated into the virtual machine memory page information table, and determines whether the number of items in the memory page information table reaches a threshold. If the number of items in the memory page information table reaches the threshold, step S306 is executed, otherwise step S300 is executed.
[0118] S306: Submit the memory page information table to the main security processor for processing.
[0119] After the number of items in the memory page information table reaches a threshold, the sending virtual machine monitor submits the memory page information table to the main security processor for processing.
[0120] S308. Obtain a memory page information table and the number of slave security processors.
[0121] S310, segmenting the memory page information table according to the number of master security processors and slave security processors.
[0122] The master security processor segments the memory page information table according to the number of the master security processors and the slave security processors to obtain more than two memory page information table segments. The number of the more than two memory page information table segments may be equal to the number of the master security processors and the slave security processors.
[0123] S312: Send the memory page information table segment allocated to the slave security processor to the corresponding slave security processor.
[0124] After the main security processor segments the memory page information table, the memory page information table segments obtained after segmentation can be divided, with part of it being processed by the slave security processor and part (which can be one segment) being processed by the main security processor itself.
[0125] S314, obtain the memory page information table segment and start processing.
[0126] Each slave security processor obtains and processes the corresponding memory data according to the memory page information table segment sent by the master security processor. Specifically, each slave security processor can encrypt the read virtual machine memory data. In addition to encryption, integrity check data can also be generated to prevent data from being tampered with.
[0127] S316: Process the memory page information table segment allocated to the main security processor.
[0128] The main security processor sends the memory page information table segment allocated to the slave security processor to the corresponding slave security processor, and then processes the memory page information table segment allocated to itself, that is, according to the memory page information table segment allocated to itself, obtains the corresponding memory data and processes it. Specifically, the main security processor can encrypt the read virtual machine memory data. In addition to encryption processing, integrity verification data can also be generated to prevent data tampering.
[0129] S318. After the processing is completed, notify the main security processor.
[0130] After each slave security processor completes processing of the corresponding memory data, it notifies the master security processor.
[0131] S320, waiting for all slave security processors to complete processing.
[0132] S322: Return the result and wait for the next interaction request.
[0133] After the main security processor and the slave security processor process the read memory data, the main security processor returns the result to the virtual machine monitor and waits for the next interaction request.
[0134] S324, receiving the result returned by the main security processor, and sending the result and related information.
[0135] The sending end virtual machine monitor, after waiting for all security processors to complete processing, receives the processing result returned by the main security processor, and sends the processing result and related information (migration information) to the receiving end virtual machine monitor.
[0136] S326: Determine whether the migration termination condition is met.
[0137] After the virtual machine monitor at the sending end sends the processed virtual machine memory data and migration information to the receiving end, it determines whether the conditions for ending the migration are met. If so, the virtual machine at the sending end is shut down to prevent the generation of new dirty pages, and the memory data of the remaining dirty pages is processed through the above process steps, and the migration process is ended. Otherwise, step S300 is executed.
[0138] The migration information may include the memory page information of the virtual machine to be migrated or the memory page information table. In order to facilitate the receiver to perform integrity check on the received virtual machine memory data, the migration information may also include integrity check data.
[0139] In the virtual machine memory data migration method of this embodiment, the main security processor and multiple slave security processors process memory data concurrently, which can improve data processing efficiency, reduce the interaction time between the virtual machine monitor and the security processor, improve migration efficiency, reduce migration time overhead, and reduce downtime.
[0140] Figure 5 This is a flow chart of a method for migrating virtual machine memory data according to an embodiment of the present application, which is applied to a receiving end, that is, applied to a receiving end of virtual machine migration. Figure 5 , the method may include the following steps:
[0141] S400: Receive memory data and memory page information of a virtual machine to be migrated.
[0142] The receiving end virtual machine monitor receives the virtual machine memory data to be migrated and migration information from the sending end virtual machine monitor, wherein the migration information includes memory page information of the virtual machine memory data to be migrated.
[0143] S402: Put the memory page information into a memory page information table.
[0144] The receiving end virtual machine monitor puts the memory page information into a memory page information table. The memory page information table may be referred to as an information table or table. The memory page information table may include multiple items, and each item may be stored in sequence in the memory page information table. Each item may correspond to at least one virtual machine memory page information. The memory page information table may be in the form of an array, a list, or a linked list.
[0145] S404: Send the memory page information table to the main security processor.
[0146] S406: Divide the memory page information table into two or more memory page information table segments, and send different memory page information table segments to different slave security processors.
[0147] The receiving end main security processor can dynamically segment the memory page information table according to the number of local main security processors and slave security processors. In an example, the number of memory page information table segments divided by the receiving end main security processor is less than or equal to the sum of the number of local main security processors and slave security processors.
[0148] In some cases, not all slave security processors may be idle. Therefore, in some embodiments, the receiving end master security processor may also dynamically segment the memory page information table according to the number of local master security processors and slave security processors that are idle at the current moment. Specifically, the receiving end master security processor may divide the memory page information table into two or more memory page information table segments according to the number of local master security processors and slave security processors that are idle at the current moment; the number of the two or more memory page information table segments is less than or equal to the sum of the number of local master security processors at the receiving end and the number of slave security processors that are currently idle. In one example, the number of divided memory page information table segments is equal to the number of local master security processors and slave security processors that are idle at the current moment, so as to maximize the use of local master security processors and security processors that are idle at the current moment and improve the efficiency of data processing.
[0149] The receiving end master security processor can determine the currently idle slave security processor by querying the idle flag of the local slave security processor, or can determine the currently idle slave security processor locally by receiving an idle interrupt signal sent by the local slave security processor.
[0150] The receiving end main security processor divides the memory page information table into two or more memory page information table segments, and then sends different memory page information table segments to different local slave security processors that are currently idle.
[0151] In a specific example, for a memory page information table containing 30 items, the receiving end main security processor determines that the number of local slave security processors that are idle at the current moment is 3 by querying the idle flag bit of the local slave security processor (if it is 0, it means idle), that is, the slave security processors C1', C2' and C3' are in idle state. Based on this, the receiving end main security processor divides the memory page information table into at least 3 sub-segments, namely, segment D1', segment D2' and segment D3', and sends segment D1' to slave security processor C1' for processing, sends segment D2' to slave security processor C2' for processing, and sends segment D3' to slave security processor C3' for processing.
[0152] Since the data size of different virtual machine memory pages may be different, or the processing speed of different slave security processors may be different, when different slave security processors process different virtual machine memory page data, some slave security processors may complete the processing first and be idle in advance. In order to adapt to this situation and further improve the data processing efficiency, in some embodiments, for the same memory page information table, the receiving end main security processor may perform two segmentation processes. Specifically, the receiving end main security processor may first divide the memory page information table into a first basic segment and a second basic segment. The number of items included in the first basic segment may be greater than the number of items included in the second basic segment, and the two may be in a certain multiple or proportional relationship. In one example, the ratio of the number of items included in the first basic segment to the number of items included in the second basic segment may be 5:1, in another example, the ratio of the number of items included in the first basic segment to the number of items included in the second basic segment may be 3:1, and in another example, the ratio of the number of items included in the first basic segment to the number of items included in the second basic segment may be 2:1.
[0153] After the receiving end main security processor divides the memory page information table into the first basic segment and the second basic segment, the first basic segment can be divided into two or more first sub-segments according to the number of the main security processor and the idle slave security processors at the current moment, and different first sub-segments are sent to different idle slave security processors at the current moment. The number of first sub-segments is less than or equal to the sum of the number of the main security processor and the idle security processors at the current moment. In one example, the number of first sub-segments divided by the receiving end main security processor is equal to the number of the main security processor and the idle security processors at the current moment, so as to maximize the use of the main security processor and the idle security processors at the current moment and improve the efficiency of data processing.
[0154] After the receiving end main security processor sends two or more first sub-segments to different slave security processors respectively, it can determine the number of slave security processors that are idle at the next moment while waiting for these slave security processors to process data, that is, determine the number of slave security processors that are idle in advance among the above slave security processors at the next moment, and divide the second basic segment into two or more second sub-segments according to the number of slave security processors that are idle at the next moment, and send different second sub-segments to different slave security processors that are idle at the next moment. The number of second sub-segments is less than or equal to the number of slave security processors that are idle at the next moment. In one example, the number of second sub-segments divided by the receiving end main security processor is equal to the number of slave security processors that are idle at the next moment, so as to maximize the use of slave security processors that are idle at the next moment and further improve the efficiency of data processing.
[0155] In a specific example, for a memory page information table containing 50 items, the receiving end main security processor first divides the memory page information table into a first basic segment D1' (containing 40 items) and a second basic segment D2' (containing 10 items). The receiving end master security processor determines that the number of local slave security processors that are currently idle is 5 by querying the idle flag bit of the local slave security processor (if it is 0, it means idle), that is, the slave security processors C1', C2', C3', C4' and C5' are in idle state. Based on this, the master security processor divides the first basic segment D1' into at least 5 first sub-segments, namely, segment D11', segment D12', segment D13', segment D14' and segment D15', and sends segment D11' to the slave security processor C1' for processing, sends segment D12' to the slave security processor C2' for processing, sends segment D13' to the slave security processor C3' for processing, sends segment D14' to the slave security processor C4' for processing, and sends segment D15' to the slave security processor C5' for processing.
[0156] While waiting for the slave security processors C1', C2', C3', C4' and C5' to process data, the receiving end main security processor determines that the idle slave security processors at the next moment are C1' and C3' (indicating that C1' and C3' are idle before C2', C4' and C5'). Based on this, the receiving end main security processor divides the second basic segment D2' into at least two second sub-segments, namely, segment D21' and segment D22', sends segment D21' to the slave security processor C1' for processing, and sends segment D22' to the slave security processor C3' for processing. In this way, the idle local security processors at the next moment can be utilized to the maximum extent, further improving the efficiency of data processing.
[0157] S408. Each slave security processor reads the virtual machine memory data that needs to be migrated according to the received memory page information table segment, and processes the read virtual machine memory data that needs to be migrated and sends it to the master security processor.
[0158] After receiving the memory data to be migrated from the sending virtual machine monitor, the receiving virtual machine monitor can cache the data. Each local security processor at the receiving end can read the virtual machine memory data to be migrated from the data cached by the receiving virtual machine monitor according to the received memory page information table segment.
[0159] In some implementations, each local slave security processor at the receiving end may decrypt the read virtual machine memory data that needs to be migrated.
[0160] In some implementations, each local slave security processor at the receiving end may decrypt the read virtual machine memory data to be migrated, and may also perform integrity verification on the virtual machine memory data to be migrated based on the integrity verification data to prevent the data from being tampered with.
[0161] In some embodiments, if the memory data to be migrated received by the receiving-end virtual machine monitor from the sending-end virtual machine monitor is compressed data, then each local slave security processor at the receiving end needs to decompress the read virtual machine memory data to be migrated, and / or decompress the integrity verification information before decrypting the read virtual machine memory data to be migrated, or before decrypting and verifying the integrity; wherein the integrity verification information may be included in the migration information.
[0162] In some embodiments, when the main security processor divides the memory page information table into two or more memory page information table segments and sends different memory page information table segments to different slave security processors, the main security processor itself can retain a memory page information table segment, that is, the main security processor itself can also process the memory page information table segment. Specifically, after the main security processor sends different memory page information table segments to different slave security processors, the main security processor can read the virtual machine memory data according to the memory page information table segments retained by itself during the processing by the slave security processor, and process the read virtual machine memory data. In this way, the main security processor and the slave security processor can process the memory page information table segments in parallel to improve processing efficiency.
[0163] The receiving end may have multiple cryptographic coprocessors locally, which may be integrated inside the security processor or located outside the security processor. In some embodiments, in order to improve data processing efficiency, each local slave security processor at the receiving end may send the read virtual machine memory data to the local cryptographic coprocessor for processing.
[0164] Each local slave security processor at the receiving end processes the read virtual machine memory data and sends it to the master security processor, which writes it into the virtual machine memory through the master security processor. Specifically, each local slave security processor at the receiving end processes the read virtual machine memory data and sends it to the master security processor, which writes it into the virtual machine memory of the receiving end through the memory controller at the receiving end. When the memory controller at the receiving end writes the memory data processed by the local security processor at the receiving end into the virtual machine memory of the receiving end, it is necessary to use an encryption algorithm to encrypt the memory data to be written.
[0165] In some embodiments, each local slave security processor at the receiving end processes the read virtual machine memory data and sends it to the master security processor. The master security processor may also return the processing results to the receiving end virtual machine monitor, which writes the processing results to the receiving end virtual machine memory through the receiving end's memory controller.
[0166] Figure 6 This is a flowchart of a virtual machine memory data migration method according to another embodiment of the present application. Figure 6 , this embodiment and Figure 5 The embodiments shown are basically the same, except that, in this embodiment, after the memory page information of the virtual machine to be migrated is put into the memory page information table, the method may further include:
[0167] S403: Determine whether the number of items in the memory page information table reaches a threshold.
[0168] If the number of items in the memory page information table reaches the threshold, the step of dividing the memory page information table into two or more memory page information table segments is executed, otherwise step S400 is executed.
[0169] In the present application, a threshold is used to centrally control the number of items in the memory page information table, that is, the number of dirty pages in a cycle is centrally controlled by the threshold, and a certain number of dirty pages can be centrally transmitted in a cycle. In this way, the number of cycles can be effectively reduced and the migration time can be shortened.
[0170] The threshold value can be determined by Figure 3 The method for determining the threshold in the illustrated embodiment will not be described in detail here.
[0171] Figure 7 This is a flowchart of a virtual machine memory data migration method according to another embodiment of the present application. Figure 7 , this embodiment and Figure 5 The embodiments shown are basically the same, except that, in this embodiment, the migration information includes a memory page information table of the virtual machine memory data to be migrated, that is, the receiving end virtual machine monitor can directly receive the memory page information table of the virtual machine memory data to be migrated from the sending end virtual machine monitor, and then, the memory page information table can be directly sent to the main security processor. Specifically, the migration method of this embodiment may include the following steps:
[0172] S400': Receive memory data and a memory page information table of a virtual machine to be migrated.
[0173] The receiving end virtual machine monitor receives the virtual machine memory data to be migrated and migration information from the sending end virtual machine monitor, wherein the migration information includes a memory page information table of the virtual machine memory data to be migrated.
[0174] S402', sending the memory page information table to the main security processor.
[0175] S404', dividing the memory page information table into two or more memory page information table segments, and sending different memory page information table segments to different slave security processors.
[0176] The master security processor divides the memory page information table into two or more memory page information table segments, and sends different memory page information table segments to different slave security processors.
[0177] S406', each slave security processor reads the virtual machine memory data to be migrated according to the received memory page information table segment, and processes the read virtual machine memory data to be migrated and sends it to the master security processor.
[0178] In this embodiment, the receiving end virtual machine monitor can directly receive the memory page information table of the virtual machine memory data to be migrated from the sending end virtual machine monitor, which can save the process of the receiving end virtual machine monitor collecting memory page information to form a memory page information table, thereby improving the migration efficiency.
[0179] The following uses an embodiment as an example to illustrate a method for migrating virtual machine memory data applied to a virtual machine migration receiving end.
[0180] Figure 8 This is a flowchart of a virtual machine memory data migration method according to another embodiment of the present application. Figure 8 The virtual machine memory data migration method of this embodiment is used at the receiving end and may include the following steps:
[0181] S500: Receive memory page data and memory page information of a virtual machine to be migrated.
[0182] After the migration starts, the receiving-end virtual machine monitor receives the memory page data and memory page information of the virtual machine to be migrated from the sending-end virtual machine monitor.
[0183] S502: Put the memory page information into the memory page information table.
[0184] The receiving end virtual machine monitor puts the received memory page information into the virtual machine memory page information table until the number of items in the memory page information table reaches a certain threshold.
[0185] S504: Determine whether the number of items in the memory page information table reaches a threshold.
[0186] The receiving end virtual machine monitor puts the virtual machine memory page information to be migrated into the virtual machine memory page information table and determines whether the number of items in the memory page information table reaches a threshold. If the number of items in the memory page information table reaches the threshold, step S506 is executed, otherwise step S500 is executed.
[0187] S506: Submit the memory page information table to the main security processor for processing.
[0188] The receiving end virtual machine monitor submits the memory page information table to the main security processor for processing, and waits for the main security processor to return the processing result.
[0189] S508: Obtain a memory page information table and the number of slave security processors.
[0190] S510: Segment the memory page information table according to the number of master security processors and slave security processors.
[0191] The master security processor segments the memory page information table according to the number of the master security processors and the slave security processors to obtain more than two memory page information table segments. The number of the more than two memory page information table segments may be equal to the number of the master security processors and the slave security processors.
[0192] S512: Send the memory page information table segment allocated to the slave security processor to the corresponding slave security processor.
[0193] After the main security processor segments the memory page information table, the memory page information table segments obtained after segmentation can be divided, with part of it being processed by the slave security processor and part (which can be one segment) being processed by the main security processor itself.
[0194] S514: Get the memory page information table segment and start processing.
[0195] Each slave security processor obtains and processes the corresponding memory data according to the memory page information table segment sent by the master security processor. Specifically, each slave security processor can encrypt the read virtual machine memory data. In addition to encryption, integrity check data can also be generated to prevent data from being tampered with.
[0196] S516: Process the memory page information table segment allocated to the main security processor.
[0197] The main security processor sends the memory page information table segment allocated to the slave security processor to the corresponding slave security processor, and then processes the memory page information table segment allocated to itself, that is, according to the memory page information table segment allocated to itself, obtains the corresponding memory data and processes it. Specifically, the main security processor can encrypt the read virtual machine memory data. In addition to encryption processing, integrity verification data can also be generated to prevent data tampering.
[0198] S518. After the processing is completed, notify the main security processor.
[0199] After each slave security processor completes processing of the corresponding memory data, it notifies the master security processor.
[0200] S520, waiting for all slave security processors to complete processing.
[0201] S522: Return the result and wait for the next interaction request.
[0202] After the main security processor and the slave security processor process the read memory data, the main security processor returns the result to the virtual machine monitor and waits for the next interaction request.
[0203] S524: Receive and process the result returned by the security processor.
[0204] The virtual machine monitor at the receiving end writes the processed memory data returned by all local security processors into the virtual machine memory at the receiving end through the memory controller at the receiving end.
[0205] S526: Determine whether the migration end condition is met.
[0206] The receiving end virtual machine monitor determines whether the migration end condition is met, and if so, the migration process ends, otherwise, step 500 is executed. The migration reception condition may be that the receiving end virtual machine monitor receives a migration end notification message sent by the sending end virtual machine monitor.
[0207] Fig. 9 This is a flowchart of a virtual machine memory data migration method according to another embodiment of the present application. Fig. 9 , the virtual machine memory data migration method of this embodiment, and Figure 8 The methods of the embodiments shown are basically the same, except that, in this embodiment, the receiving end virtual machine monitor can directly receive the memory page information table of the virtual machine memory data to be migrated from the sending end virtual machine monitor, and directly send the memory page information table to the main security processor. Specifically, the migration method of this embodiment can include the following steps:
[0208] S500', receiving the memory page data and memory page information table of the virtual machine to be migrated.
[0209] After the migration starts, the receiving end virtual machine monitor receives the virtual machine memory page data and the memory page information table to be migrated from the sending end virtual machine monitor.
[0210] S502', submit the memory page information table to the main security processor for processing.
[0211] The receiving end virtual machine monitor submits the memory page information table to the main security processor for processing, and waits for the main security processor to return the processing result.
[0212] S504', obtain the memory page information table and the number of slave security processors.
[0213] S506′, segment the memory page information table according to the number of master security processors and slave security processors.
[0214] The master security processor segments the memory page information table according to the number of the master security processors and the slave security processors to obtain more than two memory page information table segments. The number of the more than two memory page information table segments may be equal to the number of the master security processors and the slave security processors.
[0215] S508′, sending the memory page information table segment allocated to the slave security processor to the corresponding slave security processor.
[0216] After the main security processor segments the memory page information table, the memory page information table segments obtained after segmentation can be divided, with part of it being processed by the slave security processor and part (which can be one segment) being processed by the main security processor itself.
[0217] S510', obtain the memory page information table segment and start processing.
[0218] Each slave security processor obtains and processes the corresponding memory data according to the memory page information table segment sent by the master security processor. Specifically, each slave security processor can encrypt the read virtual machine memory data. In addition to encryption, integrity check data can also be generated to prevent data from being tampered with.
[0219] S512', process the memory page information table segment allocated to the main security processor.
[0220] The main security processor sends the memory page information table segment allocated to the slave security processor to the corresponding slave security processor, and then processes the memory page information table segment allocated to itself, that is, according to the memory page information table segment allocated to itself, obtains the corresponding memory data and processes it. Specifically, the main security processor can encrypt the read virtual machine memory data. In addition to encryption processing, integrity verification data can also be generated to prevent data tampering.
[0221] S514', notify the main security processor after the processing is completed.
[0222] After each slave security processor completes processing of the corresponding memory data, it notifies the master security processor.
[0223] S516', wait for all slave security processors to complete processing.
[0224] S518', return the result and wait for the next interaction request.
[0225] After the main security processor and the slave security processor process the read memory data, the main security processor returns the result to the virtual machine monitor and waits for the next interaction request.
[0226] S520', receiving and processing the result returned by the security processor.
[0227] The virtual machine monitor at the receiving end writes the processed memory data returned by all local security processors into the virtual machine memory at the receiving end through the memory controller at the receiving end.
[0228] S522', determine whether the migration end condition is met.
[0229] The receiving end virtual machine monitor determines whether the migration end condition is met, and if so, the migration process ends, otherwise, step 500' is executed. The migration reception condition may be that the receiving end virtual machine monitor receives a migration end notification message sent by the sending end virtual machine monitor.
[0230] In this embodiment, the receiving end virtual machine monitor can directly receive the memory page information table of the virtual machine memory data to be migrated from the sending end virtual machine monitor, which can save the process of the receiving end virtual machine monitor collecting memory page information to form a memory page information table, thereby improving the migration efficiency.
[0231] Fig.10 This is a block diagram of a CPU chip according to an embodiment of the present application. Fig.10The CPU chip 10 of the embodiment of the present application includes: a processor core 14, a main security processor 16 and a slave security processor 18; wherein the processor core 14 is used to run a virtual machine monitor to put the virtual machine memory page information that needs to be migrated into a memory page information table through the virtual machine monitor; the memory page information table is sent to the main security processor 16; the main security processor 16 is electrically connected to the processing core, and is used to divide the memory page information table into two or more memory page information table segments, and send different memory page information table segments to different slave security processors 18; the number of the slave security processors 18 is more than two The processor core 14 is further configured to be configured to include three, four or five processors, which are electrically connected to the main security processor 16 respectively, and are used to read the virtual machine memory data according to the received memory page information table segment, and process the read virtual machine memory data and send it to the main security processor 16, so that the main security processor 16 sends the processed virtual machine memory data to the virtual machine monitor; the processor core 14 is also used to send the processed virtual machine memory data and migration information to the target machine through the virtual machine monitor to migrate the virtual machine memory data, wherein the migration information includes the virtual machine memory page information to be migrated or the memory page information table.
[0232] The processor core and the security processor may use processors of the same architecture, such as both may use processors of the X86 architecture, or may use processors of different architectures, such as the processor core uses an X86 architecture processor and the security processor uses an ARM architecture processor.
[0233] The CPU chip of this embodiment can be used to execute Figure 1 The technical solution of the method embodiment shown has similar implementation principles and technical effects, which will not be repeated here.
[0234] In some embodiments, the processor core 14 is also used to: determine through the virtual machine monitor whether the number of items in the memory page information table reaches a threshold, and if the number of items in the memory page information table reaches the threshold, send the memory page information table to the main security processor 16; an item in the memory page information table corresponds to at least one virtual machine memory page information that needs to be migrated.
[0235] The CPU chip of this embodiment can be used to execute Figure 3 The technical solution of the method embodiment shown has similar implementation principles and technical effects, which will not be repeated here.
[0236] In some embodiments, the main security processor 16 is specifically used to: divide the memory page information table into two or more memory page information table segments according to the number of slave security processors 18 of the main security processor 16; the number of the more than two memory page information table segments is less than or equal to the sum of the number of main security processors 16 and slave security processors 18.
[0237] In some embodiments, the main security processor 16 is also used to: divide the memory page information table into a first basic segment and a second basic segment; divide the first basic segment into two or more first sub-segments according to the main security processor 16 and the number of slave security processors 18 that are idle at the current moment; the number of the more than two first sub-segments is less than or equal to the sum of the main security processor 16 and the number of slave security processors 18 that are idle at the current moment; send different first sub-segments to different slave security processors 18 that are idle at the current moment; divide the second basic segment into two or more second sub-segments according to the number of slave security processors 18 that are idle at the next moment; the number of the more than two second sub-segments is less than or equal to the number of slave security processors 18 that are idle at the next moment; send different second sub-segments to different slave security processors 18 that are idle at the next moment.
[0238] In some embodiments, the slave security processor 18 is specifically used to: read the virtual machine memory data according to the received memory page information table segment, and send the read virtual machine memory data to the main security processor 16 after encrypting it or encrypting it and generating integrity verification data.
[0239] In some implementations, the processor core 14 is further configured to dynamically negotiate with a receiving end virtual machine monitor to determine the threshold through a local virtual machine monitor, or to determine the threshold according to a migration network state.
[0240] In some embodiments, the slave security processor 18 is specifically used to read the virtual machine memory data according to the received memory page information table segment, and send the read virtual machine memory data to the master security processor 16 after processing by a local cryptographic coprocessor.
[0241] In some embodiments, the main security processor 16 is further used to: when dividing the memory page information table into two or more memory page information table segments and sending different memory page information table segments to different slave security processors 18, retain a memory page information table segment for itself; and after sending different memory page information table segments to different slave security processors 18, read the virtual machine memory data according to the memory page information table segments retained by itself, and process the read virtual machine memory data.
[0242] The CPU chip of this embodiment can be used to execute Figure 1 , Figure 3 or Figure 4 The technical solution of the method embodiment shown has similar implementation principles and technical effects, which will not be repeated here.
[0243] Fig.11 This is a block diagram of a CPU chip according to an embodiment of the present application. Fig.11 The CPU chip 10' of the embodiment of the present application includes: a processor core 14', a main security processor 16' and a slave security processor 18'; wherein the processor core 14' is used to run a virtual machine monitor to receive virtual machine memory data and migration information that need to be migrated through the virtual machine monitor, and the migration information includes memory page information or a memory page information table of the virtual machine memory data that needs to be migrated; if the migration information includes memory page information of the virtual machine memory data that needs to be migrated, the memory page information is placed in the memory page information table; and the memory page information table is sent to the main security processor 16'; the main security processor 16' is electrically connected to the processor core 14', and is used to divide the memory page information table into more than two memory page information table segments; and send different memory page information table segments to different slave security processors 18'; the slave security processors 18' are more than two in number, such as three, four or five, etc., which are electrically connected to the main security processor 16' respectively, and are used to read the virtual machine memory data that needs to be migrated according to the received memory page information table segments, and send the read virtual machine memory data that needs to be migrated to the main security processor 16' after processing.
[0244] In this embodiment, the processor core and the security processor may use processors of the same architecture, such as both may use processors of the X86 architecture, or may use processors of different architectures, such as the processor core uses an X86 architecture processor and the security processor uses an ARM architecture processor.
[0245] The CPU chip of this embodiment can be used to execute Figure 5 The technical solution of the method embodiment shown has similar implementation principles and technical effects, which will not be repeated here.
[0246] In some embodiments, the processor core 14' is also used to: determine through the virtual machine monitor whether the number of items in the memory page information table reaches a threshold value, and if the number of items in the memory page information table reaches the threshold value, send the memory page information table to the main security processor 16'; wherein, an item in the memory page information table corresponds to at least one virtual machine memory page information that needs to be migrated.
[0247] The CPU chip of this embodiment can be used to execute Figure 6 The technical solution of the method embodiment shown has similar implementation principles and technical effects, which will not be repeated here.
[0248] In some embodiments, the main security processor 16' is further used to: divide the memory page information table into two or more memory page information table segments according to the number of main security processors 16' and slave security processors 18'; the number of the two or more memory page information table segments is less than or equal to the sum of the number of main security processors 16' and slave security processors 18'.
[0249] In some embodiments, the master security processor 16' is further used to: divide the memory page information table into a first basic segment and a second basic segment; divide the first basic segment into two or more first sub-segments according to the number of slave security processors 18' that are idle at the current moment; the number of the two or more first sub-segments is less than or equal to the number of slave security processors 18' that are idle at the current moment; send different first sub-segments to different slave security processors 18' that are idle at the current moment; divide the second basic segment into two or more second sub-segments according to the number of slave security processors 18' that are idle at the next moment; the number of the two or more second sub-segments is less than or equal to the number of slave security processors 18' that are idle at the next moment; and send different second sub-segments to different slave security processors 18' that are idle at the next moment.
[0250] In some embodiments, the slave security processor 18' is specifically used to: read the virtual machine memory data that needs to be migrated according to the received memory page information table segment, and decrypt the read virtual machine memory data that needs to be migrated, or send it to the main security processor 16' after successful decryption and integrity verification.
[0251] In some implementations, the core processor is further configured to determine the threshold through dynamic negotiation between a local virtual machine monitor and a transmitting end virtual machine monitor, or determine the threshold according to a migration network state.
[0252] In some embodiments, the slave security processor 18' is specifically used to: read the virtual machine memory data that needs to be migrated according to the received memory page information table segment, and send the read virtual machine memory data that needs to be migrated to the master security processor 16' after processing by the local cryptographic coprocessor.
[0253] In some embodiments, the main security processor 16' is further used to: when dividing the memory page information table into two or more memory page information table segments and sending different memory page information table segments to different slave security processors 18', retain a memory page information table segment for itself; and after sending different memory page information table segments to different slave security processors 18', read the virtual machine memory data according to the memory page information table segments retained by itself, and process the read virtual machine memory data.
[0254] The CPU chip of this embodiment can be used to execute Figures 5 to 9 The technical solution of the method embodiment shown has similar implementation principles and technical effects, which will not be repeated here.
[0255] Fig.12 This is a block diagram of a server according to an embodiment of the present application. Fig.12 The electronic device may include: a housing 41, a processor 42, a memory 43, a circuit board 44 and a power circuit 45, wherein the circuit board 44 is placed inside the space enclosed by the housing 41, and the processor 42 and the memory 43 are arranged on the circuit board 44; the power circuit 45 is used to supply power to various circuits or devices of the above-mentioned electronic device; the memory 43 is used to store executable program codes; wherein the processor 42 runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the migration method described in any of the aforementioned embodiments, and its implementation principle and technical effect are similar, which will not be repeated here.
[0256] The server consists of a processor, hard disk, memory, system bus, etc. The server is similar to the general computer architecture, but because it needs to provide highly reliable services, it has higher requirements in terms of processing power, stability, reliability, security, scalability, manageability, etc.
[0257] In the embodiment of the present application, the virtual machine memory data migration method, CPU chip and server, the virtual machine migration sending end can use the virtual machine memory page information table to send the memory page information that needs to be migrated to the main security processor for processing in batches, rather than processing them one by one, which can improve the processing efficiency. In addition, in the present application, there is a master-slave relationship between multiple security processors, and the main security processor is used to manage the slave security processors; after the virtual machine monitor sends the memory page information table to the main security processor, the main security processor can segment a memory page information table and dispatch it to multiple slave security processors to realize concurrent processing of multiple pages of memory, reduce the interaction time between the virtual machine monitor and the security processor, improve migration efficiency, reduce migration time overhead, and reduce downtime; in addition, when multiple slave security processors concurrently process multiple pages of memory, the main security processor can also process the memory page information table segments in parallel, further improve data processing efficiency, reduce the interaction time between the virtual machine monitor and the security processor, improve migration efficiency, reduce migration time overhead, and reduce downtime.
[0258] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0259] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
[0260] In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0261] For the convenience of description, the above device is described by dividing the functions into various units / modules. Of course, when implementing the present application, the functions of each unit / module can be implemented in the same or multiple software and / or hardware.
[0262] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0263] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A method for migrating virtual machine memory data, It is characterized in that Applied to the sending end, including: The virtual machine monitor puts the virtual machine memory page information that needs to be migrated into the memory page information table, and sends the memory page information table to the main security processor; wherein the virtual machine memory page information includes an identification of whether the data in the memory page has been modified; The master security processor divides the memory page information table into two or more memory page information table segments, and sends different memory page information table segments to different slave security processors; Each slave security processor reads the virtual machine memory data according to the received memory page information table segment, and processes the read virtual machine memory data and sends it to the master security processor, and the master security processor sends the processed virtual machine memory data to the virtual machine monitor; The virtual machine monitor sends the processed virtual machine memory data and migration information to the target machine to migrate the virtual machine memory data, wherein the migration information includes the virtual machine memory page information or the memory page information table to be migrated; After the virtual machine monitor puts the virtual machine memory page information that needs to be migrated into the memory page information table, the method further includes: The virtual machine monitor determines whether the number of items in the memory page information table reaches a threshold. If the number of items in the memory page information table reaches the threshold, the memory page information table is sent to the main security processor; wherein, one item in the memory page information table corresponds to at least one virtual machine memory page information that needs to be migrated.
2. The migration method according to claim 1, It is characterized in that The main security processor divides the memory page information table into two or more memory page information table segments, including: The main security processor divides the memory page information table into two or more memory page information table segments according to the number of main security processors and slave security processors; the number of the two or more memory page information table segments is less than or equal to the sum of the number of main security processors and slave security processors.
3. The migration method according to claim 1, It is characterized in that The main security processor divides the memory page information table into two or more memory page information table segments, including: The main security processor divides the memory page information table into a first basic segment and a second basic segment; According to the number of the main security processor and the idle slave security processors at the current moment, the first basic segment is divided into two or more first sub-segments; the number of the two or more first sub-segments is less than or equal to the sum of the number of the main security processor and the idle slave security processors at the current moment; The sending of different memory page information table segments to different slave security processors includes: sending different first sub-segments to different slave security processors that are idle at the current moment; According to the number of idle slave security processors at the next moment, the second basic segment is divided into two or more second sub-segments; the number of the two or more second sub-segments is less than or equal to the number of idle slave security processors at the next moment; The sending of different memory page information table segments to different slave security processors includes: sending different second sub-segments to different slave security processors that are idle at the next moment.
4. The migration method according to claim 1, It is characterized in that Each slave security processor reads the virtual machine memory data according to the received memory page information table segment, and processes the read virtual machine memory data and sends it to the master security processor, including: Each slave security processor reads the virtual machine memory data according to the received memory page information table segment, and sends the read virtual machine memory data to the master security processor after encrypting the data or encrypting the data and generating integrity check data.
5. The migration method according to claim 1, It is characterized in that Before determining whether the number of items in the memory page information table reaches a threshold, the method further includes: Dynamically negotiate with the receiving end to determine the threshold; or, The threshold is determined according to the migration network state.
6. The migration method according to claim 1, It is characterized in that Each slave security processor reads virtual machine memory data according to the received memory page information table segment, and processes the read virtual machine memory data and sends it to the master security processor, including: Each slave security processor reads the virtual machine memory data according to the received memory page information table segment, and sends the read virtual machine memory data to the master security processor after processing by the local cryptographic coprocessor.
7. The migration method according to claim 1, It is characterized in that When the master security processor divides the memory page information table into two or more memory page information table segments and sends different memory page information table segments to different slave security processors, the method further includes: the master security processor itself retains a memory page information table segment; After the master security processor sends different memory page information table segments to different slave security processors, the master security processor reads the virtual machine memory data according to the memory page information table segments retained by itself, and processes the read virtual machine memory data.
8. A method for migrating virtual machine memory data, It is characterized in that Applied to the receiving end, including: The virtual machine monitor receives the virtual machine memory data and migration information that need to be migrated, wherein the migration information includes the memory page information or the memory page information table of the virtual machine memory data that need to be migrated; if the migration information includes the memory page information of the virtual machine memory data that need to be migrated, the memory page information is put into the memory page information table; wherein the virtual machine memory page information includes an identification of whether the data in the memory page has been modified; The virtual machine monitor sends the memory page information table to the main security processor; The master security processor divides the memory page information table into two or more memory page information table segments, and sends different memory page information table segments to different slave security processors; Each slave security processor reads the virtual machine memory data to be migrated according to the received memory page information table segment, and processes the read virtual machine memory data to be migrated and sends it to the master security processor; If the migration information includes memory page information of the virtual machine memory data to be migrated, after putting the memory page information into the memory page information table, the method further includes: Determine whether the number of items in the memory page information table reaches a threshold. If the number of items in the memory page information table reaches the threshold, execute the step of sending the memory page information table to the main security processor; wherein, one item in the memory page information table corresponds to at least one virtual machine memory page information that needs to be migrated.
9. The migration method according to claim 8, It is characterized in that The main security processor divides the memory page information table into two or more memory page information table segments, including: The main security processor divides the memory page information table into two or more memory page information table segments according to the number of main security processors and slave security processors; the number of the two or more memory page information table segments is less than or equal to the sum of the number of main security processors and slave security processors.
10. The migration method according to claim 8, It is characterized in that The main security processor divides the memory page information table into two or more memory page information table segments, including: The main security processor divides the memory page information table into a first basic segment and a second basic segment; According to the number of the main security processor and the idle slave security processors at the current moment, the first basic segment is divided into two or more first sub-segments; the number of the two or more first sub-segments is less than or equal to the sum of the number of the main security processor and the idle slave security processors at the current moment; The sending of different memory page information table segments to different slave security processors includes: sending different first sub-segments to different slave security processors that are idle at the current moment; According to the number of idle slave security processors at the next moment, the second basic segment is divided into two or more second sub-segments; the number of the two or more second sub-segments is less than or equal to the number of idle slave security processors at the next moment; The sending of different memory page information table segments to different slave security processors includes: sending different second sub-segments to different slave security processors that are idle at the next moment.
11. The migration method according to claim 8, It is characterized in that Each slave security processor reads the virtual machine memory data to be migrated according to the received memory page information table segment, and processes and sends the read virtual machine memory data to be migrated to the master security processor, including: Each slave security processor reads the virtual machine memory data that needs to be migrated according to the received memory page information table segment, and sends the read virtual machine memory data that needs to be migrated to the master security processor after decryption processing, or after successful decryption processing and integrity verification.
12. The migration method according to claim 8, It is characterized in that Before determining whether the number of items in the memory page information table reaches a threshold, the method further includes: Dynamically negotiate with the sending end to determine the threshold; or, The threshold is determined according to the migration network state.
13. The migration method according to claim 8, It is characterized in that Each slave security processor reads the virtual machine memory data to be migrated according to the received memory page information table segment, and processes the read virtual machine memory data to be migrated and sends it to the master security processor, including: Each slave security processor reads the virtual machine memory data that needs to be migrated according to the received memory page information table segment, and sends the read virtual machine memory data that needs to be migrated to the master security processor after processing by the local cryptographic coprocessor.
14. The migration method according to claim 8, It is characterized in that When the master security processor divides the memory page information table into two or more memory page information table segments and sends different memory page information table segments to different slave security processors, the method further includes: the master security processor retains a memory page information table segment itself; After the master security processor sends different memory page information table segments to different slave security processors, the master security processor reads the virtual machine memory data according to the memory page information table segments retained by itself, and processes the read virtual machine memory data.
15. A CPU chip, It is characterized in that include: processor core, a master security processor and a slave security processor; wherein, The processor core is used to run a virtual machine monitor to put virtual machine memory page information that needs to be migrated into a memory page information table through the virtual machine monitor; and send the memory page information table to the main security processor; wherein the virtual machine memory page information includes an identification of whether the data in the memory page has been modified; The master security processor is electrically connected to the processing core and is used to divide the memory page information table into two or more memory page information table segments, and send different memory page information table segments to different slave security processors; The slave security processors, which are more than two in number, are electrically connected to the master security processor respectively, and are used to read the virtual machine memory data according to the received memory page information table segment, and process the read virtual machine memory data and send it to the master security processor, so that the master security processor sends the processed virtual machine memory data to the virtual machine monitor; The processor core is further used to send the processed virtual machine memory data and migration information to the target machine through the virtual machine monitor to migrate the virtual machine memory data, wherein the migration information includes the virtual machine memory page information to be migrated or the memory page information table; The processor core is also used to: determine whether the number of items in the memory page information table reaches a threshold through the virtual machine monitor; if the number of items in the memory page information table reaches the threshold, send the memory page information table to the main security processor; an item in the memory page information table corresponds to at least one virtual machine memory page information that needs to be migrated.
16. The CPU chip according to claim 15, It is characterized in that The main security processor is specifically used to: divide the memory page information table into more than two memory page information table segments according to the number of the main security processor and the slave security processors; the number of the more than two memory page information table segments is less than or equal to the sum of the number of the main security processor and the slave security processors.
17. The CPU chip according to claim 15, It is characterized in that The master security processor is further used to: divide the memory page information table into a first basic segment and a second basic segment; divide the first basic segment into two or more first sub-segments according to the number of the master security processor and the slave security processors that are idle at the current moment; the number of the two or more first sub-segments is less than or equal to the sum of the number of the master security processor and the slave security processors that are idle at the current moment; and send different first sub-segments to different slave security processors that are idle at the current moment; According to the number of idle slave security processors at the next moment, the second basic segment is divided into two or more second sub-segments; the number of the two or more second sub-segments is less than or equal to the number of idle slave security processors at the next moment; different second sub-segments are sent to different idle slave security processors at the next moment.
18. The CPU chip according to claim 15, It is characterized in that The slave security processor is specifically used to: read the virtual machine memory data according to the received memory page information table segment, and send the read virtual machine memory data to the master security processor after encryption processing or encryption processing and generating integrity verification data.
19. The CPU chip according to claim 15, It is characterized in that The processor core is further configured to determine the threshold value through dynamic negotiation with a receiving end virtual machine monitor via a local virtual machine monitor, or to determine the threshold value according to a migration network state.
20. The CPU chip according to claim 15, It is characterized in that The slave security processor is specifically used to read the virtual machine memory data according to the received memory page information table segment, and send the read virtual machine memory data to the master security processor after processing by the local cryptographic coprocessor.
21. The CPU chip according to claim 15, It is characterized in that The main security processor is also used to: when dividing the memory page information table into two or more memory page information table segments and sending different memory page information table segments to different slave security processors, retain a memory page information table segment for itself; and after sending different memory page information table segments to different slave security processors, read the virtual machine memory data according to the memory page information table segments retained by itself, and process the read virtual machine memory data.
22. A CPU chip, It is characterized in that include: processor core, a master security processor and a slave security processor; wherein, The processor core is used to run a virtual machine monitor to receive virtual machine memory data and migration information that need to be migrated through the virtual machine monitor, wherein the migration information includes memory page information or a memory page information table of the virtual machine memory data that need to be migrated; if the migration information includes memory page information of the virtual machine memory data that need to be migrated, the memory page information is placed in a memory page information table; the memory page information table is sent to a main security processor; wherein the virtual machine memory page information includes an identification of whether the data in the memory page has been modified; The master security processor is electrically connected to the processor core and is used to divide the memory page information table into two or more memory page information table segments; and send different memory page information table segments to different slave security processors; The slave security processors, which are more than two in number, are electrically connected to the master security processor respectively, and are used to read the virtual machine memory data to be migrated according to the received memory page information table segment, and process the read virtual machine memory data to be migrated and send it to the master security processor; The processor core is also used to: determine whether the number of items in the memory page information table reaches a threshold through the virtual machine monitor, and if the number of items in the memory page information table reaches the threshold, send the memory page information table to the main security processor; wherein, one item in the memory page information table corresponds to at least one virtual machine memory page information that needs to be migrated.
23. The CPU chip according to claim 22, It is characterized in that The main security processor is further used to: divide the memory page information table into more than two memory page information table segments according to the number of main security processors and slave security processors; the number of the more than two memory page information table segments is less than or equal to the sum of the number of main security processors and slave security processors.
24. The CPU chip according to claim 22, It is characterized in that The main security processor is further used to: divide the memory page information table into a first basic segment and a second basic segment; According to the number of idle slave security processors at the current moment, the first basic segment is divided into two or more first sub-segments; the number of the two or more first sub-segments is less than or equal to the number of idle slave security processors at the current moment; and different first sub-segments are sent to different idle slave security processors at the current moment; According to the number of idle slave security processors at the next moment, the second basic segment is divided into two or more second sub-segments; the number of the two or more second sub-segments is less than or equal to the number of idle slave security processors at the next moment; different second sub-segments are sent to different idle slave security processors at the next moment.
25. The CPU chip according to claim 22, It is characterized in that The slave security processor is specifically used to: read the virtual machine memory data that needs to be migrated according to the received memory page information table segment, and send the read virtual machine memory data that needs to be migrated to the master security processor after decryption processing, or after successful decryption processing and integrity verification.
26. The CPU chip according to claim 22, It is characterized in that The core processor is further configured to determine the threshold through dynamic negotiation between the local virtual machine monitor and the sending end virtual machine monitor, or determine the threshold according to the migration network state.
27. The CPU chip according to claim 22, It is characterized in that The slave security processor is specifically used to: read the virtual machine memory data that needs to be migrated according to the received memory page information table segment, and send the read virtual machine memory data that needs to be migrated to the master security processor after processing by the local cryptographic coprocessor.
28. The CPU chip according to claim 22, It is characterized in that The main security processor is also used to: when dividing the memory page information table into two or more memory page information table segments and sending different memory page information table segments to different slave security processors, retain a memory page information table segment for itself; and after sending different memory page information table segments to different slave security processors, read the virtual machine memory data according to the memory page information table segments retained by itself, and process the read virtual machine memory data.
29. A server, It is characterized in that include: A housing, a processor, a memory, a circuit board and a power supply circuit, wherein the circuit board is placed inside the space enclosed by the housing, and the processor and the memory are arranged on the circuit board; the power supply circuit is used to supply power to various circuits or devices of the above-mentioned electronic device; the memory is used to store executable program codes; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the migration method described in any one of the preceding claims 1 to 14.
