IP Library Granted Patent US 12,455,760
Granted Patent B2
US 12,455,760 · App. 18/095,563 · Granted Oct 28, 2025

Passing single-root input-output virtualization functions to nested virtual machines

Inventor: Michael Tsirkin (Yokneam, IL)
Assignee: Red Hat, Inc.
G06F9/45558G06F2009/45566G06F2009/45579
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,455,760
App. No.
18/095,563
Granted
Oct 28, 2025
Kind
B2
Abstract

Single-root input-output virtualization (SR-IOV) can be enabled for nested virtual machines using mapping. In one example, a host hypervisor can assign at least two guest virtual functions to a guest virtual machine such that each guest virtual function maps to a respective host virtual function executed by a SR-IOV device. The first guest virtual function of the at least two guest virtual functions can be configured to act as a guest physical function. The host hypervisor can receive a request generated by a nested virtual function assigned to a nested virtual machine hosted by the guest virtual machine. In response to receiving the request, the host hypervisor can translate a guest memory address of the guest physical function to a host memory address for the guest physical function. The host hypervisor can forward the request to the guest physical function for fulfillment using the translated host memory address.

Claims (63)

1. A system comprising:

a processing device; and

a memory device including instructions that are executable by the processing device for causing a host hypervisor to perform operations comprising:

assigning at least two guest virtual functions to a guest virtual machine, each guest virtual function of the at least two guest virtual functions being mapped to a respective host virtual function executed by a single-root input-output virtualization (SR-IOV) device, a first guest virtual function of the at least two guest virtual functions for the guest virtual machine being configured to act as a guest physical function;

receiving a request generated by a nested virtual function assigned to a nested virtual machine hosted by the guest virtual machine, the request being forwarded to the host hypervisor by a physical function executed by the SR-IOV device, the nested virtual function being mapped to a second guest virtual function of the at least two guest virtual functions for the guest virtual machine;

in response to receiving the request, translating a guest memory address for the guest physical function to a host memory address for the guest physical function; and

forwarding the request to the guest physical function using the translated host memory address for the guest physical function, the guest physical function being configured to fulfill the request from the nested virtual machine.

2. The system of claim 1 , wherein the guest physical function is configured to, subsequent to receiving the request:

generate a response to the nested virtual function to fulfill the request; and

transmit the response to the physical function.

3. The system of claim 2 , wherein the physical function is configured to, in response to receiving the response from the guest physical function:

translate a nested memory address for the nested virtual function to another host memory address for the nested virtual function; and

forwarding the response to the nested virtual function using the translated other host memory address for the nested virtual function.

4. The system of claim 1 , wherein the operations further comprise:

mapping the guest memory address for the guest physical function in a guest input-output memory management unit (IOMMU) for the guest virtual machine to the host memory address in an IOMMU; and

accessing the IOMMU to translate the guest memory address to the host memory address in response to receiving the request.

5. The system of claim 4 , wherein the operations further comprise:

mapping a nested memory address for the nested virtual function to another host memory address in the IOMMU; and

accessing the IOMMU to translate the nested memory address to the other host memory address prior to forwarding the response to the nested virtual function.

6. The system of claim 1 , wherein the guest virtual machine comprises a guest SR-IOV device, and wherein the operations further comprise:

mapping device memory of the guest SR-IOV device to each guest virtual function of the at least two guest virtual functions using a page table, wherein the device memory for each guest virtual function is mapped at an offset being a multiple of a virtual function number assigned to each guest virtual function.

7. The system of claim 6 , wherein the operations further comprise, prior to mapping the device memory of the guest SR-IOV device:

identifying each guest virtual function of the at least two guest virtual functions using a respective virtual function number.

8. A method comprising,

assigning, by a processing device, at least two guest virtual functions to a guest virtual machine, each guest virtual function of the at least two guest virtual functions being mapped to a respective host virtual function executed by a single-root input-output virtualization (SR-IOV) device, a first guest virtual function of the at least two guest virtual functions for the guest virtual machine being configured to act as a guest physical function;

receiving, by the processing device, a request generated by a nested virtual function assigned to a nested virtual machine hosted by the guest virtual machine, the request being forwarded to a host hypervisor by a physical function executed by the SR-IOV device, the nested virtual function being mapped to a second guest virtual function of the at least two guest virtual functions for the guest virtual machine;

in response to receiving the request, translating, by the processing device, a guest memory address for the guest physical function to a host memory address for the guest physical function; and

forwarding, by the processing device, the request to the guest physical function using the translated host memory address for the guest physical function, the guest physical function being configured to fulfill the request from the nested virtual machine.

9. The method of claim 8 , further comprising, by the guest physical function subsequent to receiving the request:

generating a response to the nested virtual function to fulfill the request; and

transmitting the response to the physical function.

10. The method of claim 9 , further comprising, by the physical function in response to receiving the response from the guest physical function:

translating a nested memory address for the nested virtual function to another host memory address for the nested virtual function; and

forwarding the response to the nested virtual function using the translated other host memory address for the nested virtual function.

11. The method of claim 8 , further comprising:

mapping the guest memory address for the guest physical function in a guest input-output memory management unit (IOMMU) for the guest virtual machine to the host memory address in an IOMMU; and

accessing the IOMMU to translate the guest memory address to the host memory address in response to receiving the request.

12. The method of claim 11 , further comprising:

mapping a nested memory address for the nested virtual function to another host memory address in the IOMMU; and

accessing the IOMMU to translate the nested memory address to the other host memory address prior to forwarding the response to the nested virtual function.

13. The method of claim 8 , wherein the guest virtual machine includes a guest SR-IOV device, and wherein the method further comprises:

mapping device memory of the guest SR-IOV device to each guest virtual function of the at least two guest virtual functions using a page table, wherein the device memory for each guest virtual function is mapped at an offset being a multiple of a virtual function number assigned to each guest virtual function.

14. The method of claim 13 , further comprising, prior to mapping the device memory of the guest SR-IOV device:

identifying each guest virtual function of the at least two guest virtual functions using a respective virtual function number.

15. A non-transitory computer-readable medium comprising instructions that are executable by a processing device for causing a host hypervisor to perform operations comprising:

assigning at least two guest virtual functions to a guest virtual machine, each guest virtual function of the at least two guest virtual functions being mapped to a respective host virtual function executed by a single-root input-output virtualization (SR-IOV) device, a first guest virtual function of the at least two guest virtual functions for the guest virtual machine being configured to act as a guest physical function;

receiving a request generated by a nested virtual function assigned to a nested virtual machine hosted by the guest virtual machine, the request being forwarded to the host hypervisor by a physical function executed by the SR-IOV device, the nested virtual function being mapped to a second guest virtual function of the at least two guest virtual functions for the guest virtual machine;

in response to receiving the request, translating a guest memory address for the guest physical function to a host memory address for the guest physical function; and

forwarding the request to the guest physical function using the translated host memory address for the guest physical function, the guest physical function being configured to fulfill the request from the nested virtual machine.

16. The non-transitory computer-readable medium of claim 15 , wherein the guest physical function is configured to, subsequent to receiving the request:

generate a response to the nested virtual function to fulfill the request; and

transmit the response to the physical function.

17. The non-transitory computer-readable medium of claim 16 , wherein the physical function is configured to, in response to receiving the response from the guest physical function:

translate a nested memory address for the nested virtual function to another host memory address for the nested virtual function; and

forwarding the response to the nested virtual function using the translated other host memory address for the nested virtual function.

18. The non-transitory computer-readable medium of claim 15 , wherein the operations further comprise:

mapping the guest memory address for the guest physical function in a guest input-output memory management unit (IOMMU) for the guest virtual machine to the host memory address in an IOMMU; and

accessing the IOMMU to translate the guest memory address to the host memory address in response to receiving the request.

19. The non-transitory computer-readable medium of claim 18 , wherein the operations further comprise:

mapping a nested memory address for the nested virtual function to another host memory address in the IOMMU; and

accessing the IOMMU to translate the nested memory address to the other host memory address prior to forwarding the response to the nested virtual function.

20. The non-transitory computer-readable medium of claim 15 , wherein the guest virtual machine comprises a guest SR-IOV device, and wherein the operations further comprise:

mapping device memory of the guest SR-IOV device to each guest virtual function of the at least two guest virtual functions using a page table, wherein the device memory for each guest virtual function is mapped at an offset being a multiple of a virtual function number assigned to each guest virtual function.

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 Jan 11, 2023
From: TSIRKIN, MICHAEL
To: RED HAT, INC.
Reel/Frame 062337/0959 →