# US 2021/0173790 A1 · Unified address translation for virtualization of input/output devices

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

- Number: US 2021/0173790 A1
- Document ID: US20210173790A1
- Status: Published application
- Kind: A1
- Application number: 16/651,786
- Filed: 2017-12-29
- Published: 2021-06-10
- Earliest claimed: 2017-12-29
- Assignees: Intel Corporation
- Applicants: Intel Corporation
- Inventors: Utkarsh Y. Kakaiya; Sanjay Kumar; Rajesh M. Sankaran; Philip R. Lantz; Ashok Raj; Kun Tian
- Web page: https://patentgrep.com/patent/US20210173790A1

## CPC

- G06F 12/1009: using page tables, e.g. page table structures
- G06F 9/45558: {Hypervisor-specific management and integration aspects}
- G06F 12/063: {for I/O modules, e.g. memory mapped I/O (I/O protocol G06F13/42)}
- G06F 12/1081: for peripheral access to main memory, e.g. direct memory access [DMA]
- G06F 12/109: for multiple virtual address spaces, e.g. segmentation (G06F12/1036 takes precedence)
- G06F 2009/45579: {I/O management, e.g. providing access to device drivers or storage}
- G06F 2009/45583: {Memory management, e.g. access or allocation}
- G06F 2009/45591: {Monitoring or debugging support}
- G06F 2212/1048: Scalability
- G06F 2212/151: Emulated environment, e.g. virtual machine
- G06F 2212/651: Multi-level translation tables
- G06F 2212/657: Virtual address space management
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Embodiments of apparatuses, methods, and systems for unified address translation for virtualization of input/output devices are described. In an embodiment, an apparatus includes first circuitry to use at least an identifier of a device to locate a context entry and second circuitry to use at least a process address space identifier (PASID) to locate a PASID-entry. The context entry is to include at least one of a page-table pointer to a page-table translation structure and a PASID. The PASID-entry is to include at least one of a first-level page-table pointer to a first-level translation structure and a second-level page-table pointer to a second-level translation structure. The PASID is to be supplied by the device. At least one of the apparatus, the context entry, and the PASID entry is to include one or more control fields to indicate whether the first-level page-table pointer or the second-level page-table pointer is to be used.

## Claims

### Claim 1

An apparatus comprising:
first circuitry to use at least an identifier of a device to locate a context entry, the context entry to include at least one of a page-table pointer to a page-table translation structure and a process address space identifier (PASID); and
second circuitry to use at least the PASID to locate a PASID-entry, the PASID-entry to include at least one of a first-level page-table pointer to a first-level translation structure and a second-level page-table pointer to a second-level translation structure;
wherein the PASID is to be supplied by the device; and
wherein at least one of the apparatus, the context entry, and the PASID entry is to include one or more control fields to indicate whether the first-level page-table pointer or the second-level page-table pointer is to be used.

### Claim 2 (depends on 1)

The apparatus of claim 1, wherein the second-level translation structure of a PASID-entry is to be used to translate a guest physical address or an I/O virtual address to a host physical address for an address translation in which a PASID is provided.

### Claim 3 (depends on 1)

The apparatus of claim 1, wherein the control fields in the PASID-entry indicate whether a nested translation is to be performed using the first-level page-table pointer and one of the page-table pointer in the context entry and the second-level page-table pointer in the PASID entry.

### Claim 4 (depends on 2)

The apparatus of claim 2, wherein the PASID-entry is also to include an additional second-level pointer to a second-level translation table to be used to translate a guest I/O virtual address to a guest physical address for an address translation in which a PASID is provided.

### Claim 5 (depends on 2)

The apparatus of claim 2, wherein the context entry is also to include an additional second-level pointer to a second-level translation table to be used to translate a guest I/O virtual address to a guest physical address for an address translation in which a PASID is not provided.

### Claim 6 (depends on 1)

The apparatus of claim 1, wherein the PASID table is one of a plurality of PASID tables, each of the plurality of PASID tables to be created by a virtual machine monitor (VMM) to support shared virtual memory (SVM) operations for a virtual function (VF) or a physical function (PF).

### Claim 7 (depends on 6)

The apparatus of claim 6, wherein the VMM is to maintain a single system-wide host PASID space.

### Claim 8 (depends on 7)

The apparatus of claim 7, wherein the context entry is associated with a VF or PF assigned to a virtual machine (VM) and the PASID table is associated with the VM.

### Claim 9 (depends on 7)

The apparatus of claim 7, wherein the context entry is associated with a plurality of assignable interfaces and VF or PF assigned to the VMM and the PASID table is the single system-wide host PASID table.

### Claim 10 (depends on 8)

The apparatus of claim 8, wherein the VMM is to expose a virtual I/O memory management unit (IOMMU) to the VM, the virtual IOMMU to allocate and manage its own guest PASID space.

### Claim 11 (depends on 8)

The apparatus of claim 8, wherein the VMM is to expose a virtual I/O memory management unit (IOMMU) to the VM, the virtual IOMMU to use system-wide host PASIDs, provided by the VMM, from a host IOMMU driver.

### Claim 12 (depends on 10)

The apparatus of claim 10, wherein the VMM is also to shadow a guest PASID table for the VM in a physical PASID table.

### Claim 13 (depends on 12)

The apparatus of claim 12, wherein the VMM is also to configure a host PASID corresponding to a guest PASID in a shadow PASID table to support SVM operations with enqueuing instructions.

### Claim 14 (depends on 11)

The apparatus of claim 11, wherein the VMM is also to allocate a private PASID table to the VM and to allocate and configure system-wide host PASIDs for the VM in the private PASID table to support SVM operations with and without enqueuing instructions.

### Claim 15 (depends on 1)

The apparatus of claim 1, wherein the PASID, if not supplied by the device, is to be configured in the context entry for the IOMMU to use for address translation instead of the context entry's translation structures.

### Claim 16

A method comprising:
creating, for a virtual machine (VM) by a virtual machine monitor (VMM), a virtual input/output memory management unit (IOMMU) corresponding to a physical IOMMU, the virtual IOMMU having a process address space identifier (PASID) entry width that is smaller than the PASID entry width of the physical IOMMU; and
shadowing, by the VMM, a guest PASID from the virtual IOMMU in the physical IOMMU.

### Claim 17 (depends on 16)

The method of claim 16, further comprising configuring, by the VMM, a host PASID in the physical IOMMU PASID table, the host PASID corresponding to the guest PASID.

### Claim 18 (depends on 17)

The method of claim 17, wherein the guest PASID is to be used by a virtual function or a physical function of an input/output device assigned to the VM.

### Claim 19 (depends on 17)

The method of claim 17, wherein the host PASID is to be used by an assignable interface (AI) of an input/output device assigned to the VM.

### Claim 20

A system comprising:
a plurality of physical input/output (I/O) devices;
a processor to create one or more virtual machines (VMs) to which to assign one or more virtual I/O devices to be abstracted from the plurality of physical I/O devices;
an I/O memory management unit (IOMMU) to perform address translation to support virtualization of the plurality of I/O devices according to a plurality of translation techniques, the IOMMU including:
first circuitry to use at least an identifier of a device to locate a context entry, the context entry to include at least one of a page-table pointer to a page-table translation structure and a process address space identifier (PASID); and
second circuitry to use at least the PASID to locate a PASID-entry, the PASID-entry to include at least one of a first-level page-table pointer to a first-level translation structure and a second-level page-table pointer to a second-level translation structure;
wherein the PASID is to be supplied by the device; and
wherein at least one of the apparatus, the context entry, and the PASID entry is to include one or more control fields to indicate whether the first-level page-table pointer or the second-level page-table pointer is to be used
