Forced detaching of applications from DMA-capable PCI mapped devices

US11243899B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-11243899-B2
Application numberUS-201715581430-A
CountryUS
Kind codeB2
Filing dateApr 28, 2017
Priority dateApr 28, 2017
Publication dateFeb 8, 2022
Grant dateFeb 8, 2022

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.

A mechanism is provided in a data processing system comprising at least one processor and at least one memory, the at least one memory comprising instructions that are executed by the at least one processor and configure the at least one processor to implement a device context device driver for forced detaching of an application from mapped devices. The device context device driver receives a command to detach an application, wherein the command specifies a process descriptor associated with the application. The device context device driver identifies a plurality of matching device context entries in a list of open device contexts maintained by the device context device driver that match the process descriptor. The device context device driver marks the plurality of matching device context entries as detached. The device context device driver invalidates mapped memory areas associated with the plurality of matching device context entries. The device context device driver shuts down all device contexts associated with the plurality of matching device context entries.

First claim

Opening claim text (preview).

What is claimed is: 1. A method, in a data processing system comprising at least one processor and at least one memory, the at least one memory comprising instructions that are executed by the at least one processor and configure the at least one processor to implement a device context device driver for forced detaching of a failed application from mapped devices, the method comprising: receiving, by the device context device driver, a command from a detach application to detach a failed application, wherein the command specifies a process descriptor associated with the failed application, wherein the device context device driver implements memory mapping requests and maintains a list of all opened device contexts; identifying, by the device context device driver, a plurality of matching device context entries in a list of open device contexts maintained by the device context device driver that match the process descriptor; marking, by the device context device driver, the plurality of matching device context entries as detached; invalidating, by the device context device driver, mapped memory areas associated with the plurality of matching device context entries; and shutting down, by the device context device driver, all device contexts associated with the plurality of matching device context entries. 2. The method of claim 1 , wherein marking the plurality of matching device context entries as detached comprises for each given entry in the plurality of matching device context entries: removing the given entry from the list of open device contexts; adding the given entry to a list of device contexts to shut down; and updating a detached state field of the given entry in the list of device contexts to shut down. 3. The method of claim 2 , wherein marking the plurality of matching device context entries as detached comprises: taking a lock on the list of open device contexts; and responsive to removing the plurality of matching device context entries from the list of open device contexts, releasing the lock. 4. The method of claim 2 , wherein invalidating mapped memory areas associated with the plurality of matching device context entries comprises for each given entry in the list of device contexts to shut down, invalidating mapped memory areas associated with the given entry. 5. The method of claim 2 , wherein shutting down all device contexts associated with the plurality of matching device context entries comprises shutting down all device contexts in the list of device contexts to shut down. 6. The method of claim 1 , wherein each entry of the list of open device contexts comprises an identifier of the device context, a detached state field, a process context descriptor, and a list of memory mapped areas. 7. The method of claim 6 , wherein each entry of the list of memory mapped areas comprises a start address and a length. 8. The method of claim 1 , wherein shutting down all device contexts associated with the plurality of matching device context entries comprises shutting down all device contexts associated with the plurality of matching device context entries in parallel using device command parallelism or work queues. 9. The method of claim 1 , wherein the command is provided by a detach process application programming interface in the device context device driver. 10. The method of claim 1 , further comprising: responsive to receiving a subsequent command to add or remove a memory mapped area to a given device context, checking, by the device context device driver, a detach state of the given device context; and responsive to detach state of the given device context being detached, returning an error. 11. A computer program product comprising a computer readable storage medium having a computer readable program stored therein, wherein the computer readable program, when executed on a computing device, causes the computing device to implement a device context device driver for forced detaching of a failed application from mapped devices, wherein the computer readable program causes the computing device to: receive, by the device context device driver, a command from a detach application to detach a failed application, wherein the command specifies a process descriptor associated with the failed application, wherein the device context device driver implements memory mapping requests and maintains a list of all opened device contexts; identify, by the device context device driver, a plurality of matching device context entries in a list of open device contexts maintained by the device context device driver that match the process descriptor; mark, by the device context device driver, the plurality of matching device context entries as detached; invalidate, by the device context device driver, mapped memory areas associated with the plurality of matching device context entries; and shut down, by the device context device driver, all device contexts associated with the plurality of matching device context entries. 12. The computer program product of claim 11 , wherein marking the plurality of matching device context entries as detached comprises for each given entry in the plurality of matching device context entries: removing the given entry from the list of open device contexts; adding the given entry to a list of device contexts to shut down; and updating a detached state field of the given entry in the list of device contexts to shut down. 13. The computer program product of claim 12 , wherein marking the plurality of matching device context entries as detached comprises: taking a lock on the list of open device contexts; and responsive to removing the plurality of matching device context entries from the list of open device contexts, releasing the lock. 14. The computer program product of claim 12 , wherein invalidating mapped memory areas associated with the plurality of matching device context entries comprises for each given entry in the list of device contexts to shut down, invalidating mapped memory areas associated with the given entry. 15. The computer program product of claim 12 , wherein shutting down all device contexts associated with the plurality of matching device context entries comprises shutting down all device contexts in the list of device contexts to shut down. 16. The computer program product of claim 11 , wherein each entry of the list of open device contexts comprises an identifier of the device context, a detached state field, a process context descriptor, and a list of memory mapped areas. 17. The computer program product of claim 16 , wherein each entry of the list of memory mapped areas comprises a start address and a length. 18. The computer program product of claim 11 , wherein shutting down all device contexts associated with the plurality of matching device context entries comprises shutting down all device contexts associated with the plurality of matching device context entries in parallel using device command parallelism or work queues. 19. The computer program product of claim 11 , wherein the command is provided by a detach process application programming interface in the device context device driver. 20. An apparatus comprising: at least one processor; and a memory coupled to the at least one processor, wherein the memory comprises instructions which, when executed by the at least one processor, cause the at least one processor to implement a device context device driver for forced detaching of a failed application from mapped devices, wherein the

Assignees

Inventors

Classifications

  • G06F9/4411Primary

    Configuring for operating with peripheral devices; Loading of device drivers · CPC title

  • using clearing, invalidating or resetting means · CPC title

  • Allocation or management of cache space · CPC title

  • Mirrored cache memory · CPC title

  • Memory mapped I/O · 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 US11243899B2 cover?
A mechanism is provided in a data processing system comprising at least one processor and at least one memory, the at least one memory comprising instructions that are executed by the at least one processor and configure the at least one processor to implement a device context device driver for forced detaching of an application from mapped devices. The device context device driver receives a c…
Who is the assignee on this patent?
IBM
What technology area does this patent fall under?
Primary CPC classification G06F9/4411. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Feb 08 2022 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 9 related publications on this page (citations in our corpus or others sharing the same primary CPC).