# US 2021/0342260 A1 · Indirect interface for virtual machine free page hinting

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

- Number: US 2021/0342260 A1
- Document ID: US20210342260A1
- Status: Published application
- Kind: A1
- Application number: 16/863,180
- Filed: 2020-04-30
- Published: 2021-11-04
- Earliest claimed: 2020-04-30
- Assignees: Red Hat, Inc.
- Applicants: Red Hat, Inc.
- Inventors: Michael Tsirkin
- Web page: https://patentgrep.com/patent/US20210342260A1

## CPC

- G06F 12/0253: {Garbage collection, i.e. reclamation of unreferenced memory}
- G06F 9/45558: {Hypervisor-specific management and integration aspects}
- G06F 12/023: {Free address space management}
- G06F 12/1009: using page tables, e.g. page table structures
- G06F 12/109: for multiple virtual address spaces, e.g. segmentation (G06F12/1036 takes precedence)
- G06F 12/0284: {Multiple user address space allocation, e.g. using different base addresses (interprocessor communication G06F15/163)}
- G06F 2009/45583: {Memory management, e.g. access or allocation}
- G06F 2212/1024: Latency reduction
- G06F 2212/152: Virtualized environment, e.g. logically partitioned system
- G06F 2212/657: Virtual address space management
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A system includes a memory, a processor in communication with the memory, a hypervisor, and a guest OS. The guest OS is configured to store a plurality of hints in a list at a memory location. Each hint includes an address value and the memory location of the list is included in one of the respective address values associated with the plurality of hints. The guest OS is also configured to pass the list to the hypervisor. Each address value points to a respective memory page of a plurality of memory pages including a first memory page and a last memory page. The hypervisor is configured to free the first memory page pointed to by a first hint of the plurality of hints and free the last memory page pointed to by a second hint of the plurality of hints. Additionally, the last memory page includes the list.

## Claims

### Claim 1

A system comprising:
a memory;
a processor in communication with the memory;
a hypervisor; and
a guest OS configured to:
store a plurality of hints in a list at a memory location, wherein each hint includes an address value, and wherein the memory location of the list is included in one of the respective address values associated with the plurality of hints, and
pass the list to the hypervisor, wherein each address value points to a respective memory page of a plurality of memory pages including a first memory page and a last memory page,
wherein the hypervisor is configured to:
free the first memory page pointed to by a first hint of the plurality of hints, and
free the last memory page pointed to by a second hint of the plurality of hints, wherein the last memory page includes the list.

### Claim 2 (depends on 1)

The system of claim 1, wherein each address value is associated with a respective length as a respective pair, the respective pair is a pair of 64-bit values.

### Claim 3 (depends on 1)

The system of claim 1, wherein the memory location is the last memory page.

### Claim 4 (depends on 1)

The system of claim 1, wherein the plurality of memory pages are included in a range of memory.

### Claim 5 (depends on 1)

The system of claim 1, wherein freeing the first memory page includes marking the first memory page as free.

### Claim 6 (depends on 1)

The system of claim 1, wherein the hypervisor is further configured to discard the list, and wherein the list is discarded after each respective memory page of the plurality of memory pages is freed.

### Claim 7 (depends on 1)

The system of claim 1, wherein the hypervisor is configured to free the plurality of memory pages according to the order the hints appear in the list.

### Claim 8

A method comprising:
storing, by a guest OS, a plurality of hints in a list at a memory location, wherein each hint includes an address value, and wherein the memory location of the list is included in one of the respective address values associated with the plurality of hints;
passing, by a guest OS, the list to a hypervisor, wherein each address value points to a respective memory page of a plurality of memory pages including a first memory page and a last memory page;
freeing, by the hypervisor, the first memory page pointed to by a first hint of the plurality of hints; and
freeing, by the hypervisor, the last memory page pointed to by a second hint of the plurality of hints, wherein the last memory page includes the list.

### Claim 9 (depends on 8)

The method of claim 8, wherein freeing the first memory page includes marking the first memory page as free.

### Claim 10 (depends on 8)

The method of claim 8, further comprising discarding, by the hypervisor, the list.

### Claim 11 (depends on 10)

The method of claim 10, wherein the list is discarded after each respective memory page of the plurality of memory pages is freed.

### Claim 12 (depends on 8)

The method of claim 8, wherein the hypervisor frees the plurality of memory pages according to the order the hints appear in the list.

### Claim 13

A method comprising:
storing, by a guest OS, a plurality of hints at a memory location, wherein each hint includes an address value, and wherein the memory location of the plurality of hints is included in one of the respective address values;
passing, by a guest OS, a range of memory to a hypervisor, wherein the range of memory includes the memory location; and
marking, by the hypervisor, the range of memory including the plurality of hints as free, wherein the range of memory includes the respective address values associated with the plurality of hints.

### Claim 14 (depends on 13)

The method of claim 13, wherein each address value is associated with a respective length value as a respective pair, the respective pair is a pair of 64-bit values.

### Claim 15 (depends on 13)

The method of claim 13, wherein the memory location is a memory page.

### Claim 16 (depends on 15)

The method of claim 15, wherein the plurality of hints are saved as entries in a list in the memory page.

### Claim 17 (depends on 16)

The method of claim 16, wherein the range of memory is a plurality of memory pages.

### Claim 18 (depends on 17)

The method of claim 17, wherein each hint in the list points to a respective memory page of the plurality of memory pages in the range of memory.

### Claim 19 (depends on 18)

The method of claim 18, wherein the hypervisor is configured to act on the memory page with the plurality of hints as if the memory page itself was hinted.

### Claim 20 (depends on 19)

The method of claim 19, wherein the hypervisor acts on the plurality of hints in the order the hints appear in the list.
