Enabling efficient guest access to peripheral component interconnect express (PCIe) configuration space

US11561894B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-11561894-B2
Application numberUS-202117142980-A
CountryUS
Kind codeB2
Filing dateJan 6, 2021
Priority dateJan 6, 2021
Publication dateJan 24, 2023
Grant dateJan 24, 2023

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

Techniques for enabling efficient guest OS access to PCIe configuration space are provided. In one set of embodiments, a hypervisor can reserve a single host physical memory page in the host physical memory of a host system and can populate the single host physical memory page with a value indicating non-presence of PCIe device functions. The hypervisor can then create, for each guest physical memory page in a guest physical memory of a virtual machine (VM) corresponding to a PCIe configuration space of an absent PCIe device function in the VM, a mapping in the hypervisor's second-level page tables that maps the guest physical memory page to the single host physical memory page.

First claim

Opening claim text (preview).

What is claimed is: 1. A method comprising: reserving, by a hypervisor of a host system, a single host physical memory page in a host physical memory of the host system; populating, by the hypervisor, the single host physical memory page with a value indicating non-presence of PCIe (Peripheral Component Interconnect Express) device functions; and creating, by the hypervisor for each guest physical memory page in a guest physical memory of a virtual machine (VM) corresponding to a PCIe configuration space of an absent PCIe device function in the VM, a mapping in second-level page tables of the hypervisor that maps the guest physical memory page to the single host physical memory page, the creating comprising: creating, for all guest physical memory pages in a reserved ECAM (Enhanced Configuration Allocation Mechanism) address range of the VM, mappings in the second-level page tables between the guest physical memory pages and the single host physical memory page; and initializing each PCIe device function present in the VM, the initializing including removing, from the second-level page tables, a mapping between a guest physical memory page corresponding to a PCIe configuration space of said each PCIe device function and the single host physical memory page. 2. The method of claim 1 wherein the mapping sets the single host physical memory page as read-only. 3. The method of claim 1 wherein the value is 0xFF. 4. The method of claim 1 further comprising, for each present PCIe device function in the VM: reserving, in the host physical memory, another host physical memory page for the present PCIe device function; and creating, in the second-level page tables, another mapping between a guest physical memory page addressed by an ECAM address of the present PCIe device function and said another host physical memory page, wherein said another mapping sets said another host physical memory page as writable. 5. The method of claim 4 further comprising: assigning one or more hardware resources of the host system to the present PCIe device function; populating said another host physical memory page with PCIe configuration space register values for the present PCIe device function, the PCIe configuration space register values including one or more values identifying the one or more hardware resources; and modifying said another mapping to set said another host physical memory page as read-only. 6. The method of claim 4 wherein there are a plurality of present PCIe device functions in the VM, and wherein the plurality of present PCIe device functions include an emulated PCIe device function and a passthrough PCIe device function. 7. A non-transitory computer readable storage medium having stored thereon program code executable by a hypervisor of a host system, the program code causing the hypervisor to execute a method comprising: reserving a single host physical memory page in a host physical memory of the host system; populating the single host physical memory page with a value indicating non-presence of PCIe (Peripheral Component Interconnect Express) device functions; and creating, for each guest physical memory page in a guest physical memory of a virtual machine (VM) corresponding to a PCIe configuration space of an absent PCIe device function in the VM, a mapping in second-level page tables of the hypervisor that maps the guest physical memory page to the single host physical memory page, the creating comprising: creating, for all guest physical memory pages in a reserved ECAM (Enhanced Configuration Allocation Mechanism) address range of the VM, mappings in the second-level page tables between the guest physical memory pages and the single host physical memory page; and initializing each PCIe device function present in the VM, the initializing including removing, from the second-level page tables, a mapping between a guest physical memory page corresponding to a PCIe configuration space of said each PCIe device function and the single host physical memory page. 8. The non-transitory computer readable storage medium of claim 7 wherein the mapping sets the single host physical memory page as read-only. 9. The non-transitory computer readable storage medium of claim 7 wherein the value is 0xFF. 10. The non-transitory computer readable storage medium of claim 7 wherein the method further comprises, for each present PCIe device function in the VM: reserving, in the host physical memory, another host physical memory page for the present PCIe device function; and creating, in the second-level page tables, another mapping between a guest physical memory page addressed by an ECAM address of the present PCIe device function and said another host physical memory page, wherein said another mapping sets said another host physical memory page as writable. 11. The non-transitory computer readable storage medium of claim 10 wherein the method further comprises: assigning one or more hardware resources of the host system to the present PCIe device function; populating said another host physical memory page with PCIe configuration space register values for the present PCIe device function, the PCIe configuration space register values including one or more values identifying the one or more hardware resources; and modifying said another mapping to set said another host physical memory page as read-only. 12. The non-transitory computer readable storage medium of claim 10 wherein there are a plurality of present PCIe device functions in the VM, and wherein the plurality of present PCIe device functions include an emulated PCIe device function and a passthrough PCIe device function. 13. A host system comprising: a host physical memory; a processor; and a non-transitory computer readable medium having stored thereon program code for a hypervisor that, when executed by the processor, causes the hypervisor to: reserve a single host physical memory page in the host physical memory; populate the single host physical memory page with a value indicating non-presence of PCIe (Peripheral Component Interconnect Express) device functions; and create, for each guest physical memory page in a guest physical memory of a virtual machine (VM) corresponding to a PCIe configuration space of an absent PCIe device function in the VM, a mapping in second-level page tables of the hypervisor that maps the guest physical memory page to the single host physical memory page, the creating comprising: creating, for all guest physical memory pages in a reserved ECAM (Enhanced Configuration Allocation Mechanism) address range of the VM, mappings in the second-level page tables between the guest physical memory pages and the single host physical memory page; and initializing each PCIe device function present in the VM, the initializing including removing, from the second-level page tables, a mapping between a guest physical memory page corresponding to a PCIe configuration space of said each PCIe device function and the single host physical memory page. 14. The host system of claim 13 wherein the mapping sets the single host physical memory page as read-only. 15. The host system of claim 13 wherein the value is 0xFF. 16. The host system of claim 13 wherein the program code further causes the hypervisor to, for each present PCIe device function in the VM: reserve, in the host physical memory, another host physical memory page for the present PCIe device function; and create, in the second-level page tables, another mapping between a guest physical memory page addressed by an ECAM address of the present PC

Assignees

Inventors

Classifications

  • Configuration or reconfiguration · CPC title

  • on a serial bus, e.g. I2C bus, SPI bus (on daisy chain buses G06F13/4247) · CPC title

  • Details of memory controller · CPC title

  • PCI express · CPC title

  • Hypervisor-specific management and integration aspects · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US11561894B2 cover?
Techniques for enabling efficient guest OS access to PCIe configuration space are provided. In one set of embodiments, a hypervisor can reserve a single host physical memory page in the host physical memory of a host system and can populate the single host physical memory page with a value indicating non-presence of PCIe device functions. The hypervisor can then create, for each guest physical …
Who is the assignee on this patent?
Vmware Inc
What technology area does this patent fall under?
Primary CPC classification G06F12/0646. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Jan 24 2023 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 2 related publications on this page (citations in our corpus or others sharing the same primary CPC).