Page fault-based fast memory-mapped I/O for virtual machines

US9846610B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-9846610-B2
Application numberUS-201615018043-A
CountryUS
Kind codeB2
Filing dateFeb 8, 2016
Priority dateFeb 8, 2016
Publication dateDec 19, 2017
Grant dateDec 19, 2017

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.

Implementations provide for page fault-based fast memory-mapped I/O for virtual machines. A method of the disclosure includes detecting, by a processing device executing a hypervisor on a host machine, a protection fault at the hypervisor, the protection fault caused by a guest of the hypervisor attempting to write to an address marked as valid and read-only in a host page table entry at the hypervisor, the address associated with memory-mapped input-output (MMIO) for a virtual device of the guest, referencing, by the processing device, a MMIO data structure of the hypervisor with the address that caused the protection fault, identifying, by the processing device, the virtual device and a MMIO-based instruction mapped to the address in the MMIO data structure at the hypervisor, and executing, by the processing device, the MMIO instruction at the hypervisor on behalf of the guest.

First claim

Opening claim text (preview).

What is claimed is: 1. A method, comprising: detecting, by a processing device executing a hypervisor on a host machine, a protection fault at the hypervisor, the protection fault caused by a guest of the hypervisor attempting to write to an address marked as valid and read-only in a host page table entry at the hypervisor, the address associated with memory-mapped input-output (MMIO) for a virtual device of the guest; referencing a MMIO data structure of the hypervisor with the address corresponding to the protection fault; identifying, by the processing device, the virtual device and a MMIO-based instruction mapped to the address in the MMIO data structure; and executing, by the processing device, the MMIO-based instruction at the hypervisor on behalf of the guest. 2. The method of claim 1 , further comprising, during hypervisor initialization: informing the guest, by the hypervisor, of the presence of the hypervisor; requesting the guest, by the hypervisor, to provide one or more MMIO addresses with corresponding virtual device identification; receiving from the guest, by the hypervisor, the one or more MMIO addresses with the corresponding virtual device identification; determining, by the hypervisor, MMIO instructions that correspond with each of the received one or more MMIO addresses; and storing, by the hypervisor, the one or more MMIO addresses with the corresponding virtual device identification and corresponding MMIO instructions in the MMIO data structure. 3. The method of claim 1 , further comprising marking, by the hypervisor, host page table entries corresponding to one or more MMIO addresses comprising the address as valid and read-only. 4. The method of claim 1 , wherein the MMIO data structure further comprises, for each entry corresponding to a MMIO address, at least one of the MMIO-based instruction, a virtual device identifier, data comprising one or more operands for the MMIO-based instruction, the type of the page fault detected, or a length of the data. 5. The method of claim 1 , further comprising: detecting, by the hypervisor, a second page fault associated with a second non valid or reserved host page table entry; and referencing, by the processing device, a second MMIO data structure of the hypervisor with the address that caused the second page fault. 6. The method of claim 1 , further comprising, responsive to the MMIO data structure having no match for at least one of (i) the address, (ii) the address and the data, or (iii) the address, the data, and the length, signaling an error to the guest and exiting to the hypervisor. 7. The method of claim 1 , wherein a translation of the address is stored in a translation lookaside buffer (TLB) when the guest accesses the address. 8. The method of claim 1 , wherein the guest performs a read operation on the address prior to the attempt to write to the address. 9. The method of claim 8 , wherein the read operation is performed after a determined number of write instructions are executed. 10. The method of claim 1 , wherein, when the virtual device is loaded in the guest, guest device drivers for the virtual device create writable mappings for pages corresponding to the memory space of the virtual device. 11. A computer system comprising: a memory; a host processing device, coupled to the memory, to execute a hypervisor from the memory, the hypervisor to virtualize resources of the computer system for one or more guests, wherein the host processing device to: detect a protection fault at the hypervisor, the protection fault caused by a guest of the hypervisor attempting to write to an address marked as valid and read-only in a host page table entry at the hypervisor, the address associated with memory-mapped input-output (MMIO) for a virtual device of the guest; reference a MMIO data structure of the hypervisor with the address corresponding to the protection fault; identify the virtual device and a MMIO-based instruction mapped to the address in the MMIO data structure; and execute the MMIO-based instruction at the hypervisor on behalf of the guest. 12. The computer system of claim 11 , wherein the processing device is further to cause the hypervisor to, during hypervisor initialization: inform the guest of the presence of the hypervisor; requesting the guest, by the hypervisor, to provide one or more MMIO addresses with corresponding virtual device identification; receiving from the guest, by the hypervisor, the one or more MMIO addresses with the corresponding virtual device identification; determining, by the hypervisor, MMIO instructions that correspond with each of the received one or more MMIO addresses; and storing, by the hypervisor, the one or more MMIO addresses with the corresponding virtual device identification and corresponding MMIO instructions in the MMIO data structure. 13. The computer system of claim 11 , further comprising marking, by the hypervisor, host page table entries corresponding to one or more MMIO addresses comprising the address as valid and read-only. 14. The computer system of claim 11 , wherein the MMIO data structure further comprises, for each entry corresponding to a MMIO address, at least one of a MMIO-based instruction, a virtual device identifier, data comprising one or more operands for the MMIO-based instruction, or a length of the data. 15. The computer system of claim 11 , wherein a translation of the address is stored in a translation lookaside buffer (TLB) when the guest accesses the address. 16. The computer system of claim 11 , wherein the guest performs a read operation on the address prior to the attempt to write to the address. 17. A non-transitory computer-readable storage medium including instructions that, when accessed by a processing device, cause the processing device to: request, by the processing device executing a hypervisor on a host machine, a guest of the hypervisor to provide one or more memory-mapped input-output (MMIO) addresses to the hypervisor, the MMIO addresses associated with memory space of a virtual device of the guest; receive, from the guest, the one or more MMIO addresses at the hypervisor; determine MMIO instructions that correspond with each of the received one or more MMIO addresses; storing, by the processing device, the one or more MMIO addresses with corresponding virtual device identification and the corresponding MMIO instructions in a MMIO data structure of the hypervisor; and marking, by the processing device, host page table entries corresponding to the one or more MMIO addresses as valid and read-only in a host page table entry at the hypervisor. 18. The non-transitory computer-readable storage medium of claim 17 , wherein the processing device further to: detect a protection fault at the hypervisor, the protection fault caused by the guest of the hypervisor attempting to write to an address of the MMIO addresses; reference a MMIO data structure of the hypervisor with the address that caused the protection fault; identify the virtual device and a MMIO-based instruction mapped to the address in the MMIO data structure at the hypervisor; and execute the MMIO instruction at the hypervisor on behalf of the guest. 19. The non-transitory computer-readable storage medium of claim 17 , wherein a translation of the address is stored in a translation lookaside buffer (TLB) when the guest accesses the address. 20. The non-transitory computer-readable storage medium of claim 17 , wherein the guest performs a read operation on the

Assignees

Inventors

Classifications

  • using page tables, e.g. page table structures · CPC title

  • Hypervisor-specific management and integration aspects · CPC title

  • Space efficiency improvement · CPC title

  • for I/O modules, e.g. memory mapped I/O (I/O protocol G06F13/42) · CPC title

  • in a virtual computing platform, e.g. logically partitioned systems · 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 US9846610B2 cover?
Implementations provide for page fault-based fast memory-mapped I/O for virtual machines. A method of the disclosure includes detecting, by a processing device executing a hypervisor on a host machine, a protection fault at the hypervisor, the protection fault caused by a guest of the hypervisor attempting to write to an address marked as valid and read-only in a host page table entry at the hy…
Who is the assignee on this patent?
Red Hat Israel Ltd
What technology area does this patent fall under?
Primary CPC classification G06F9/45558. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Dec 19 2017 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 7 related publications on this page (citations in our corpus or others sharing the same primary CPC).