IP Library › Granted Patent US 10,635,470
Granted Patent B2
US 10,635,470 · App. 15/016,535 · Granted Apr 28, 2020

Hibernation via paravirtualization

Inventors: Michael Tsirkin (Yokneam Yillit, IL); Dor Laor (Tel Aviv, IL)
Assignee: Red Hat Israel, LTD
G06F9/45558G06F2009/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 10,635,470
App. No.
15/016,535
Granted
Apr 28, 2020
Kind
B2
Abstract

Implementations describe hibernating virtual machines (VMs). In one implementation, a method includes receiving, by a first virtual processor of a VM executed by a processing device, an instruction from a sleep-handling module of the VM to invoke a sleep function of a hypervisor executed by the processing device to manage the VM, transmitting, by the first virtual processor of the VM, a request to the hypervisor to put the VM to sleep, wherein the hypervisor, in response to the request, to stop the first virtual processor subsequent to stopping a second virtual processor of the VM, and initiating execution on the first virtual processor and on the second virtual processor responsive to the hypervisor re-starting the first and second virtual processors in response to a wake event.

Claims (37)

1. A method comprising:

receiving, by a first virtual processor of a virtual machine (VM), an instruction from a guest operating system (OS) of the VM to invoke a sleep function of a hypervisor to hibernate the VM, the VM comprising the first virtual processor and a second virtual processor, wherein the hypervisor manages execution of the VM;

transmitting, by the first virtual processor of the VM, a request to the hypervisor to put the VM, including the first virtual processor and the second virtual processor, to sleep;

and

responsive to the hypervisor re-starting the first virtual processor and second virtual processor in response to a wake event, receiving, by the VM from the hypervisor, a signal that indicates that the VM has exited a stopped state, wherein the first virtual processor that sent the request to the hypervisor to put the VM to sleep is re-started before the second virtual processor is re-started.

2. The method of claim 1 , wherein the hypervisor stops the first virtual processor in response to the request.

3. The method of claim 2 , wherein the second virtual processor is stopped before the stopping of the first virtual processor.

4. The method of claim 1 , wherein one or more virtual devices of the virtual machine are stopped by the hypervisor in response to the request, and wherein the one or more virtual devices are re-started by the hypervisor.

5. The method of claim 1 , wherein the hypervisor to:

save a state of the VM to a memory of a computer system associated with the hypervisor; and

load the state of the VM from the memory.

6. The method of claim 1 , wherein the instruction to invoke the sleep function corresponds to a command of the guest OS of the VM.

7. An apparatus comprising:

a memory to store a virtual machine (VM); and

a processing device communicably coupled to the memory, the processing device to:

receive, by a first virtual processor of the VM, an instruction from a guest operating system (OS) of the VM to invoke a sleep function of a hypervisor to hibernate the VM, the VM comprising the first virtual processor and a second virtual processor, wherein the hypervisor manages execution of the VM;

transmit, by the first virtual processor of the VM, a request to the hypervisor to put the VM, including the first virtual processor and the second virtual processor, to sleep;

and

responsive to the hypervisor re-starting the first virtual processor and the second virtual processor in response to a wake event, receive, from the hypervisor, a signal that indicates that the VM has exited a stopped state, wherein the first virtual processor that sent the request to the hypervisor to put the VM to sleep is re-started before the second virtual processor is re-started.

8. The apparatus of claim 7 , wherein the hypervisor stops the first virtual processor in response to the request.

9. The apparatus of claim 7 , wherein one or more virtual devices of the virtual machine are stopped by the hypervisor in response to the request, and wherein the one or more virtual devices are re-started by the hypervisor.

10. The apparatus of claim 7 , wherein the hypervisor to:

save a state of the VM to the memory of the apparatus associated with the hypervisor; and

load the state of the VM from the memory.

11. The apparatus of claim 7 , wherein the instruction to invoke the sleep function corresponds to a command of the guest OS of the VM.

12. A non-transitory computer-readable storage medium, having instructions stored therein, which when executed, cause a processing device to:

receive, by a first virtual processor of the VM, an instruction from a guest operation system (OS) of the VM to invoke a sleep function of a hypervisor to hibernate the VM, the VM comprising the first virtual processor and a second virtual processor, wherein the hypervisor manages execution of the VM;

transmit, by the first virtual processor of the VM, a request to the hypervisor to put the VM, including the first virtual processor and the second virtual processor, to sleep;

and

responsive to the hypervisor re-starting the first virtual processor and the second virtual processor in response to a wake event, receive, from the hypervisor, a signal that indicates that the VM has exited a stopped state, wherein the first virtual processor that sent the request to the hypervisor to put the VM to sleep is re-started before the second virtual processor is re-started.

13. The non-transitory computer-readable storage medium of claim 12 , wherein the hypervisor stops the first virtual processor in response to the request.

14. The non-transitory computer-readable storage medium of claim 12 , wherein the second virtual processor is stopped before the stopping of the first virtual processor.

15. The non-transitory computer-readable storage medium of claim 12 , wherein one or more virtual devices of the virtual machine are stopped by the hypervisor in response to the request, and wherein the one or more virtual devices are re-started by the hypervisor.

16. The non-transitory computer-readable storage medium of claim 12 , wherein the hypervisor is to:

save a state of the VM to the memory of the apparatus associated with the hypervisor; and

load the state of the VM from the memory.

17. The non-transitory computer-readable storage medium of claim 12 , wherein the instruction to invoke the sleep function corresponds to a command of the guest OS of the VM.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 23, 2016
From: TSIRKIN, MICHAEL; LAOR, DOR
To: RED HAT ISRAEL, LTD.
Reel/Frame 037799/0675 →
Continuity (2)
Continuation 13407699 · Feb 28, 2012
Related Publication 20160154669A1 · Jun 2, 2016