# US 12,117,947 B2 · Information processing method, physical machine, and PCIE device

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

- Number: US 12,117,947 B2
- Document ID: US12117947B2
- Status: Granted
- Kind: B2
- Application number: 17/205,090
- Filed: 2021-03-18
- Published: 2021-07-22
- Granted: 2024-10-15
- Earliest claimed: 2019-07-31
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Changchun Ouyang; Shui Cao; Zihao Xiang
- Web page: https://patentgrep.com/patent/US12117947B2

## CPC

- G06F 13/28: using burst mode transfer, e.g. direct memory access {DMA}, cycle steal (G06F13/32 takes precedence)
- G06F 9/4411: {Configuring for operating with peripheral devices; Loading of device drivers}
- G06F 9/45558: {Hypervisor-specific management and integration aspects}
- G06F 9/544: {Buffers; Shared memory; Pipes}
- G06F 2009/4557: {Distribution of virtual machine instances; Migration and load balancing}
- G06F 2009/45583: {Memory management, e.g. access or allocation}
- G06F 2213/0026: PCI express
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The present disclosure relates to information processing methods, physical machines, and peripheral component interconnect express (PCIE) devices. In one example method, a PCIE device receives, in a live migration process of a to-be-migrated virtual machine (VM), a packet corresponding to the to-be-migrated VM, where the to-be-migrated VM is one of a plurality of VMs. The PCIE device determines a direct memory access (DMA) address based on the packet. The PCIE device sends the DMA address to a physical function (PF) driver.

## Claims

### Claim 1

An information processing method, wherein the information processing method is used in a physical machine, and wherein the method comprises:
receiving, by a peripheral component interconnect express (PCIE) device in a live migration process of a first virtual machine (VM) migrating from a first host to a second host, a packet sent to the first VM, wherein the packet includes a destination address indicating the first VM, wherein the PCIE device and the first host are disposed on the physical machine, wherein a physical function (PF) driver managing the PCIE device and a virtual machine manager (VMM) managing the first VM run in the first host, and wherein the second host is disposed on the physical machine or another physical machine;
determining, by the PCIE device based on the packet, a direct memory access (DMA) address corresponding to the first VM;
transferring, by the PCIE device, the DMA address to the PF driver;
generating, by the PF driver, a dirty bit used to indicate the DMA address; and
writing, by the PF driver, the dirty bit into a dirty bitmap, so that the VMM obtains the dirty bitmap, wherein the dirty bitmap is used to store an address of data that needs to be migrated in the live migration process of the first VM.

### Claim 2 (depends on 1)

The method according to claim 1, wherein transferring, by the PCIE device, the DMA address to the PF driver comprises:
writing, by the PCIE device, the DMA address into a buffer of a receive queue of the PF driver; and
sending, by the PCIE device, a first interrupt to the PF driver, wherein the first interrupt is used to indicate the PF driver to read the buffer of the receive queue.

### Claim 3 (depends on 1)

The method according to claim 1, wherein transferring, by the PCIE device, the DMA address to the PF driver comprises:
writing, by the PCIE device, the DMA address into a mailbox; and
sending, by the PCIE device, a first interrupt to the PF driver, wherein the first interrupt is used to indicate the PF driver to read the mailbox to obtain the DMA address.

### Claim 4 (depends on 1)

The method according to claim 1, wherein determining, by the PCIE device based on the packet, the DMA address corresponding to the first VM comprises:
obtaining, by the PCIE device based on the packet, N DMA addresses from L DMA addresses corresponding to the first VM, wherein the L DMA addresses and the N DMA addresses belong to a same group of memory pages, and wherein N is less than L; and
wherein transferring, by the PCIE device, the DMA address to the PF driver comprises:
transferring, by the PCIE device, the N DMA addresses to the PF driver.

### Claim 5 (depends on 1)

The method according to claim 1, wherein the dirty bitmap comprises a first dirty bitmap and a second dirty bitmap, wherein the first dirty bitmap is writable and the second dirty bitmap is readable, and wherein writing, by the PF driver, the dirty bit into the dirty bitmap comprises:
writing, by the PF driver, the dirty bit into the first dirty bitmap; and
changing, by the PF driver, the first dirty bitmap to readable, so that the VMM obtains the written dirty bit from the first dirty bitmap.

### Claim 6 (depends on 5)

The method according to claim 5, wherein after changing, by the PF driver, the first dirty bitmap to readable, the method further comprises:
changing, by the PF driver, the second dirty bitmap to writable, so that the PF driver writes information.

### Claim 7 (depends on 5)

The method according to claim 5, wherein after the VMM obtains the written dirty bit from the first dirty bitmap, the method further comprises:
clearing, by the PF driver, the first dirty bitmap.

### Claim 8

An information processing method, wherein the information processing method is used in a peripheral component interconnect express (PCIE) device, and wherein the method comprises:
receiving, in a live migration process of a first virtual machine (VM) migrating from a host to a second host, a packet sent to the first VM, wherein the packet includes a destination address indicating the first VM, wherein the PCIE device and the host are disposed on a physical machine, wherein a physical function (PF) driver managing the PCIE device and a virtual machine manager (VMM) managing the first VM run in the host, and wherein the second host is disposed on the physical machine or another physical machine;
determining, based on the packet, a direct memory access (DMA) address corresponding to the first VM; and
transferring the DMA address to the PF driver for processing by the host.

### Claim 9 (depends on 8)

The method according to claim 8, wherein transferring the DMA address to the PF driver comprises:
writing the DMA address into a buffer of a receive queue of the PF driver; and
sending a first interrupt to the PF driver, wherein the first interrupt is used to indicate the PF driver to read the buffer of the receive queue.

### Claim 10 (depends on 8)

The method according to claim 8, wherein transferring the DMA address to the PF driver comprises:
writing the DMA address into a mailbox; and
sending a first interrupt to the PF driver, wherein the first interrupt is used to indicate the PF driver to read the mailbox to obtain the DMA address.

### Claim 11 (depends on 8)

The method according to claim 8, wherein determining, based on the packet, the DMA address corresponding to the first VM comprises:
obtaining, based on the packet, N DMA addresses from L DMA addresses corresponding to the first VM, wherein the L DMA addresses and the N DMA addresses belong to a same group of memory pages, and wherein N is less than L; and
wherein transferring the DMA address to the PF driver comprises:
transferring the N DMA addresses to the PF driver.

### Claim 12

A physical machine, wherein a peripheral component interconnect express (PCIE) device and a first host are disposed on the physical machine, and wherein:
in a live migration process of a first virtual machine (VM) migrating from the first host to a second host, the PCIE device is configured to:
receive a packet sent to the first VM, wherein the packet includes a destination address indicating the first VM, wherein a physical function (PF) driver managing the PCIE device and a virtual machine manager (VMM) managing the first VM run in the first host, and wherein the second host is disposed on the physical machine or another physical machine;
determine, based on the packet, a direct memory access (DMA) address corresponding to the first VM; and
transfer the DMA address to the PF driver; and
the PF driver is configured to:
generate a dirty bit used to indicate the DMA address; and
write the dirty bit into a dirty bitmap, so that the VMM obtains the dirty bitmap, wherein the dirty bitmap is used to store an address of data that needs to be migrated in the live migration process of the first VM.

### Claim 13 (depends on 12)

The physical machine according to claim 12, wherein the PCIE device is configured to:
write the DMA address into a buffer of a receive queue of the PF driver; and
send a first interrupt to the PF driver, wherein the first interrupt is used to indicate the PF driver to read the buffer of the receive queue.

### Claim 14 (depends on 12)

The physical machine according to claim 12, wherein the PCIE device is configured to:
write the DMA address into a mailbox; and
send a first interrupt to the PF driver, wherein the first interrupt is used to indicate the PF driver to read the mailbox to obtain the DMA address.

### Claim 15 (depends on 12)

The physical machine according to claim 12, wherein the PCIE device is configured to:
obtain, based on the packet, N DMA addresses from L DMA addresses corresponding to the first VM, wherein the L DMA addresses and the N DMA addresses belong to a same group of memory pages, and wherein N is less than L; and
transfer the N DMA addresses to the PF driver.

### Claim 16 (depends on 12)

The physical machine according to claim 12, wherein the dirty bitmap comprises a first dirty bitmap and a second dirty bitmap, wherein the first dirty bitmap is writable and the second dirty bitmap is readable, and wherein the PF driver is configured to:
write the dirty bit into the first dirty bitmap; and
change the first dirty bitmap to readable, so that the VMM obtains the written dirty bit from the first dirty bitmap.

### Claim 17 (depends on 16)

The physical machine according to claim 16, wherein the PF driver is further configured to change the second dirty bitmap to writable, so that the PF driver writes information.

### Claim 18

A peripheral component interconnect express (PCIE) device, wherein the PCIE device is configured to perform operations comprising:
receiving, in a live migration process of a first virtual machine (VM) migrating from a host to a second host, a packet sent to the first VM, wherein the packet includes a destination address indicating the first VM, wherein the PCIE device and the host are disposed on a physical machine, wherein a physical function (PF) driver managing the PCIE device and a virtual machine manager (VMM) managing the first VM run in the host, and wherein the second host is disposed on the physical machine or another physical machine;
determining, based on the packet, a direct memory access (DMA) address corresponding to the first VM; and
transferring the DMA address to the PF driver for processing by the host.

### Claim 19 (depends on 18)

The PCIE device according to claim 18, wherein transferring the DMA address to the PF driver comprises:
writing the DMA address into a buffer of a receive queue of the PF driver; and
sending a first interrupt to the PF driver, wherein the first interrupt is used to indicate the PF driver to read the buffer of the receive queue.

### Claim 20 (depends on 18)

The PCIE device according to claim 18, wherein transferring the DMA address to the PF driver comprises:
writing the DMA address into a mailbox; and
sending a first interrupt to the PF driver, wherein the first interrupt is used to indicate the PF driver to read the mailbox to obtain the DMA address.
