Page marking method, apparatus and device

By updating the page identifier as dirty identifier in the virtual machine's storage space, the problem of low migration efficiency in virtual machine hot migration is solved, and more efficient memory page data migration is achieved.

WO2025153900A1PCT designated stage expired Publication Date: 2025-07-24CLOUD INTELLIGENCE ASSETS HOLDING (SINGAPORE) PTE LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
PCT/IB2025/050022
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-01-17
Filing Date
2025-01-02
Publication Date
2025-07-24

AI Technical Summary

Technical Problem

During the virtual machine hot migration process, due to the low migration efficiency caused by the virtual machine's data update to the memory page, the existing technology requires traversing a large number of record table entries, resulting in low migration efficiency.

Method used

By updating the page identity of the target memory page as a dirty identity in the first storage space of the virtual machine, the memory operation request and device identifier are used to determine the storage address, reducing dependence on the record table, and directly marking the dirty page in the storage space.

Benefits of technology

It improves the efficiency of memory page data migration during the virtual machine hot migration process, reduces migration time, and improves the accuracy and efficiency of migration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure IB2025050022_24072025_PF_FP_ABST
    Figure IB2025050022_24072025_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present disclosure are a page marking method, an apparatus and a device. The method can comprise: during the process of live migration of a virtual machine, receiving a memory operation request corresponding to the virtual machine, wherein the memory operation request is used for requesting an operation on a target memory page; on the basis of the memory operation request, performing an operation on data in the target memory page; and, in a first storage space corresponding to the virtual machine, updating the page flag of the target memory page to a dirty flag, wherein the dirty flag is used for indicating that the data in the target memory page has been updated. The present disclosure improves the efficiency of migration of data in target memory pages.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Page Marking Method, Apparatus, and Device This disclosure claims priority to Chinese Patent Application No. 202410071868.4, filed with the China Patent Office on January 17, 2024, the entire contents of which are incorporated herein by reference. Technical Field This disclosure relates to the field of computers, and more particularly to a page marking method, apparatus, and device. Background: A source host machine may run a virtual machine. The source host machine's memory may include multiple memory pages corresponding to the virtual machine. These multiple memory pages may store data corresponding to the virtual machine. When hot migrating a virtual machine from the source host machine to a target host machine, it is necessary to determine the multiple memory pages corresponding to the virtual machine on the source host machine and migrate the data in the multiple memory pages to the target host machine. In related art, during the hot migration of a virtual machine, the virtual machine may continue to run and may update the data in the memory pages to generate target memory pages with updated data. The virtual machine has a corresponding record table that includes the base addresses and page identifiers of the multiple memory pages corresponding to the virtual machine. In the record table corresponding to the virtual machine, the page identifier corresponding to the target memory page can be updated to a dirty identifier to indicate that the target memory page has been updated and that the data in the target memory page needs to be migrated. However, based on the above approach, when iteratively migrating data in multiple memory pages, due to the large number of record tables corresponding to the virtual machine, all entries in each record table must be traversed to determine the page identifier of each memory page and to identify multiple target memory pages. This results in low migration efficiency for the data in the target memory pages. SUMMARY OF THE INVENTION Various aspects of the present disclosure provide a page marking method, apparatus, and device for improving the efficiency of migrating data in target memory pages. In a first aspect, an embodiment of the present disclosure provides a page marking method, comprising: during a live migration of a virtual machine, receiving a memory operation request corresponding to the virtual machine, the memory operation request being used to request an operation on a target memory page; performing an operation on the data in the target memory page according to the memory operation request; and updating the page identifier of the target memory page to a dirty identifier in a first storage space corresponding to the virtual machine, the dirty identifier being used to indicate that the data in the target memory page has been updated. In a possible implementation, updating the page identifier corresponding to the target memory page to a dirty identifier in the first storage space corresponding to the virtual machine includes: determining a first storage address according to the memory operation request; determining the first storage space according to the first storage address; and updating the page identifier of the target memory page to the dirty identifier in the first storage space.In one possible embodiment, the memory operation request includes a device identifier; determining a first storage address based on the memory operation request includes: determining a context entry corresponding to the virtual machine based on the device identifier; and obtaining the first storage address from the context entry, where the first storage address is pre-stored in the context entry. In another possible embodiment, a page identification bitmap corresponding to the virtual machine is stored in the first storage space; updating the page identification of the target memory page to the dirty flag in the first storage space includes: determining a current page identification corresponding to the target memory page in the page identification bitmap of the first storage space; and if the current page identification is different from the dirty flag, updating the current page identification to the dirty flag. In one possible embodiment, the memory operation request includes the virtual address of the target memory page, and the virtual address includes a first virtual address portion and a second virtual address portion; performing an operation on the data in the target memory page according to the memory operation request includes: querying a record table for record information corresponding to the target memory page according to the first virtual address portion, wherein the record information includes a base address of the target memory page; determining a physical address corresponding to the target memory page according to the base address and the second virtual address portion; and performing an operation on the data in the target memory page according to the physical address. In one possible embodiment, the record information also includes a page identifier of the target memory page; the method further includes: determining, in the record information, whether the page identifier of the target memory page is the dirty identifier; if not, updating the page identifier of the target memory page to the dirty identifier. In one possible embodiment, the method further includes: determining at least one dirty memory page from multiple memory pages corresponding to the virtual machine based on page identifiers of each memory page corresponding to the virtual machine in the first storage space; and synchronizing data in the at least one dirty memory page from a source host machine where the virtual machine is currently located to a target host machine, where the target host machine is the host machine to which the virtual machine is to be migrated. In one possible embodiment, a page identifier bitmap corresponding to the virtual machine is stored in the first storage space; determining at least one dirty memory page from multiple memory pages corresponding to the virtual machine based on page identifiers of each memory page corresponding to the virtual machine in the first storage space includes: determining at least one target page identifier in the page identifier bitmap, the value of the target page identifier being the value corresponding to the dirty identifier; and determining the memory page corresponding to the at least one target page identifier as the at least one dirty memory page.In one possible implementation, the method further includes: applying for a second storage space in the source host machine; determining a second storage address of the second storage space; and updating the first storage address to the second storage address in the context entry corresponding to the virtual machine. In a second aspect, an embodiment of the present disclosure provides a page marking device, comprising: a receiving module, an operating module, and a first update module. The receiving module is configured to receive a memory operation request corresponding to the virtual machine during live migration of the virtual machine, the memory operation request being used to request an operation on a target memory page; the operating module is configured to operate on data in the target memory page according to the memory operation request; and the first update module is configured to update the page flag of the target memory page to a dirty flag in the first storage space corresponding to the virtual machine, the dirty flag being used to indicate that data in the target memory page has been updated during the live migration of the virtual machine. In one possible implementation, the first update module is specifically configured to: determine the first storage address according to the memory operation request; determine the first storage space according to the first storage address; and update the page flag of the target memory page to the dirty flag in the first storage space. In one possible embodiment, the memory operation request includes a device identifier; the first update module is specifically configured to: determine a context entry corresponding to the virtual machine based on the device identifier; obtain the first storage address from the context entry, where the first storage address is pre-stored in the context entry. In one possible embodiment, the first storage space stores a page identifier bitmap corresponding to the virtual machine; the first update module is specifically configured to: determine a current page identifier corresponding to the target memory page from the page identifier bitmap in the first storage space; and if the current page identifier is different from the dirty identifier, update the current page identifier to the dirty identifier. In one possible embodiment, the memory operation request includes a virtual address of the target memory page, where the virtual address includes a first virtual address portion and a second virtual address portion; the operation module is specifically configured to: query a record table for record information corresponding to the target memory page based on the first virtual address portion, where the record information includes a base address of the target memory page; determine a physical address corresponding to the target memory page based on the base address and the second virtual address portion; and perform an operation on data in the target memory page based on the physical address.In one possible embodiment, the record information also includes a page identifier of the target memory page; the first update module is further configured to determine, in the record information, whether the page identifier of the target memory page is the dirty identifier; if not, update the page identifier of the target memory page to the dirty identifier. In one possible embodiment, the apparatus further includes: a first determination module and a synchronization module, wherein the first determination module is configured to determine at least one dirty memory page among multiple memory pages corresponding to the virtual machine based on the page identifiers of the memory pages corresponding to the virtual machine in the first storage space; the synchronization module is configured to synchronize data in the at least one dirty memory page from the source host machine where the virtual machine is currently located to a target host machine, the target host machine being the host machine to which the virtual machine is to be migrated. In one possible embodiment, the first storage space stores a page identifier bitmap corresponding to the virtual machine; the first determination module is specifically configured to: determine at least one target page identifier in the page identifier bitmap, the value of the target page identifier being the value corresponding to the dirty identifier; and determine the memory page corresponding to the at least one target page identifier as the at least one dirty memory page. In one possible implementation, the apparatus further includes an application module, a second determination module, and a second update module: the application module is configured to apply for a second storage space in the source host machine; the second determination module is configured to determine a second storage address of the second storage space; and the second update module is configured to update the first storage address to the second storage address in the context entry corresponding to the virtual machine. In a third aspect, an embodiment of the present disclosure provides an electronic device comprising: a memory and a processor; the memory storing computer-executable instructions; the processor executing the computer-executable instructions stored in the memory, causing the processor to perform any of the methods described in the first aspect. In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, which, when executed by the processor, are configured to implement any of the methods described in the first aspect. In a fifth aspect, an embodiment of the present disclosure provides a computer program product comprising a computer program, which, when executed by the processor, implements any of the methods described in the first aspect. Embodiments of the present disclosure provide a page marking method, apparatus, and device. During a virtual machine live migration process, a source host machine can receive a memory operation request corresponding to the virtual machine and, based on the memory operation request, operate on data in a target memory page. Furthermore, the page flag of the target memory page can be updated to a dirty flag in a first storage space corresponding to the virtual machine.Because the page identifier of the target memory page can be updated to a dirty identifier in the first storage space corresponding to the virtual machine, during iterative migration of the virtual machine from the source host machine to the target host machine, the page identifiers of each memory page can be obtained in the first storage space to determine the multiple target memory pages to be migrated. This eliminates the need to traverse all entries in the record table corresponding to the virtual machine, thereby improving the efficiency of migrating data in the target memory pages. BRIEF DESCRIPTION OF THE DRAWINGS The accompanying drawings described herein are provided to provide a further understanding of the present disclosure and constitute a part of the present disclosure. The illustrative embodiments of the present disclosure and their description are provided to explain the present disclosure and are not intended to unduly limit the present disclosure. In the accompanying drawings: Figure 1 is a scenario diagram provided by an exemplary embodiment of the present disclosure; Figure 2 is a page marking method in the related technology provided by the present disclosure; Figure 3 is a flow diagram of a page marking method provided by an exemplary embodiment of the present disclosure; Figure 4 is a schematic diagram of the memory in a source host machine provided by an exemplary embodiment of the present disclosure; Figure 5 is a flow diagram of another page marking method provided by an exemplary embodiment of the present disclosure; Figure 6 is a structural diagram of a page marking method provided by an exemplary embodiment of the present disclosure; Figure 7 is a schematic diagram of a page identification bitmap provided by an exemplary embodiment of the present disclosure; Figure 8 is a flow diagram of iterative migration of multiple memory pages corresponding to a virtual machine provided by an exemplary embodiment of the present disclosure; Figure 9 is a structural diagram of a page marking device provided by an exemplary embodiment of the present disclosure; Figure 10 is a structural diagram of another page marking device provided by an exemplary embodiment of the present disclosure; Figure 11 is a structural diagram of another page marking device provided by an exemplary embodiment of the present disclosure; Figure 12 is a structural diagram of an electronic device provided by an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS: It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, storage, and display) involved in this disclosure are all authorized by the user or fully authorized by all parties. The collection, use, and processing of the relevant data must comply with relevant laws, regulations, and standards, and corresponding operation portals are provided for users to choose to authorize or reject. To further clarify the objectives, technical solutions, and advantages of this disclosure, the technical solutions of this disclosure will be described clearly and completely below in conjunction with specific embodiments of this disclosure and the corresponding drawings. Obviously, the described embodiments are only some of the embodiments of this disclosure, and are not exhaustive. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of this disclosure without inventive effort are within the scope of protection of this disclosure. Figure 1 is a schematic diagram of a scenario provided by an exemplary embodiment of this disclosure.See Figure 1 , which includes a source host machine and a target host machine. Memory 1 of the source host machine may include n memory pages. These n memory pages can be used to store data. For example, the n memory pages may be memory page 0, memory page 1, ..., memory page n, where n is an integer greater than or equal to 1. Virtual machine 1 may be running on the source host machine, and multiple memory pages corresponding to virtual machine 1 may exist within the n memory pages. Assuming that there are 1000 memory pages corresponding to virtual machine 1 within the n memory pages, data corresponding to virtual machine 1 is stored within these 1000 memory pages. For example, the 1000 memory pages may be memory page 1-0, memory page 1T, ..., memory page 1-999. OWhen migrating virtual machine 1 from a source host to a target host, it is necessary to determine the 1000 memory pages corresponding to virtual machine 1 on the source host and migrate the data in these 1000 memory pages to the memory pages on the target host. For example, the data in memory pages 1-0, 1-1, ..., and 1-999 can be migrated to memory pages 2-0, 2-1, ..., and 2-999 on the target host, respectively. After the migration is complete, virtual machine 1 can be running on the target host, and the target host's memory 2 can include the 1000 memory pages corresponding to virtual machine 1, storing the data corresponding to virtual machine 1. In related art, during the hot migration of a virtual machine, the virtual machine may still be running and the data in the memory pages may be updated to generate target memory pages with updated data. The virtual machine has a corresponding record table that includes the base addresses and page identifiers of multiple memory pages corresponding to the virtual machine. In the record table corresponding to the virtual machine, the page ID corresponding to the target memory page can be updated to a dirty flag to indicate that the target memory page has been updated and that the data in the target memory page needs to be migrated. However, based on the above approach, when iteratively migrating data in multiple memory pages, due to the large number of record tables corresponding to the virtual machine, all entries in each record table must be traversed to determine the page ID of each memory page and thus identify multiple target memory pages. This results in low migration efficiency for the data in the target memory pages. In an embodiment of the present disclosure, a first storage space corresponding to the virtual machine can be provided in the memory of the source host machine. When performing operations on the data in the target memory page, the page ID of the target memory page can be updated to a dirty flag in the first storage space to indicate that the target memory page has been updated and that the data in the target memory page needs to be migrated. Based on the above approach, during iterative migration of a virtual machine from a source host machine to a target host machine, page identifiers for each memory page can be obtained in the first storage space to identify the multiple target memory pages to be migrated, eliminating the need to traverse all entries in the record table corresponding to the virtual machine. This improves the efficiency of migrating data in the target memory pages. The following describes a related art page marking method, described in conjunction with Figure 2. This page marking method is based on the Input / Output Memory Management Unit (IOMMU). Figure 2 illustrates a related art page marking method provided by the present disclosure.As shown in Figure 2, the source host includes a root data table, multiple context data tables, and multiple level 4 page tables. The root table may include multiple entries, each corresponding to a bus number. For example, the root table may include 256 entries, where entry 1 corresponds to Bus 0, entry 125 corresponds to Bus 125, and entry 255 corresponds to Bus 255. o For any Bus number, there can be a corresponding context tab I e o For example, for Busi 25, there may be a corresponding context tab I e 125 o A context tab 1e may include multiple context entries. For each context entry, the context entry has a corresponding device number (Dev) and function number (Func). For example, context tab 1e 125 may include multiple context entries. Context entry 1 has a Dev number of 0 and a Func number of 1. For each context entry, the base address of the L0-level page table in the corresponding four-level page table may be stored in the context entry. For example, context entry 1 may store the base address of L0-level page table 1 in four-level page table 1.

[0002] The Bus number, Dev number, and Func number can form a BDF number, which is a unique identifier corresponding to a Peripheral Component Interconnect Express (PCIe) device. For any virtual machine in the source host, the virtual machine can have multiple corresponding PCIe devices. Each PCIe device can have a corresponding BDF number. For example, if virtual machine 1 has two corresponding PCIe devices, PCIe device 1's BDF number 1 is 125:0:1, and PCIe device 2's BDF number 2 is 0:30:7, then the base address of level 4 page table 1 can be found in the root tab 1e and context tab 1e based on BDF number 1 and BDF number 2. That is, based on BDF number 1, the base address of level L0 page table 1 in level 4 page table 1 can be determined from context entry 1 in context tab 125; alternatively, based on BDF number 2, the base address of level L0 page table 1 in level 4 page table 1 can be found in context entry 1 in context tab 125. By determining the base address of L0-level page table 1 in level 4 page table 1 from context entry 2 (i.e., the context entry corresponding to Dev being 30 and Func number being 7), it can be determined that level 4 page table 1 is the level 4 page table corresponding to virtual machine 1. For any level 4 page table, the level 4 page table may include one L0-level page table, multiple L1-level page tables, multiple L2-level page tables, and multiple L3-level page tables. For example, level 4 page table 1 may include one L0-level page table, 29 L1-level page tables, 218 L2-level page tables, and 227 L3-level page tables.

[0003] The L0 page table may include multiple entries, each of which may store the address of an L1 page table. For example, entry 1 of L1 page table 1 may store the address of L1 page table 1. Each L1 page table may include multiple entries, each of which may store the address of an L2 page table. For example, entry 1 of L1 page table 1 may store the address of L2 page table 1. Each L2 page table may include multiple entries, each of which may store the address of an L3 page table. For example, entry 1 of L2 page table 1 may store the address of L3 page table 1. Each L3 page table may include multiple entries, each of which may store the base address and page identifier of a memory page. For example, entry 1 of L3 page table 1 may store the base address 1 and page identifier of memory page 1. When performing a migration operation on virtual machine 1, the source host machine can determine the root tab 1e and context tab 1e based on the BDF number in the memory operation request, and determine the base address of level 10 page table 1 in level 4 page table 1 in context tab 1e, thereby determining level 4 page table 1 corresponding to virtual machine 1. The source host machine can determine the base address corresponding to the target memory page in level 4 page table 1 based on the virtual address of the target memory page in the memory operation request, and then determine the physical address of the target memory page based on the base address and the virtual address. The source host machine can perform operations on the target memory page based on the physical address. For example, if the target memory page is memory page 1, the source host machine can determine the base address 1 corresponding to memory page 1 in level 4 page table 1 based on the virtual address 1 of memory page 1, and can determine the physical address 1 of memory page 1 based on the base address 1 and the virtual address 1. The source host machine can then perform operations on memory page 1 based on the physical address 1. If the memory operation request is a write request, then after the operation is performed on the target memory page, the data in the target memory page is updated. In this case, the page flag corresponding to the target memory page in the L3-level page table of the 4-level page table may be updated to a dirty flag, indicating that the data in the target memory page has been updated. For example, after the operation is performed on memory page 1, the page flag corresponding to memory page 1 in the L3-level page table 1 of the 4-level page table 1 may be updated to a dirty flag, indicating that the data in memory page 1 has been updated.Based on the above page marking method, during live migration of a virtual machine, when iteratively migrating data in memory pages marked as dirty, it is necessary to traverse all entries in the virtual machine's corresponding four-level page table to determine the page identifier of each memory page, thereby determining multiple target memory pages marked as dirty. This results in low migration efficiency for the data in the target memory pages. To address the above issues, the present disclosure provides an I / O OMMU-based page marking method. The technical solutions presented in this disclosure are described in detail below through specific embodiments. It should be noted that the following embodiments may exist independently or in combination, and identical or similar content will not be repeated in different embodiments. Figure 3 is a flow chart of a page marking method provided by an exemplary embodiment of the present disclosure. Referring to Figure 3, the method may include:

[0004] S301. During a live migration of a virtual machine, a memory operation request corresponding to the virtual machine is received. In this embodiment of the present disclosure, the execution subject may be a source host machine or a page marking device provided in the source host machine. The page marking device may be implemented via software or a combination of software and hardware. The page marking device may be a processor in the source host machine. For ease of understanding, the following description uses the source host machine as an example. The source host machine may be running at least one virtual machine. A virtual machine may be live migrated from the source host machine to a target host machine. For any virtual machine, the source host machine's memory may include multiple memory pages corresponding to the virtual machine. A memory operation request may be used to request an operation on the target memory page. For example, if virtual machine 1 is running in the source host machine, during the live migration of virtual machine 1, the source host machine may receive memory operation request 1 corresponding to virtual machine 1. Memory operation request 1 may be "write data A in memory page 1." The target memory page is memory page 1, and memory operation request 1 is used to request an operation on memory page 1.

[0005] S302. Perform an operation on the data in the target memory page according to the memory operation request. For example, if the memory operation request 1 may be "write data A in memory page 1," then data A may be written in memory page 1 according to the memory operation request 1.

[0006] S303: In the first storage space corresponding to the virtual machine, update the page identifier of the target memory page to a dirty identifier. The dirty identifier can be used to indicate that the data in the target memory page has been updated. Optionally, the source host machine's memory can have preset first storage spaces corresponding to multiple virtual machines. The first storage spaces in the memory are described below with reference to FIG4 . FIG4 is a schematic diagram of the memory of a source host machine according to an exemplary embodiment of the present disclosure. Referring to FIG4 , if virtual machines 0 and 1 are running in the source host machine, the source host machine's memory can have preset first storage space 0 corresponding to virtual machine 0 and first storage space 1 corresponding to virtual machine 1. The first storage space can include page identifiers corresponding to multiple memory pages. Optionally, a page identifier of "0" can be used to indicate that the data in the memory page has not been updated; a dirty identifier of "1" can be used to indicate that the data in the memory page has been updated. In an optional embodiment, the page flag corresponding to the target memory page in the first storage space corresponding to the virtual machine can be updated to a dirty flag in the following manner: determining a first storage address based on a memory operation request; determining a first storage space based on the first storage address; and updating the page flag of the target memory page in the first storage space to a dirty flag. The first storage address may refer to the starting address of the first storage space. For example, if virtual machine 1 corresponds to first storage space 1, after receiving memory operation request 1, the source host machine can determine first storage address 1 based on memory operation request 1, determine first storage space 1 based on first storage address 1, and then update the page flag of memory page 1 in first storage space 1 to a dirty flag. In the disclosed embodiment, during a virtual machine live migration, the source host machine can receive a memory operation request corresponding to the virtual machine and, based on the memory operation request, perform an operation on data in the target memory page. Furthermore, the page flag of the target memory page in the first storage space corresponding to the virtual machine can be updated to a dirty flag. Since the page flag of the target memory page can be updated to a dirty flag in the first storage space corresponding to the virtual machine, During iterative migration of a virtual machine from a source host machine to a target host machine, the page identifiers of each memory page can be obtained in the first storage space to identify the multiple target memory pages to be migrated, eliminating the need to traverse all entries in the record table corresponding to the virtual machine. This improves the efficiency of migrating data in the target memory pages. The following describes the page marking method in detail, based on the embodiment shown in FIG3 and in conjunction with FIG5 . FIG5 is a schematic flow chart of another page marking method provided by an exemplary embodiment of the present disclosure.Referring to FIG5 , the method may include:

[0007] S501. During live migration of a virtual machine, a memory operation request corresponding to the virtual machine is received. For example, during live migration of virtual machine 1, the source host machine may receive memory operation request 1 corresponding to virtual machine 1. Memory operation request 1 may be "write data A in memory page 1."

[0008] S502. Query the record table for record information corresponding to the target memory page based on the first virtual address. Optionally, the memory operation request may include the virtual address of the target memory page, and the virtual address may include the first virtual address and the second virtual address. The second virtual address may be the address offset corresponding to the target memory page. If the virtual address is a 48-bit address, then, from right to left, bits 0 to 11 may represent the second virtual address, and bits 12 to 47 may represent the first virtual address. For example, if virtual address 1 is 0x008 0x012 0x024 0x282 0x1 DE, then "0x1 DE" may be the second virtual address, and "0x008 0x012 0x024 0x282" may be the first virtual address. Optionally, the record table may be a multi-level page table. For example, the record table may be a four-level page table, which may include multiple page tables. As shown in Figure 6, the record table may include an L0-level page table, multiple L1-level page tables, multiple L2-level page tables, and multiple L3-level page tables. The record table may include record information corresponding to the target memory page. The record information includes the base address of the target memory page. Optionally, the source host machine may determine the base address of the L0-level page table in the record table from the context entry corresponding to the virtual machine, thereby determining the record table corresponding to the virtual machine. The record table may include multiple page tables, and the record information corresponding to the target memory page may be queried from the multiple page tables. Specifically, the querying of the record information corresponding to the target memory page from the multiple page tables includes the following five steps: Step 1. Since the base address of the L0-level page table in the record table can be determined from the context entry, the source host machine may determine the L0-level page table based on the base address of the L0-level page table in the record table. Step 2: The L0 page table may include multiple entries, each of which may store the address of an L1 page table. The L0 page table may be indexed based on bits 39 to 47 in the first portion of the virtual address to determine the address of the corresponding L1 page table. The L1 page table may then be determined based on the address of the L1 page table.For example, if record table 1 corresponding to virtual machine 1 is shown in FIG6 , and the first virtual address portion is "0x008 0x012 0x024 0x282," where bits 39 through 47 are "0x008," the address of the corresponding L1 page table can be determined in L0 page table 1 based on "0x008." Assuming that the address of L1 page table 1 can be determined in L0 page table 1 based on "0x008," L1 page table 1 can be determined based on the address of L1 page table 1. In step 3, the L1 page table may include multiple entries, each of which may store the address of an L2 page table. Bits 30 through 38 of the first virtual address portion can be used to index the corresponding L1 page table to determine the address of the corresponding L2 page table. Furthermore, the L2 page table can be determined based on the address of the L2 page table. For example, if record table 1 corresponding to virtual machine 1 is shown in FIG6 , and bits 30 to 38 of the first virtual address are "0x012," the address of the corresponding L2 page table 1 can be determined in L1 page table 1 based on "0x012." Assuming that the address of L2 page table 1 can be determined in L1 page table 1 based on "0x012," L2 page table 1 can be determined based on the address of L2 page table 1. In step 4, the L2 page table may include multiple entries, each of which may store the address of an L3 page table. Bits 21 to 29 of the first virtual address may be used to index the corresponding L2 page table to determine the address of the corresponding L3 page table. The L3 page table can then be determined based on the address of the L3 page table. For example, if record table 1 corresponding to virtual machine 1 is shown in FIG6 , and bits 21 to 29 of the first virtual address are "0x024," the address of the corresponding L3 page table 1 can be determined in L2 page table 1 based on "0x024." Assuming that the address of L3 page table 1 can be determined in L2 page table 1 based on "0x024," L3 page table 1 can be determined based on the address of L3 page table 1. In step 5, the L3 page table may include multiple entries, each of which may store record information corresponding to a memory page. Bits 12 to 20 of the first virtual address may be used to index the corresponding L3 page table to determine the record information corresponding to the target memory page.For example, if the target memory page is memory page 1, and if bits 12 to 20 in the first part of the virtual address are "0x282", then record information 1 corresponding to memory page 1 can be queried in L3 page table 1 based on "0x282". Record information 1 can include base address 1 of memory page 1, as shown in Figure 6.

[0009] S503. Determine the physical address corresponding to the target memory page based on the base address and the second virtual address. Optionally, the base address may be a 36-bit address, and the second virtual address may be 12 bits. Therefore, the base address and the second virtual address may be combined to obtain a 48-bit physical address, i.e., the physical address corresponding to the target memory page. For example, if the target memory page is memory page 1, if the base address 1 of memory page 1 is found in the record table, and if the second virtual address is "0x1 DE," then the physical address 1 corresponding to memory page 1 may be determined based on the base address 1 and the second virtual address 0x1 DE.

[0010] S504. Perform an operation on the data in the target memory page according to the physical address. For example, if memory operation request 1 may be "write data A in memory page 1," and if the physical address of memory page 1 is physical address 1, memory page 1 may be determined according to physical address 1, and data A may be written in memory page 1 according to memory operation request 1.

[0011] S505. Determine the context entry corresponding to the virtual machine based on the device identifier. Optionally, the memory operation request may include a device identifier. The device identifier may be a BDF number, in which case the device identifier includes a Bus number, a Dev number, and a Func number. For example, if the device identifier is 125:0:1, it indicates that the Bus number is 125, the Dev number is 0, and the Func number is 1. The context entry corresponding to the virtual machine is described below with reference to FIG6 . FIG6 is a schematic diagram of the structure of a page marking method provided by an exemplary embodiment of the present disclosure. Referring to FIG6 , the host machine may include a root tab Ie, multiple context tabs Ie, and multiple record tables. The source host machine may index the root tab Ie and the context tab Ie based on the device identifier and determine the context entry corresponding to the virtual machine in the context tab Ie. For example, if the device identifier in the memory operation request is 125:0:1, the context tab 1 e 125 corresponding to the Bus number 125 can be determined according to the device identifier, and the context entry 1 corresponding to the Dev number 0 and the Func number 1 in the context tab 1 e 125 can be determined. Then, the context entry 1 is the context entry corresponding to the virtual machine 1.

[0012] S506. Obtain a first storage address from the context entry. The context entry may store the base address of the L0-level page table in the four-level page table corresponding to the virtual machine, and the first storage address of the first storage space. The first storage address is pre-stored in the context entry. For example, if it is determined that virtual machine 1 corresponds to context entry 1, and if, as shown in FIG6 , context entry 1 stores the base address of L0-level page table 1 and first storage address 1, first storage address 1 may be obtained from the context entry.

[0013] S507. Determine a first storage space according to the first storage address. For example, as shown in FIG6 , the source host machine may determine first storage space 1 according to first storage address 1.

[0014] S508. Update the page identifier of the target memory page to a dirty identifier in the first storage space. The first storage space may store a page identifier bitmap corresponding to the virtual machine. The page identifier bitmap may include page identifiers corresponding to multiple memory pages corresponding to the virtual machine. The page identifier bitmap is described below in conjunction with FIG7 . FIG7 is a schematic diagram of a page identifier bitmap provided by an exemplary embodiment of the present disclosure. Referring to FIG7 , if virtual machine 1 corresponds to 1000 memory pages, namely memory page 1, memory page 2, ..., memory page 1000, then page identifier bitmap 1 may be "01100 ... 1". Bit 1 may be used to represent the page identifier corresponding to memory page 1, bit 2 may be used to represent the page identifier corresponding to memory page 2, ..., and bit 1000 may be used to represent the page identifier corresponding to memory page 1000. In an optional embodiment, the page identifier of the target memory page can be updated to the dirty identifier in the first storage space in the following manner: in the page identifier bitmap of the first storage space, the current page identifier corresponding to the target memory page is determined; if the current page identifier is different from the dirty identifier, the current page identifier is updated to the dirty identifier. For example, as shown in FIG6, if the first storage space 1 stores the page identifier bitmap 1 shown in FIG7 O If the target memory page is memory page 1, the current page identifier 1 corresponding to memory page 1 can be determined in page identifier bitmap 1. If the current page identifier 1 is "0" and the dirty identifier is represented by "1", the current page identifier corresponding to memory page 1 can be updated to the dirty identifier, that is, "0" can be updated to "1".

[0015] S509. In the record information, determine whether the page identifier of the target memory page is a dirty identifier. Optionally, the record information may also include the page identifier of the target memory page. For example, if the target memory page is memory page 1, and the page identifier included in the record information 1 corresponding to memory page 1 is 0, the source host may determine whether the page identifier is a dirty identifier. If not, step S510 may be executed. o

[0016] S510. Update the page identifier of the target memory page to a dirty identifier. For example, if the page identifier included in record information 1 corresponding to memory page 1 is 0, the page identifier of the target memory page can be updated to a dirty identifier, i.e., updated from "0" to "1." Optionally, updating the page identifier in the record information corresponding to the target memory page to a dirty identifier allows the source host machine to obtain the page identifier corresponding to the target memory page from the first storage space and compare it with the page identifier in the record information during subsequent migration. If they match and are both dirty, the data in the target memory page can be migrated. The page identifier in the record information can serve as a redundant identifier. In embodiments of the present disclosure, during virtual machine live migration, the source host machine can receive a memory operation request corresponding to the virtual machine and, based on the first portion of the virtual address, query the record table for the record information corresponding to the target memory page. Based on the base address and the second portion of the virtual address, the source host machine can determine the physical address corresponding to the target memory page. Operations can then be performed on the data in the target memory page based on the physical address. The source host machine can determine the context entry corresponding to the virtual machine based on the device identifier, obtain the first storage address from the context entry, and determine the first storage space based on the first storage address. The source host machine can then update the page identifier of the target memory page to a dirty flag in the first storage space. The source host machine can determine whether the page identifier of the target memory page is dirty based on the record information and update the page identifier of the target memory page to the dirty flag. Because the page identifier of the target memory page can be updated to the dirty flag in the first storage space corresponding to the virtual machine, during iterative migration of the virtual machine from the source host machine to the target host machine, the page identifiers of each memory page can be obtained in the first storage space to determine the multiple target memory pages to be migrated. This eliminates the need to traverse all entries in the record table corresponding to the virtual machine, thereby improving the efficiency of migrating data in the target memory pages. It should be noted that, based on the page marking method shown in FIG. 2 or FIG. 5 , when performing iterative migration of multiple memory pages corresponding to a virtual machine during live migration, the efficiency of identifying dirty memory pages can be improved, thereby improving the efficiency of migrating data in dirty memory pages. This reduces the downtime of the virtual machine caused by the live migration and improves the efficiency of hot migration of the virtual machine. The process of iteratively migrating multiple memory pages corresponding to a virtual machine will be described below with reference to FIG. FIG. 8 is a schematic diagram of a process for iteratively migrating multiple memory pages corresponding to a virtual machine, according to an exemplary embodiment of the present disclosure. Referring to FIG. 8 , the method may include:

[0017] S801. Determine at least one dirty memory page from multiple memory pages corresponding to the virtual machine based on page identifiers of each memory page corresponding to the virtual machine in the first storage space. In an optional embodiment, determine at least one dirty memory page from multiple memory pages corresponding to the virtual machine based on page identifiers of each memory page corresponding to the virtual machine in the first storage space: determine at least one target page identifier in a page identifier bitmap, where the value of the target page identifier is a value corresponding to the dirty identifier; and determine the memory page corresponding to the at least one target page identifier as the at least one dirty memory page. As shown in FIG6 , the source host machine may determine a device identifier and determine a context entry corresponding to the virtual machine based on the device identifier. The context entry may include a first storage address. The source host machine may determine the first storage address from the context entry corresponding to the virtual machine and determine a first storage space based on the first storage address. The first storage space may store a page identifier bitmap corresponding to the virtual machine. The page identifier bitmap may include page identifiers corresponding to multiple memory pages. For example, if virtual machine 1 corresponds to 1000 memory pages, and if page identification bitmap 1 includes page identifications corresponding to the 1000 memory pages, assuming that 400 target page identifications, i.e., page identifications of "1", can be determined in the page identification bitmap, then the memory pages corresponding to the 400 target page identifications can be determined as dirty memory pages, and 400 dirty memory pages can be determined.

[0018] S802. Synchronize data in at least one dirty memory page from the source host machine where the virtual machine is currently located to a target host machine. The target host machine is the host machine to which the virtual machine is to be migrated. For example, if it is determined that there are 400 dirty memory pages, the data in each of the 400 dirty memory pages may be synchronized from the source host machine to the target host machine. Optionally, after synchronizing the data in at least one dirty memory page from the source host machine where the virtual machine is currently located to the target host machine, the page identifier corresponding to each memory page in the page identifier bitmap in the first storage space may be restored to "0."

[0019] 5803. Apply for a second storage space in the source host machine. Optionally, during the iterative migration of multiple memory pages corresponding to the virtual machine, the i-th migration can be performed based on the page identification bitmap in the first storage space (i is an integer greater than or equal to 1). Since the virtual machine is still running during the i-th migration, new dirty memory pages may be generated. Therefore, a second storage space can be applied for in the source host machine. The second storage space can be used to store the page identification bitmap used for the i+1th migration, so that the i+1th migration can be performed based on the page identification bitmap in the second storage space. 5804. Determine a second storage address of the second storage space.

[0020] S805. In the context entry corresponding to the virtual machine, update the first storage address to the second storage address. Optionally, if the virtual machine corresponds to multiple context entries, the first storage addresses in all of the multiple context entries may be updated to the second storage address. For example, if context entry 1 corresponding to virtual machine 1 stores first storage address 1 corresponding to the first storage space, first storage address 1 may be updated to the second storage address. If virtual machine 1 also corresponds to a context entry corresponding to Dev 30 and Func 7 in context table 0, first storage address 1 in that context entry may be updated to the second storage address. Because the page identification bitmap used for the i-th migration can be stored in the first storage space, and the page identification bitmap used for the (i+1)-th migration can be stored in the second storage space, confusion in the page identification bitmaps during the migration process is avoided, thereby improving the accuracy of migrating data in multiple memory pages. In an embodiment of the present disclosure, the source host can determine at least one dirty memory page from the multiple memory pages corresponding to the virtual machine based on the page identifiers of each memory page in the first storage space, and synchronize the data in the at least one dirty memory page from the source host where the virtual machine is currently located to the target host. The source host can also request a second storage space in the source host, determine a second storage address in the second storage space, and update the first storage address to the second storage address in the context entry corresponding to the virtual machine. During the iterative migration of the virtual machine from the source host to the target host, the page identifiers of each memory page can be obtained in the first storage space to determine the multiple target memory pages to be migrated. This eliminates the need to traverse all entries in the record table corresponding to the virtual machine, thereby improving the efficiency of migrating data in the target memory pages and, in turn, improving the efficiency of live migration of the virtual machine. Figure 9 is a schematic diagram of a page marking device provided in an exemplary embodiment of the present disclosure. Referring to FIG. 9 , the page marking apparatus 10 includes a receiving module 11, an operating module 12, and a first updating module 13. The receiving module 11 is configured to receive a memory operation request corresponding to a virtual machine during live migration, wherein the memory operation request is used to request an operation on a target memory page; the operating module 12 is configured to operate on data in the target memory page according to the memory operation request. The first updating module 13 is configured to update the page flag of the target memory page to a dirty flag in a first storage space corresponding to the virtual machine, wherein the dirty flag is used to indicate that the data in the target memory page has been updated during the live migration of the virtual machine.The page marking device provided in the embodiments of the present disclosure can implement the technical solutions shown in the above-mentioned method embodiments. Its implementation principles and beneficial effects are similar and will not be further described here. In one possible implementation, the first update module 13 is specifically configured to: determine a first storage address based on the memory operation request; determine a first storage space based on the first storage address; and update the page identifier of the target memory page to the dirty identifier in the first storage space. In one possible implementation, the memory operation request includes a device identifier; the first update module 13 is specifically configured to: determine a context entry corresponding to the virtual machine based on the device identifier; obtain the first storage address from the context entry, where the first storage address is pre-stored in the context entry. In one possible implementation, the first storage space stores a page identifier bitmap corresponding to the virtual machine; the first update module 13 is specifically configured to: determine a current page identifier corresponding to the target memory page from the page identifier bitmap in the first storage space; and if the current page identifier is different from the dirty identifier, update the current page identifier to the dirty identifier. In one possible embodiment, the memory operation request includes the virtual address of the target memory page, where the virtual address includes a first virtual address portion and a second virtual address portion. The operation module 12 is specifically configured to: query a record table for record information corresponding to the target memory page based on the first virtual address portion, where the record information includes the base address of the target memory page; determine the physical address corresponding to the target memory page based on the base address and the second virtual address portion; and perform an operation on the data in the target memory page based on the physical address. In one possible embodiment, the record information also includes a page identifier of the target memory page; the first update module 13 is further configured to determine, from the record information, whether the page identifier of the target memory page is the dirty identifier; and if not, update the page identifier of the target memory page to the dirty identifier. The page marking device provided in the embodiment of the present disclosure can implement the technical solution shown in the above-mentioned method embodiment. Its implementation principles and beneficial effects are similar and are not further described here. Figure 10 is a schematic structural diagram of another page marking device provided in an exemplary embodiment of the present disclosure.Referring to FIG. 10 , based on the embodiment shown in FIG. 9 , the page marking device 10 further includes: a first determination module 14 and a synchronization module 15. The first determination module 14 is configured to determine, based on the page identifiers of each memory page corresponding to the virtual machine in the first storage space, at least one dirty memory page among the multiple memory pages corresponding to the virtual machine; and the synchronization module 15 is configured to synchronize data in the at least one dirty memory page from the source host machine currently hosting the virtual machine to a target host machine, where the target host machine is the host machine to which the virtual machine is to be migrated. The page marking device provided in the disclosed embodiment can implement the technical solutions shown in the aforementioned method embodiments, and their implementation principles and beneficial effects are similar and will not be further described here. In one possible implementation, a page identifier bitmap corresponding to the virtual machine is stored in the first storage space; the first determination module 14 is specifically configured to: determine at least one target page identifier in the page identifier bitmap, where the value of the target page identifier is the value corresponding to the dirty identifier; and determine the memory page corresponding to the at least one target page identifier as the at least one dirty memory page. The page marking device provided in the embodiments of the present disclosure can implement the technical solutions shown in the above-mentioned method embodiments. Its implementation principles and beneficial effects are similar and will not be further described here. Figure 11 is a schematic diagram of the structure of another page marking device provided in the exemplary embodiments of the present disclosure. Referring to Figure 11 , based on the embodiment shown in Figure 10 , the page marking device 10 further includes: an application module 16, a second determination module 17, and a second update module 18. The application module 16 is configured to apply for a second storage space in the source host machine; the second determination module 17 is configured to determine a second storage address of the second storage space; and the second update module 18 is configured to update the first storage address to the second storage address in the context entry corresponding to the virtual machine. The page marking device provided in the embodiments of the present disclosure can implement the technical solutions shown in the above-mentioned method embodiments. Its implementation principles and beneficial effects are similar and will not be further described here. Referring to Figure 12 , an exemplary embodiment of the present disclosure provides a schematic diagram of the structure of an electronic device. The electronic device 20 may include a processor 21 and a memory 22. For example, the processor 21 and the memory 22 are interconnected via a bus 23. The memory 22 stores computer-executable instructions; the processor 21 executes the computer-executable instructions stored in the memory 22, so that the processor 21 performs the method shown in the above method embodiment. The electronic device shown in FIG12 may be the source host machine described in any of the above embodiments.Accordingly, embodiments of the present disclosure provide a computer-readable storage medium storing computer-executable instructions. When executed by a processor, the computer-executable instructions are used to implement the methods described in the above method embodiments. Accordingly, embodiments of the present disclosure may also provide a computer program product, including a computer program. When executed by a processor, the computer program may implement the methods described in the above method embodiments. Those skilled in the art will appreciate that embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware. Furthermore, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROMs, optical storage, etc.) containing computer-usable program code. The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to embodiments of the present disclosure. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, may be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, such that the instructions, when executed by the processor of the computer or other programmable data processing device, produce means for implementing the functions specified in one or more flows in the flowchart and / or one or more blocks in the block diagram. These computer program instructions can also be stored in a computer-readable memory capable of directing the computer or other programmable data processing device to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means, which implement the functions specified in one or more flows in the flowchart and / or one or more blocks in the block diagram. These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, such that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more flows in the flowchart and / or one or more blocks in the block diagram. In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.Memory may include non-persistent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory such as read-only memory (ROM) or flash RAM. O Memory is an example of computer-readable media. Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can implement information storage using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change RAM (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmitting medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media, such as modulated data signals and carrier waves. It should also be noted that the terms "comprise," "include," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, product, or apparatus comprising a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, product, or apparatus. Without further limitation, the phrase "comprising a..." does not preclude the presence of additional identical elements in the process, method, product, or apparatus comprising the recited elements. The foregoing description is merely an example of the present disclosure and is not intended to limit the present disclosure. Various modifications and variations of the present disclosure will be apparent to those skilled in the art. Any modifications, equivalent substitutions, improvements, and the like made within the spirit and principles of the present disclosure are intended to be encompassed by the claims of the present disclosure.

Claims

Claims 1. A page marking method, comprising: During the live migration of a virtual machine, receive a memory operation request corresponding to the virtual machine, where the memory operation request is used to request an operation on a target memory page; Operate on the data in the target memory page according to the memory operation request; In a first storage space corresponding to the virtual machine, update the page identifier of the target memory page to a dirty identifier, where the dirty identifier is used to indicate that the data in the target memory page has been updated.

2. The method according to claim 1, in the first storage space corresponding to the virtual machine, updating the page identifier corresponding to the target memory page to a dirty identifier, includes: Determine a first storage address according to the memory operation request; Determine the first storage space according to the first storage address; In the first storage space, update the page identifier of the target memory page to the dirty identifier.

3. The method according to claim 2, wherein the memory operation request includes a device identifier; determining a first storage address according to the memory operation request includes: Determine a context entry corresponding to the virtual machine according to the device identifier; Obtain the first storage address in the context entry, where the first storage address is pre-stored in the context entry.

4. According to the method of claim 2 or 3, a page identifier bitmap corresponding to the virtual machine is stored in the first storage space; updating the page identifier of the target memory page to the dirty identifier in the first storage space includes: determining a current page identifier corresponding to the target memory page in the page identifier bitmap in the first storage space; if the current page identifier is different from the dirty identifier, then update the current page identifier to the dirty identifier.

5. The method according to any one of claims 1-4, wherein the memory operation request includes a virtual address of the target memory page, and the virtual address includes a first part of the virtual address and a second part of the virtual address; Operating on the data in the target memory page according to the memory operation request includes: Query record information corresponding to the target memory page in a record table according to the first part of the virtual address, where the record information includes a base address of the target memory page; Determine a physical address corresponding to the target memory page according to the base address and the second part of the virtual address; operate on the data in the target memory page according to the physical address.

6. The method according to claim 5, wherein the recorded information further includes a page identifier of the target memory page; the method further includes: In the record information, determine whether the page identifier of the target memory page is the dirty identifier; If not, then update the page identifier of the target memory page to the dirty identifier.

7. The method according to any one of claims 1-6, the method further comprising: Determine at least one dirty memory page among multiple memory pages corresponding to the virtual machine according to the page identifiers of the respective memory pages corresponding to the virtual machine in the first storage space; Synchronize the data in the at least one dirty memory page from a source host where the virtual machine currently resides to a target host, where the target host is the host to which the virtual machine is to be migrated.

8. The method according to claim 7, wherein a page identifier bitmap corresponding to the virtual machine is stored in the first storage space; Determining at least one dirty memory page among multiple memory pages corresponding to the virtual machine according to the page identifiers of the respective memory pages corresponding to the virtual machine in the first storage space includes: Determine at least one target page identifier in the page identifier bitmap, where the value of the target page identifier is the value corresponding to the dirty identifier corresponding value; Determine the memory pages corresponding to the at least one target page identifier as the at least one dirty memory page.

9. The method according to claim 7 or 8, further comprising: Apply for a second storage space in the source host; Determine a second storage address of the second storage space; In the context entry corresponding to the virtual machine, update the first storage address to the second storage address.

10. A page marking device, comprising: A receiving module, an operating module, and a first updating module, wherein the receiving module is configured to receive, during the hot migration of the virtual machine, a memory operation request corresponding to the virtual machine, and the memory operation request is used to request an operation on a target memory page; the operating module is configured to operate on the data in the target memory page according to the memory operation request; and the first updating module is configured to update a page identifier of the target memory page to a dirty identifier in a first storage space corresponding to the virtual machine, and the dirty identifier is used to indicate that the data in the target memory page has been updated.

11. An electronic device, comprising: At least one processor; And a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to cause the electronic device to execute the method according to any one of claims 1-9.

12. A computer-readable storage medium storing computer-executable instructions, which when executed by a processor, implement the method according to any one of claims 1-9.

13. A computer program product comprising a computer program, which when executed by a processor, implements the method according to any one of claims 1-9.

Citation Information

Patent Citations

  • Page marking method, device and equipment

    CN120336204A

  • Virtualization method for device memory management unit

    CN107193759A

  • Physical page address analysis-based virtual machine memory isolation detection method

    CN108491716A

  • Virtual machine migration method and device

    CN112148421A

  • Data processing method, migration method of secure virtual machine, related device and architecture

    CN113342473A