IP Library Granted Patent US 12,423,132
Granted Patent B2
US 12,423,132 · App. 18/146,027 · Granted Sep 23, 2025

Efficient queue shadowing for virtual machines

Inventor: Michael Tsirkin (Yokneam Illit, IL)
Assignee: Red Hat, Inc.
G06F9/45558G06F9/45545G06F2009/45579G06F2009/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 12,423,132
App. No.
18/146,027
Granted
Sep 23, 2025
Kind
B2
Abstract

Systems and methods for efficient peripheral device software request queue shadowing for virtual machines can include creating a virtual machine and assigning a peripheral device to it. They can also include assigning, to the peripheral device, a first process address space identifier (PASID) associated with a shadow memory buffer and a second PASID associated with a device data buffer. They can further include causing a host input/output memory management unit (IOMMU) to identify a software request in the shadow memory buffer, and fetching, from the shadow memory buffer, the software request and a guest memory address of data requested to be accessed. They can also include, causing the host IOMMU to identify the data in the device data buffer, and transmitting the data, from the guest memory, to the peripheral device.

Claims (54)

1. A method comprising:

creating, by a host computer system, a virtual machine (VM);

assigning a peripheral device to the VM;

assigning, to the peripheral device, a first process address space identifier (PASID) associated with a shadow memory buffer in a host memory of the host computer system;

assigning, to the peripheral device, a second PASID associated with a device data buffer in a guest memory of the VM;

causing a host input/output memory management unit (IOMMU) of the host computer system to use the first PASID and a first corresponding page table entry to identify a software request in the shadow memory buffer;

retrieving, from the shadow memory buffer of the host memory, the software request and a guest memory address of data requested to be accessed by the software request;

responsive to receiving a request originated by the peripheral device to access the data for executing the software request, causing the host IOMMU to use the second PASID and a second corresponding page table entry to identify the data in the device data buffer; and

transmitting the data to the peripheral device.

2. The method of claim 1 , further comprising:

copying one or more software requests from a software request queue of the guest memory of the VM to a shadow software request queue in the shadow memory buffer of the host memory of the host computer system.

3. The method of claim 2 , further comprising:

monitoring the software request queue; and

responsive to a modification being made in the software request queue, performing a corresponding modification to the shadow software request queue.

4. The method of claim 1 , wherein the software request references a guest memory address.

5. The method of claim 1 , wherein identifying the software request further comprises: using the first PASID and the first page table entry to translate a host virtual address of the software request in the software request queue to a host physical address of the software request in the shadow software request queue.

6. The method of claim 1 , wherein the shadow memory buffer is inaccessible by the VM and wherein the device data buffer is accessible by the peripheral device to retrieve the data for executing the software request.

7. The method of claim 1 , wherein each of the first page table entry and the second page table entry are stored in different respective page tables.

8. A system comprising:

a memory device;

a processing device operatively coupled to the memory device, to perform operations comprising:

creating, by the system, a virtual machine (VM);

assigning a peripheral device to the VM;

assigning, to the peripheral device, a first process address space identifier (PASID) associated with a shadow memory buffer in a host memory of the system;

assigning, to the peripheral device, a second PASID associated with a device data buffer in a guest memory of the VM;

causing a host input/output memory management unit (IOMMU) of the system to use the first PASID and a first corresponding page table entry to identify a software request in the shadow memory buffer;

retrieving, from the shadow memory buffer of the host memory, the software request and a guest memory address of data requested to be accessed by the software request;

responsive to receiving a request originated by the peripheral device to access the data for executing the software request, causing the host IOMMU to use the second PASID and a second corresponding page table entry to identify the data in the device data buffer; and

transmitting the data to the peripheral device.

9. The system of claim 8 , wherein the operations further comprise:

copying one or more software requests from a software request queue of the guest memory of the VM to a shadow software request queue in the shadow memory buffer of the host memory of the host computer system.

10. The system of claim 9 , further comprising:

monitoring the software request queue; and

responsive to a modification being made in the software request queue, performing a corresponding modification to the shadow software request queue.

11. The system of claim 8 , wherein the software request references a guest memory address.

12. The system of claim 8 , wherein identifying the software request further comprises using the first PASID and the first page table entry to translate a host virtual address of the software request in the software request queue to a host physical address of the software request in the shadow software request queue.

13. The system of claim 8 , wherein the shadow memory buffer is inaccessible by the VM and wherein the device data buffer is accessible by the peripheral device to retrieve the data for executing the software request.

14. The system of claim 8 , wherein each of the first page table entry and the second page table entry are stored in different respective page tables.

15. A non-transitory computer-readable media storing instructions that, when executed, cause a processing device to perform operations comprising:

creating, by a host computer system, a virtual machine (VM);

assigning a peripheral device to the VM;

assigning, to the peripheral device, a process address space identifier (PASID) associated with a shadow memory buffer in a host memory of the host computer system;

causing a host input/output memory management unit (IOMMU) of the host computer system to use the PASID and a first corresponding page table entry to identify a software request in the shadow memory buffer;

retrieving, from the shadow memory buffer of the host memory, the software request and a guest memory address of data requested to be accessed by the software request;

responsive to receiving a request originated by the peripheral device to access the data for executing the software request, causing the host IOMMU to use a second corresponding page table entry to identify the data in a device data buffer in a guest memory location; and

transmitting the data to the peripheral device.

16. The non-transitory computer-readable media of claim 15 , wherein the instructions further cause the processing device to perform operations comprising:

copying one or more software requests from a software request queue of the guest memory of the VM to a shadow software request queue in the shadow memory buffer of the host memory of the host computer system.

17. The non-transitory computer-readable media of claim 16 , wherein the instructions further cause the processing device to perform operations comprising:

monitoring the software request queue; and

responsive to a modification being made in the software request queue, performing a corresponding modification to the shadow software request queue.

18. The non-transitory computer-readable media of claim 15 , wherein the software request references a guest memory address.

19. The non-transitory computer-readable media of claim 15 , wherein identifying the software request further comprises: using the PASID and the first page table entry to translate a host virtual address of the software request in the software request queue to a host physical address of the software request in the shadow software request queue.

20. The non-transitory computer-readable media of claim 15 , wherein the shadow memory buffer is inaccessible by the VM and wherein the device data buffer is accessible by the peripheral device to retrieve the data for executing the software 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 Dec 23, 2022
From: TSIRKIN, MICHAEL
To: RED HAT, INC.
Reel/Frame 062196/0564 →
Continuity (1)
Related Publication 20240211293A1 · Jun 27, 2024
References Cited (17)
US 7299337B2 · Traut · 2007 [cited by examiner]
US 7395405B2 · Anderson · 2008 [cited by examiner]
US 7613898B2 · Haertel · 2009 [cited by examiner]
US 7882330B2 · Haertel · 2011 [cited by examiner]
US 8060722B2 · Adams · 2011 [cited by examiner]
US 8086821B2 · Mukherjee · 2011 [cited by examiner]
US 8386745B2 · Kegel et al. · 2013 [cited by applicant]
US 8631212B2 · Kegel et al. · 2014 [cited by applicant]
US 8843669B2 · Pavlov · 2014 [cited by examiner]
US 9535849B2 · Kegel et al. · 2017 [cited by applicant]
US 9639388B2 · Tsirkin · 2017 [cited by examiner]
US 10048881B2 · Sankaran et al. · 2018 [cited by applicant]
US 10853118B2 · Tian · 2020 [cited by examiner]
US 11360914B2 · Cooray et al. · 2022 [cited by applicant]
US 20190361728A1 · Kumar et al. · 2019 [cited by applicant]
US 20210173790A1 · Kakaiya et al. · 2021 [cited by applicant]
Huang et al., “Building a KVM-based Hypervisor for a Heterogeneous System Architecture Compliant System,” Department of Computer Science, National Chiao Tung University, Taiwan, Apr. 2016, 15 pages, http://www.cs.nthu.e… [cited by applicant]