# US 2022/0291945 A1 · System For Live Migration of Virtual Machines With Assigned Peripheral Devices

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2022/0291945 A1
- Document ID: US20220291945A1
- Status: Published application
- Kind: A1
- Application number: 17/831,068
- Filed: 2022-06-02
- Published: 2022-09-15
- Earliest claimed: 2019-02-12
- Assignees: Google Inc.
- Applicants: Google LLC
- Inventors: Benjamin Charles Serebrin; Grigory Makarevich; Eric Northup
- Web page: https://patentgrep.com/patent/US20220291945A1

## CPC

- G06F 9/45558: {Hypervisor-specific management and integration aspects}
- G06F 9/4856: {resumption being on a different machine, e.g. task migration, virtual machine migration (G06F9/5088 takes precedence)}
- G06F 12/1009: using page tables, e.g. page table structures
- G06F 2009/4557: {Distribution of virtual machine instances; Migration and load balancing}
- G06F 2009/45583: {Memory management, e.g. access or allocation}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Hardware transactions or other techniques, such as custom PCIe handling devices, are used to atomically move pages from one hoses memory to another hoses memory. The hosts are connected by one or two non-transparent bridges (NTBs), which make each host's memory and devices available to the other, while allowing each host to reboot independently.

## Claims

### Claim 1

A method of live migration of a guest virtual machine with one or more attached peripheral devices, the method comprising:
coupling a source host to a target host through at least one non-transparent bridge (NTB);
identifying a page of memory to be copied from the source host to the target host, the page of memory corresponding to the guest;
changing a mapping of the identified page to identify a memory address of the target host, the memory address of the target host being aliased in the source host and not visible to the one or more attached peripheral devices;
copying data for the identified page from the source host to the target host;
invalidating page table entries of the source host corresponding to the data that was copied; and
providing access to the copied pages on the target host to the one or more attached peripheral devices.

### Claim 2 (depends on 1)

The method of claim 1, wherein the NTB is included in a peripheral component interconnect device.

### Claim 3 (depends on 1)

The method of claim 1, wherein changing the mapping for the identified page invokes a first helper thread.

### Claim 4 (depends on 3)

The method of claim 3, wherein the invalidating the page table entries of the source host and copying the data for the identified page invokes a second page table entry (PTE)-editing thread.

### Claim 5 (depends on 4)

The method of claim 4, further comprising sending a first signal from the helper thread to the PTE-editing thread after changing the mapping of the identified page, the first signal indicating a completion of changing the mapping of the identified page.

### Claim 6 (depends on 4)

The method of claim 4, further comprising sending a second signal from the PTE-editing thread to the helper thread, the second signal indicating a completion of the copying of the data for the identified page from the source host to the target host.

### Claim 7 (depends on 1)

The method of claim 1, further comprising implementing predetermined time limits for completion of at least one of the changing of the mapping of the identified page, the copying of the data for the identified page, or the invalidating of the page table entries of the source host.

### Claim 8 (depends on 1)

The method of claim 1, further comprising reading the identified page to be copied, prior to copying the data, if one or more virtual central processing units (VCPUs) are able to access the identified page.

### Claim 9 (depends on 1)

The method of claim 1, further comprising aborting the copying of the data when the one or more attached peripheral devices attempt to access the data during copy.

### Claim 10 (depends on 1)

The method of claim 1, wherein the memory address of the target host is aliased in a memory mapped input/output of the source host.

### Claim 11

A system for live migration of a guest virtual machine with one or more attached peripheral devices, the system comprising:
a source host physical machine including one or more memories and one or more processors, the one or more memories supporting the guest virtual machine to be migrated, the host physical machine being coupled to a target host through at least one non-transparent bridge (NTB);
wherein the one or more processors of the source host are configured to:
identify a page of memory to be copied from the source host to the target host, the page of memory corresponding to the guest;
change a mapping of the identified page to identify a memory address of the target host, the memory address of the target host being aliased in the source host and not visible to the one or more attached peripheral devices;
copy data for the identified page from the source host to the target host;
invalidate page table entries of the source host corresponding to the data that was copied; and
provide access to the copied pages on the target host to the one or more attached peripheral devices.

### Claim 12 (depends on 11)

The system of claim 11, wherein the NTB is included in a peripheral component interconnect device, the peripheral component interconnect device being coupled between the source host and the one or more attached peripheral devices.

### Claim 13 (depends on 11)

The system of claim 11, wherein the one or more processors include one or more processing cores, and wherein a first processing core changes the mapping for the identified page.

### Claim 14 (depends on 13)

The system of claim 13, wherein a second processing core invalidates the page table entries of the source host and copies the data for the identified page.

### Claim 15 (depends on 14)

The system of claim 14, wherein the first processing core sends a first signal to the second processing core after changing the mapping of the identified page, the first signal indicating a completion of changing the mapping of the identified page.

### Claim 16 (depends on 14)

The system of claim 14, wherein the second processing core sends a second signal to the first processing core, the second signal indicating a completion of the copying of the data for the identified page from the source host to the target host.

### Claim 17 (depends on 11)

The system of claim 11, wherein the one or more processors are further configured to implement predetermined time limits for completion of at least one of the changing of the mapping of the identified page, the copying of the data for the identified page, or the invalidating of the page table entries of the source host.

### Claim 18 (depends on 11)

The system of claim 11, wherein the one or more processors are further configured to read the identified page to be copied, prior to copying the data, if one or more virtual central processing units (VCPUs) are able to access the identified page.

### Claim 19 (depends on 11)

The system of claim 11, wherein the one or more processors are further configured to abort the copying of the data when the one or more attached peripheral devices attempt to access the data during copy.

### Claim 20 (depends on 11)

The system of claim 11, wherein the memory address of the target host is aliased in a memory mapped input/output of the source host.
