IP Library Granted Patent US 11,860,792
Granted Patent B2
US 11,860,792 · App. 17/307,274 · Granted Jan 2, 2024

Memory access handling for peripheral component interconnect devices

Inventor: Michael Tsirkin (Ra'anana, IL)
Assignee: Red Hat, Inc.
G06F12/109G06F9/45558G06F9/4812G06F12/0238G06F12/1441G06F13/4221G06F2009/45583
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,860,792
App. No.
17/307,274
Granted
Jan 2, 2024
Kind
B2
Abstract

Systems and methods for memory management for virtual machines. An example method may include receiving, by a host computing system, a memory access request initiated by a peripheral component interconnect (PCI) device, wherein the memory access request comprises a memory address and an address translation flag specifying an address space associated with the memory address; and responsive to determining that the address translation flag is set to a first value indicating a host address space, causing a host system input/output memory management unit (IOMMU) to pass-through the memory access request.

Claims (40)

1. A method comprising:

receiving, by a host computing system, a memory access request initiated by a peripheral component interconnect (PCI) device, wherein the memory access request comprises a memory address and a first address translation flag indicative of whether the memory access request is a translated memory access request or an untranslated memory access request;

responsive to determining that the first address translation flag is set to a first value indicating that the memory access request is a translated memory access request, causing a host system input/output memory management unit (IOMMU) to pass-through the memory access request to host memory;

receiving an interrupt request initiated by the PCI device, wherein the interrupt request comprises the memory address and a second address translation flag;

responsive to determining that the second address translation flag is set to a second value, causing the host system IOMMU to translate the memory address specified by the interrupt request; and

sending the translated interrupt request to a virtual central processing unit (vCPU) of a virtual machine.

2. The method of claim 1 , further comprising

configuring, by the host computing system, the PCI device to translate memory access requests using an on-device IOMMU.

3. The method of claim 1 , further comprising:

configuring, by the host computing system, the PCI device to append an address translation flag set to the first value to each memory access request translated by a on-device IOMMU.

4. The method of claim 1 , further comprising:

receiving, by the host computing system, a further memory access request initiated by the PCI device, wherein the memory access request comprises a memory address; and

responsive to determining that the memory address is within a specific address range, causing the host system IOMMU to pass-through the memory access request.

5. A system, comprising:

a memory;

a processing device operatively coupled to the memory, the processing device configured to:

receive a memory access request initiated by a peripheral component interconnect (PCI) device, wherein the memory access request comprises a memory address and a first address translation flag indicative of whether the memory access request is a translated memory access request or an untranslated memory access request;

responsive to determining that the first address translation flag is set to a first value indicating that the memory access request is a translated memory access request, causing a host system input/output memory management unit (IOMMU) to pass-through the memory access request to host memory;

receive an interrupt request initiated by the PCI device, wherein the interrupt request comprises the memory address and a second address translation flag;

responsive to determining that the second address translation flag is set to a second value, cause the host system IOMMU to translate the memory address specified by the interrupt request; and

send the translated interrupt request to a virtual central processing unit (vCPU) of a virtual machine.

6. The system of claim 5 , wherein the processing device is further configured to:

configure the PCI device to translate memory access requests using an on-device IOMMU.

7. The system of claim 5 , wherein the processing device is further configured to:

configure the PCI device to append an address translation flag set to the first value to each memory access request translated by a on-device IOMMU.

8. The system of claim 5 , wherein the processing device is further configured to:

receive a further memory access request initiated by the PCI device, wherein the memory access request comprises a memory address; and

responsive to determining that the memory address is within a specific address range, cause the host system IOMMU to pass-through the memory access request.

9. A non-transitory machine-readable storage medium storing executable instructions that, when executed by a processing device, cause the processing device to:

receive a memory access request initiated by a peripheral component interconnect (PCI) device, wherein the memory access request comprises a memory address and a first address translation flag indicative of whether the memory access request is a translated memory access request or an untranslated memory access request;

responsive to determining that the first address translation flag is set to a first value indicating that the memory access request is a translated memory access request, causing a host system input/output memory management unit (IOMMU) to pass-through the memory access request to host memory;

receive an interrupt request initiated by the PCI device, wherein the interrupt request comprises the memory address and a second address translation flag;

responsive to determining that the second address translation flag is set to a second value, cause the host system IOMMU to translate the memory address specified by the interrupt request; and

send the translated interrupt request to a virtual central processing unit (vCPU) of a virtual machine.

10. The non-transitory machine-readable storage medium of claim 9 , further comprising executable instructions that, when executed by the processing device, cause the processing device to:

configure the PCI device to translate memory access requests using an on-device IOMMU; and

configure the PCI device to append an address translation flag set to the first value to each memory access request translated by the on-device IOMMU.

11. The non-transitory machine-readable storage medium of claim 9 , wherein the processing device is further configured to:

receive a further memory access request initiated by the PCI device, wherein the memory access request comprises a memory address; and

responsive to determining that the memory address is within a specific address range, cause the host system IOMMU to pass-through the memory access request.

Assignments (2)
CHANGE OF NAME Recorded Mar 3, 2026
From: RED HAT, INC.
To: RED HAT, LLC
Reel/Frame 074913/0759 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 4, 2021
From: TSIRKIN, MICHAEL
To: RED HAT, INC.
Reel/Frame 056129/0245 →