# US 2022/0035647 A1 · Utilizing virtual input/output memory management units (iommu) for tracking encryption status of memory pages

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

- Number: US 2022/0035647 A1
- Document ID: US20220035647A1
- Status: Published application
- Kind: A1
- Application number: 16/943,551
- Filed: 2020-07-30
- Published: 2022-02-03
- Earliest claimed: 2020-07-30
- Assignees: Red Hat, Inc.
- Applicants: Red Hat, Inc.
- Inventors: Michael Tsirkin
- Web page: https://patentgrep.com/patent/US20220035647A1

## CPC

- G06F 9/45558: {Hypervisor-specific management and integration aspects}
- G06F 9/445: Program loading or initiating (bootstrapping G06F9/4401; security arrangements for program loading or initiating G06F21/57)
- G06F 12/0646: {Configuration or reconfiguration}
- G06F 12/1036: for multiple virtual address spaces, e.g. segmentation (G06F12/1045 takes precedence)
- G06F 13/28: using burst mode transfer, e.g. direct memory access {DMA}, cycle steal (G06F13/32 takes precedence)
- H04L 9/0894: {Escrow, recovery or storing of secret information, e.g. secret key escrow or cryptographic key storage}
- G06F 2009/45583: {Memory management, e.g. access or allocation}
- G06F 2212/152: Virtualized environment, e.g. logically partitioned system
- H04L 9/0869: {involving random numbers or seeds}
- H04L 9/0872: {using geo-location information, e.g. location data, time, relative position or proximity to other entities}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

Systems and methods for memory management for virtual machines. An example method may include creating, by a hypervisor running on a host computer system, a virtual device associated with a virtual machine managed by the hypervisor. The virtual device may include a virtual input/output memory management unit (IOMMU). The method may further include appending, by a driver of the virtual device, a plurality of page table entries to a page table of the virtual IOMMU, wherein each page table entry of the plurality of page table entries references unencrypted memory pages used by the virtual machine. Responsive to receiving a memory access request with respect to a memory page, the hypervisor may determine, using the page table of the virtual IOMMU, whether the memory page is encrypted.

## Claims

### Claim 1

A method comprising:
creating, by a hypervisor running on a host computer system, a virtual device associated with a virtual machine managed by the hypervisor, wherein the virtual device comprises a virtual input/output memory management unit (IOMMU);
appending, by a driver of the virtual machine, a plurality of page table entries to a page table of the virtual IOMMU, wherein each page table entry of the plurality of page table entries references unencrypted memory pages used by the virtual machine; and
responsive to receiving a memory access request with respect to a memory page, determining, by the hypervisor using the page table of the virtual IOMMU, whether the memory page is encrypted.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
notifying the virtual machine that the virtual device performs direct memory access (DMA) operations.

### Claim 3 (depends on 1)

The method of claim 1, further comprising: responsive to determining that the memory page in unencrypted, performing at least one of: reading the memory page or writing the memory page.

### Claim 4 (depends on 1)

The method of claim 1, wherein creating the virtual device further comprises: causing the virtual machine to load a driver associated with the virtual device.

### Claim 5 (depends on 1)

The method of claim 1, further comprising: responsive to failing to locate a reference to the memory page in the page table of the virtual IOMMU, determining that the memory page is encrypted.

### Claim 6

The method of page 1, further comprising: responsive to locating a reference to the memory page in the page table of the virtual IOMMU, determining that the memory page is unencrypted.

### Claim 7 (depends on 1)

The method of claim 1, further comprising:
assuming, by the virtual machine, that the virtual device performs direct memory access (DMA) operations.

### Claim 8

A system, comprising:
a memory;
a processing device operatively coupled to the memory, the processing device configured to:
create a virtual device associated with a virtual machine managed by a hypervisor, wherein the virtual device comprises a virtual input/output memory management unit (IOMMU);
append a plurality of page table entries to a page table of the virtual IOMMU, wherein each page table entry of the plurality of page table entries references unencrypted memory pages used by the virtual machine; and
responsive to receiving a memory access request with respect to a memory page, determine, using the page table of the virtual IOMMU, whether the memory page is encrypted.

### Claim 9 (depends on 8)

The system of claim 8, wherein the processing device is configured to:
notify the virtual machine that the virtual device performs direct memory access (DMA) operations.

### Claim 10 (depends on 8)

The system of claim 8, wherein the processing device is configured to:
responsive to determining that the memory page in unencrypted, performing at least one of: reading the memory page or writing the memory page.

### Claim 11 (depends on 8)

The system of claim 8, wherein the processing device is configured to:
causing the virtual machine to load a driver associated with the virtual device.

### Claim 12 (depends on 8)

The system of claim 8, wherein the processing device is configured to:
responsive to failing to locate a reference to the memory page in the page table of the virtual IOMMU, determining that the memory page is encrypted.

### Claim 13

The system of page 8, wherein the processing device is configured to:
responsive to locating a reference to the memory page in the page table of the virtual IOMMU, determining that the memory page is unencrypted.

### Claim 14 (depends on 8)

The system of claim 8, wherein the processing device is configured to:
assume that the virtual device performs direct memory access (DMA) operations.

### Claim 15

A non-transitory machine-readable storage medium storing instructions that cause a processing device to:
create a virtual device associated with a virtual machine managed by a hypervisor, wherein the virtual device comprises a virtual input/output memory management unit (IOMMU);
append a plurality of page table entries to a page table of the virtual IOMMU, wherein each page table entry of the plurality of page table entries references unencrypted memory pages used by the virtual machine; and
responsive to receiving a memory access request with respect to a memory page, determine, using the page table of the virtual IOMMU, whether the memory page is encrypted.

### Claim 16 (depends on 15)

The non-transitory machine-readable storage medium of claim 15, wherein the processing device is configured to:
notify the virtual machine that the virtual device performs direct memory access (DMA) operations.

### Claim 17 (depends on 15)

The non-transitory machine-readable storage medium of claim 15, wherein the processing device is configured to:
responsive to determining that the memory page in unencrypted, performing at least one of: reading the memory page or writing the memory page.

### Claim 18 (depends on 15)

The non-transitory machine-readable storage medium of claim 15, wherein the processing device is configured to:
causing the virtual machine to load a driver associated with the virtual device.

### Claim 19 (depends on 15)

The non-transitory machine-readable storage medium of claim 15, wherein the processing device is configured to:
responsive to failing to locate a reference to the memory page in the page table of the virtual IOMMU, determining that the memory page is encrypted.

### Claim 20

The non-transitory machine-readable storage medium of page 15, wherein the processing device is configured to:
responsive to locating a reference to the memory page in the page table of the virtual IOMMU, determining that the memory page is unencrypted.
