IP Library › Granted Patent US 9,442,754
Granted Patent B1
US 9,442,754 · App. 14/723,343 · Granted Sep 13, 2016

Deferred asynchronous actions for virtual devices

Inventor: Michael Tsirkin (Yokneam Illit, IL)
Assignee: Red Hat Israel, Ltd.
G06F9/45558G06F9/545G06F2009/45575
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 9,442,754
App. No.
14/723,343
Granted
Sep 13, 2016
Kind
B1
Abstract

A system and methods are disclosed for handling requests from virtual machines in virtualized systems that include an accelerator. In accordance with one embodiment, a hypervisor executed by a processing device receives an asynchronous request from a virtual machine. The hypervisor detects that an accelerator is not initialized, and stores in memory at least one of the asynchronous request, an indication of the asynchronous request, or an indication that the accelerator is not initialized. The hypervisor subsequently detects that the accelerator has become initialized, and in response forwards the asynchronous request to the accelerator.

Claims (49)

1. A method comprising:

receiving, from a virtual machine, by a hypervisor executed by a processing device, an asynchronous request that can be serviced by an accelerator;

detecting, by the hypervisor, in response to receiving the asynchronous request, that the accelerator is not initialized;

storing in a memory, by the hypervisor, at least one of the asynchronous request, an indication of the asynchronous request, or an indication that the accelerator is not initialized;

detecting, by the hypervisor, after receiving the asynchronous request and detecting that the accelerator is not initialized, that the accelerator has become initialized; and

forwarding, by the hypervisor, in response to the detecting that the accelerator has become initialized, the asynchronous request to the accelerator.

2. The method of claim 1 further comprising:

detecting, by the hypervisor, after the forwarding, an error caused by the accelerator; and

transmitting, by the hypervisor, in response to the detecting of the error, a message to the virtual machine indicating that an asynchronous error has occurred.

3. The method of claim 1 further comprising:

receiving, from a virtual machine, by the hypervisor, a synchronous request;

servicing, by the hypervisor, without involvement of the accelerator, the synchronous request; and

transmitting, by the hypervisor, to the virtual machine that submitted the synchronous request, a message indicating that the synchronous request has been serviced.

4. The method of claim 1 wherein the accelerator and the hypervisor execute on different machines.

5. The method of claim 1 wherein the accelerator comprises software that executes in a kernel space of a host operating system.

6. The method of claim 1 wherein the accelerator comprises software that executes in a user space of a host operating system.

7. The method of claim 1 wherein the asynchronous request is to transmit a packet.

8. An apparatus comprising:

a memory; and

a processing device, operatively coupled to the memory, to execute a hypervisor to:

receive, from a virtual machine, by the hypervisor, an asynchronous request that can be serviced by an accelerator;

detect, by the hypervisor, in response to receiving the asynchronous request, that the accelerator is not initialized;

store in the memory, by the hypervisor, at least one of the asynchronous request, an indication of the asynchronous request, or an indication that the accelerator is not initialized;

detect, by the hypervisor, after receiving the asynchronous request and detecting that the accelerator is not initialized, that the accelerator has become initialized; and

forward, by the hypervisor, in response to the detecting that the accelerator has become initialized, the asynchronous request to the accelerator.

9. The apparatus of claim 8 wherein the processing device is further to:

detect, the hypervisor, after the forwarding, an error caused by the accelerator; and

transmit, the hypervisor, in response to the detecting of the error, a message to the virtual machine indicating that an asynchronous error has occurred.

10. The apparatus of claim 8 wherein the processing device is further to:

receive, from a virtual machine, by the hypervisor, a synchronous request;

service, by the hypervisor, without involvement of the accelerator, the synchronous request; and

transmit, by the hypervisor, to the virtual machine that submitted the synchronous request, a message indicating that the synchronous request has been serviced.

11. The apparatus of claim 10 wherein the hypervisor services the synchronous request by emulating the accelerator.

12. The apparatus of claim 10 wherein the synchronous request is to enable a device.

13. The apparatus of claim 12 wherein the device is a physical device.

14. The apparatus of claim 12 wherein the device is a virtual device.

15. A non-transitory computer-readable medium having instructions stored therein which, when executed by a processing device, cause the processing device to execute a hypervisor to:

receive, from a virtual machine, by the hypervisor, an asynchronous request that can be serviced by an accelerator;

detect, by the hypervisor, in response to receiving the asynchronous request, that the accelerator is not initialized;

store in a memory, by the hypervisor, at least one of the asynchronous request, an indication of the asynchronous request, or an indication that the accelerator is not initialized;

detect, by the hypervisor, after detecting that the accelerator is not initialized, an error caused by initialization of the accelerator; and

transmit, by the hypervisor, a message to the virtual machine indicating that the error occurred.

16. The non-transitory computer-readable medium of claim 15 wherein the instructions further cause the processing device to:

receive, from a virtual machine, by the hypervisor, a synchronous request;

service, by the hypervisor, without involvement of the accelerator, the synchronous request; and

transmit, by from the hypervisor, to the virtual machine that submitted the synchronous request, a message indicating that the synchronous request has been serviced.

17. The non-transitory computer-readable medium of claim 16 wherein the hypervisor services the synchronous request by emulating the accelerator.

18. The non-transitory computer-readable medium of claim 16 wherein the synchronous request is to set or retrieve a parameter of a device.

19. The non-transitory computer-readable medium of claim 15 wherein the asynchronous request is to receive a packet.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 2, 2015
From: TSIRKIN, MICHAEL
To: RED HAT ISRAEL, LTD.
Reel/Frame 035813/0976 →