US11093275B2ActiveUtilityA1

Partial surprise removal of a device for virtual machine migration

Assignee: RED HAT INCPriority: Apr 23, 2019Filed: Apr 23, 2019Granted: Aug 17, 2021
Est. expiryApr 23, 2039(~12.7 yrs left)· nominal 20-yr term from priority
Inventors:Michael Tsirkin
G06F 2009/4557G06F 2009/45583G06F 9/4411G06F 9/45558G06F 2009/45579
84
PatentIndex Score
3
Cited by
16
References
17
Claims

Abstract

A method includes disabling, by a hypervisor executed by a processing device of a source host system, host system access of a device associated with a virtual machine, wherein disabling the host system access prevents the virtual machine from directly accessing guest memory via the device and prevents the device from causing an interrupt. The method further includes migrating the guest memory associated with the virtual machine from the source host system to a destination host system. Upon migrating the guest memory associated with the virtual machine from the source host system to the destination host system, initiation of the virtual machine is caused on the destination host system.

Claims

exact text as granted — not AI-modified
What is claimed is: 
     
       1. A method, comprising:
 disabling, by a processing device of a source host system executing a hypervisor, host system access of a device associated with a virtual machine, wherein disabling the host system access prevents the virtual machine from directly accessing guest memory via the device and prevents the device from causing an interrupt; 
 migrating the guest memory associated with the virtual machine from the source host system to a destination host system; 
 upon migrating the guest memory associated with the virtual machine from the source host system to the destination host system, causing initiation of the virtual machine on the destination host system; and 
 transmitting, to the destination host system, a notification indicating a partial surprise removal of the device associated with the virtual machine, the notification comprising information associated with the partial surprise removal of the device. 
 
     
     
       2. The method of  claim 1 , wherein disabling the host system access of the device associated with the virtual machine comprises:
 disabling, by the hypervisor, bus mastering of the device. 
 
     
     
       3. The method of  claim 1 , further comprising:
 transmitting, to the virtual machine, a notification indicating a partial surprise removal of the device associated with the virtual machine. 
 
     
     
       4. The method of  claim 1 , further comprising:
 receiving, from the virtual machine, a request to enable host system access of the device; 
 determining whether the guest memory associated with the virtual machine is currently being migrated from the source host system to the destination host system; and 
 in response to determining that the guest memory associated with the virtual machine is currently being migrated from the source host system to the destination host system, determining to not enable host system access of the device. 
 
     
     
       5. The method of  claim 1 , further comprising:
 receiving, from the virtual machine during the migration of the guest memory associated with the virtual machine from the source host system to the destination host system, a request to modify data stored at a portion of the guest memory; 
 determining whether the data stored at the portion of the guest memory has been migrated from the source host system to the destination host system; and 
 in response to determining that the data stored at the portion of the guest memory has not been migrated from the source host system to the destination host system, enabling the virtual machine to modify the data stored at the portion of the guest memory. 
 
     
     
       6. The method of  claim 1 , further comprising:
 transmitting, to the virtual machine, a removal notification for the device associated with the virtual machine; 
 determining whether an acknowledgment to the removal notification has been received from the virtual machine within a threshold amount of time; and 
 in response to determining that the acknowledgment to the removal notification has not been received within the threshold amount of time, disabling the host system access to the device associated with the virtual machine. 
 
     
     
       7. A system, comprising:
 a memory; and 
 a processing device of a source host system, operatively coupled to the memory, to execute a hypervisor to:
 disable host system access of a device associated with a virtual machine, wherein disabling the host system access prevents the virtual machine from directly accessing guest memory via the device and prevents the device from causing an interrupt; 
 migrate the guest memory associated with the virtual machine from the source host system to a destination host system; 
 upon migrating the guest memory associated with the virtual machine from the source host system to the destination host system, cause initiation of the virtual machine on the destination host system; and 
 transmit, to the destination host system, a notification indicating a partial surprise removal of the device associated with the virtual machine, the notification comprising information associated with the partial surprise removal of the device. 
 
 
     
     
       8. The system of  claim 7 , wherein to disable the host system access of the device associated with the virtual machine, the processing device is further to:
 disable, by the hypervisor, bus mastering of the device. 
 
     
     
       9. The system of  claim 7 , wherein the processing device is further to:
 transmit, to the virtual machine, a notification indicating a partial surprise removal of the device associated with the virtual machine. 
 
     
     
       10. The system of  claim 7 , wherein the processing device is further to:
 receive, from the virtual machine, a request to enable host system access of the device; 
 determine whether the guest memory associated with the virtual machine is currently being migrated from the source host system to the destination host system; and 
 in response to determining that the guest memory associated with the virtual machine is currently being migrated from the source host system to the destination host system, determine to not enable host system access of the device. 
 
     
     
       11. The system of  claim 7 , wherein the processing device is further to:
 receive, from the virtual machine during the migration of the guest memory associated with the virtual machine from the source host system to the destination host system, a request to modify data stored at a portion of the guest memory; 
 determine whether the data stored at the portion of the guest memory has been migrated from the source host system to the destination host system; and 
 in response to determining that the data stored at the portion of the guest memory has not been migrated from the source host system to the destination host system, enable the virtual machine to modify the data stored at the portion of the guest memory. 
 
     
     
       12. The system of  claim 7 , wherein the processing device is further to:
 transmit, to the virtual machine, a removal notification for the device associated with the virtual machine; 
 determine whether an acknowledgment to the removal notification has been received within a threshold amount of time; and 
 in response to determining that the acknowledgment to the removal notification has not been received within the threshold amount of time, disable the host system access of the to the device associated with the virtual machine. 
 
     
     
       13. A non-transitory computer-readable storage medium including instructions that, when executed by a processing device of a source host system, cause the processing device to:
 disable, by the processing device executing a hypervisor, host system access of a device associated with a virtual machine, wherein disabling the host system access prevents the virtual machine from directly accessing guest memory via the device and prevents the device from causing an interrupt; 
 migrate the guest memory associated with the virtual machine from the source host system to a destination host system; 
 upon migrating the guest memory associated with the virtual machine from the source host system to the destination host system, cause initiation of the virtual machine on the destination host system; and 
 transmit, to the destination host system, a notification indicating a partial surprise removal of the device associated with the virtual machine, the notification comprising information associated with the partial surprise removal of the device. 
 
     
     
       14. The non-transitory computer-readable storage medium of  claim 13 , wherein to disable the host system access of the device associated with the virtual machine, the processing device is further to:
 disable, by the hypervisor, bus mastering of the device. 
 
     
     
       15. The non-transitory computer-readable storage medium of  claim 13 , wherein the processing device is further to:
 receive, from the virtual machine, a request to enable host system access of the device; 
 determine whether the guest memory associated with the virtual machine is currently being migrated from the source host system to the destination host system; and 
 in response to determining that the guest memory associated with the virtual machine is currently being migrated from the source host system to the destination host system, determine to not enable host system access of the device. 
 
     
     
       16. The non-transitory computer-readable storage medium of  claim 13 , wherein the processing device is further to:
 receive, from the virtual machine during the migration of the guest memory associated with the virtual machine from the source host system to the destination host system, a request to modify data stored at a portion of the guest memory; 
 determine whether the data stored at the portion of the guest memory has been migrated from the source host system to the destination host system; and 
 in response to determining that the data stored at the portion of the guest memory has not been migrated from the source host system to the destination host system, enable the virtual machine to modify the data stored at the portion of the guest memory. 
 
     
     
       17. The non-transitory computer-readable storage medium of  claim 13 , wherein the processing device is further to:
 transmit, to the virtual machine, a removal notification for the device associated with the virtual machine; 
 determine whether an acknowledgment to the removal notification has been received within a threshold amount of time; and 
 in response to determining that the acknowledgment to the removal notification has not been received within the threshold amount of time, disable the host system access of the to the device associated with the virtual machine.

Join the waitlist — get patent alerts

Track US11093275B2 — get alerts on status changes and closely related new filings.

We store only your email — no account needed. See our privacy policy.