Using capability indicators to indicate support for guest driven surprise removal of virtual PCI devices
First Claim
1. A method for removing a virtual device from a virtual machine having a guest operating system (OS), the virtual machine managed by a hypervisor executing on a processing device, comprising:
- receiving, by the hypervisor, a notification from the guest OS, the notification comprising a capability indicator value indicating a support level for surprise removal of a virtual device of the guest OS, the surprise removal of the virtual device comprising removal of the virtual device from the virtual machine without first providing a warning to the guest OS;
storing, by the hypervisor, the capability indicator value corresponding to the virtual device in a mapping table;
subsequently receiving, by the processing device executing the hypervisor, a request to remove the virtual device from the virtual machine;
responsive to receiving the request to remove the virtual device, accessing, by the hypervisor, the mapping table to obtain the capability indicator value corresponding to the virtual device;
identifying, by the processing device executing the hypervisor, in view of the obtained capability indicator value, a particular set of actions associated with the obtained capability indicator value, the particular set of actions to be performed to remove the virtual device from the virtual machine, the particular set of actions including at least removing the virtual device from the virtual machine without first providing the warning to the guest OS when the capability indicator indicates a safe support level, or at least first providing the warning to the guest OS before removing the virtual device from the virtual machine when the capability indicator indicates an unsafe support level; and
removing the virtual device from the virtual machine using the particular set of actions.
1 Assignment
0 Petitions
Accused Products
Abstract
A hypervisor receives a notification from a guest operating system of a virtual machine that includes a capability indicator of support provided by a virtual device driver for recovering from a surprise removal of a corresponding virtual device from the virtual machine. The hypervisor, upon receiving a request to remove the virtual device from the virtual machine, uses the capability indicator received from the guest operating system to identify one or more actions to be performed to remove the virtual device from the virtual machine. The hypervisor then removes the virtual device from the virtual machine using the identified actions.
-
Citations
20 Claims
-
1. A method for removing a virtual device from a virtual machine having a guest operating system (OS), the virtual machine managed by a hypervisor executing on a processing device, comprising:
-
receiving, by the hypervisor, a notification from the guest OS, the notification comprising a capability indicator value indicating a support level for surprise removal of a virtual device of the guest OS, the surprise removal of the virtual device comprising removal of the virtual device from the virtual machine without first providing a warning to the guest OS; storing, by the hypervisor, the capability indicator value corresponding to the virtual device in a mapping table; subsequently receiving, by the processing device executing the hypervisor, a request to remove the virtual device from the virtual machine; responsive to receiving the request to remove the virtual device, accessing, by the hypervisor, the mapping table to obtain the capability indicator value corresponding to the virtual device; identifying, by the processing device executing the hypervisor, in view of the obtained capability indicator value, a particular set of actions associated with the obtained capability indicator value, the particular set of actions to be performed to remove the virtual device from the virtual machine, the particular set of actions including at least removing the virtual device from the virtual machine without first providing the warning to the guest OS when the capability indicator indicates a safe support level, or at least first providing the warning to the guest OS before removing the virtual device from the virtual machine when the capability indicator indicates an unsafe support level; and removing the virtual device from the virtual machine using the particular set of actions. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A computing apparatus for removing a virtual device from a virtual machine having a guest operating system (OS), the virtual machine managed by a hypervisor executing on a processing device, the computing apparatus comprising:
-
a memory; and a processing device, operatively coupled to the memory, to execute the hypervisor to; receive a notification from the guest OS, the notification comprising a capability indicator value indicating a support level for surprise removal of a virtual device of the guest OS, the surprise removal of the virtual device from the virtual machine without first providing a warning to the guest OS; store the capability indicator value corresponding to the virtual device in a mapping table; subsequently receive a request to remove the virtual device from the virtual machine; responsive to receiving the request to remove the virtual device, access the mapping table to obtain the capability indicator value corresponding to the virtual device; identify, in view of the obtained capability indicator value, a particular set of actions associated with the obtained capability indicator value, the particular set of actions to be performed to remove the virtual device from the virtual machine, the particular set of actions including at least removing the virtual device from the virtual machine without first providing the warning to the guest OS when the capability indicator indicates a safe support level, or at least first providing the warning to the guest OS before removing the virtual device from the virtual machine when the capability indicator indicates an unsafe support level; and remove the virtual device from the virtual machine using the particular set of actions. - View Dependent Claims (9, 10, 11, 12, 13, 15)
-
-
14. A non-transitory computer readable storage medium for removing a virtual device from a virtual machine having a guest operating system (OS), the virtual machine managed by a hypervisor, the non-transitory computer-readable storage medium having instructions stored therein, which when executed by a processing device of a computer system, cause the processing device to:
-
receive, by the hypervisor, a notification from the guest OS, the notification comprising a capability indicator value indicating a support level for surprise removal of a virtual device of the guest OS, the surprise removal of the virtual device comprising removal of the virtual device from the virtual machine without first providing a warning to the guest OS; store, by the hypervisor, the capability indicator value corresponding to the virtual device in a mapping table; subsequently receive, by the hypervisor, a request to remove the virtual device from the virtual machine; responsive to receiving the request to remove the virtual device, access, by the hypervisor, the mapping table to obtain the capability indicator value corresponding to the virtual device; identify, by the hypervisor, in view of the obtained capability indicator value, a particular set of actions associated with the obtained capability indicator value, the particular set of actions to be performed to remove the virtual device from the virtual machine, the particular set of actions including at least removing the virtual device from the virtual machine without first providing the warning to the guest OS when the capability indicator indicates a safe support level, or at least first providing the warning to the guest OS before removing the virtual device from the virtual machine when the capability indicator indicates an unsafe support level; and remove the virtual device from the virtual machine using the particular set of actions. - View Dependent Claims (16, 17, 18, 19, 20)
-
Specification