IP Library › Granted Patent US 11,893,408
Granted Patent B2
US 11,893,408 · App. 17/106,523 · Granted Feb 6, 2024

Protection of balloon inflated memory using temporary loan pages

Inventor: David Hildenbrand (Grasbrunn, DE)
Assignee: Red Hat, Inc.
G06F9/45558G06F2009/45583
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 11,893,408
App. No.
17/106,523
Granted
Feb 6, 2024
Kind
B2
Abstract

A system includes a guest memory having guest physical pages (“GPPs”) that includes loan pages having a fixed quantity, a host memory, a processor in communication with the memory, and a virtual machine monitor (“VMM”). The VMM is configured to track a respective state (inflated or deflated) for each respective GPP. Additionally, the VMM is configured to track a respective status (in-use or unused) of each loan page, determine that each respective loan page is in-use, un-assign a first loan page from a corresponding GPP, discard the first loan page thereby changing the first loan page from in-use to unused, and assign the unused first loan page to a first GPP that is inflated, such that the first loan page's status updates to in-use. Each respective GPP having an inflated state is temporarily backed by the fixed quantity of loan pages.

Claims (54)

1. A method comprising:

tracking a respective state for each respective page of a plurality of guest physical pages (“GPPs”) of a guest memory, wherein the plurality of GPPs includes a first group of pages, the respective state is one of inflated and deflated, and wherein the plurality of GPPs includes a second group of pages comprising a plurality of loan pages that has a fixed quantity;

tracking a respective status of each of the plurality of loan pages of the second group, wherein each respective loan page of the plurality of loan pages of the second group has a status of one of in-use and unused;

determining that each respective loan page of the plurality of loan pages of the second group is in-use;

responsive to determining that each respective loan page has an in-use status, un-assigning a first loan page of the plurality of loan pages of the second group from a corresponding GPP of the plurality of GPPs of the first group;

discarding the first loan page thereby changing the first loan page from having an in-use status to having an unused status; and

assigning the first loan page having the unused status to a first GPP of the first group that is inflated, such that the first loan page's status updates to in-use, wherein each respective page of the plurality of GPPs of the first group having an inflated state are temporarily backed by the plurality of loan pages of the second group having the fixed quantity.

2. The method of claim 1 , further comprising updating a first state for the first GPP by updating a bitmap that includes each respective state for each respective GPP.

3. The method of claim 1 , further comprising:

receiving an inflation request associated with the first GPP from a guest;

granting the inflation request; and

responsive to granting the inflation request, updating a first state for the first GPP from deflated to inflated.

4. The method of claim 1 , further comprising mapping a file into a VMM address space, wherein the file is configured to be used as at least one of (i) one of the plurality of GPPs and (ii) as guest RAM, wherein the file starts at a first address in the guest memory, and wherein the file is located at a second address in the VMM address space and has an associated size.

5. The method of claim 4 , further comprising:

mapping the second address with the associated size in the VMM address space at the first address with the associated size in the guest memory.

6. The method of claim 1 , further comprising placing a loan page in a VMM address space.

7. A system comprising:

a guest memory having a plurality of GPPs, wherein the plurality of GPPs includes a first group of pages and a second group of pages that includes a plurality of loan pages, wherein the plurality of loan pages has a fixed quantity;

a host memory;

at least one processor in communication with the guest memory and the host memory; and

a VMM configured to:

track a respective state for each respective page of the plurality of GPPs of the first group of the guest memory, wherein the respective state is one of inflated and deflated,

track a respective status of each of the plurality of loan pages of the second group, wherein each respective loan page of the plurality of loan pages of the second group has a status of one of in-use and unused,

determine that each respective loan page of the plurality of loan pages of the second group is in-use,

responsive to determining that each respective loan page has an in-use status, un-assign a first loan page of the plurality of loan pages of the second group from a corresponding GPP of the plurality of GPPs of the first group,

discard the first loan page thereby changing the first loan page from in-use to unused, and

assign the first loan page having the unused status to a first GPP of the first group that is inflated, such that the first loan page's status updates to in-use, wherein each respective page of the plurality of GPPs of the first group having an inflated state are temporarily backed by the plurality of loan pages of the second group having the fixed quantity.

8. The system of claim 7 , wherein the VMM is further configured to update a first state for the first GPP by updating a bitmap that includes each respective state for each respective GPP.

9. The system of claim 7 , wherein the VMM is a hypervisor.

10. The system of claim 7 , wherein at least a portion of the guest memory is at least one of (i) deflated after a reboot and (ii) inflated after the reboot.

11. The system of claim 7 , wherein the plurality of GPPs and the plurality of loan pages forms the guest memory, and wherein the guest memory includes device memory.

12. The system of claim 7 , wherein the plurality of loan pages is associated with a second quantity of memory operands, and wherein the fixed quantity and the second quantity are the same.

13. The system of claim 12 , wherein the fixed quantity is an initial fixed quantity that is configurable to have a larger fixed quantity than the initial fixed quantity.

14. A system comprising:

a guest memory having a plurality of GPPs, wherein the plurality of GPPs includes a first group of pages and a second group of pages that comprises at least one loan page, and wherein the at least one loan page has a fixed quantity;

a guest operating system (“OS”);

at least one processor in communication with the guest memory; and

a hypervisor configured to:

store a guest physical address (“GPA”) for each respective loan page of the second group having a status of in-use, wherein the GPA is mapped to a corresponding virtual address, wherein each respective loan page of the at least one loan page of the second group has a status of one of in-use and unused,

responsive to a page fault being reported by the guest OS for a first GPP of the first group of the plurality of GPPs, determine a state of the first GPP,

responsive to determining the state of the first GPP as deflated, place a first fresh page for the first GPP,

responsive to determining the state of the first GPP as inflated, locate an unused loan page from the at least one loan page of the second group, and

responsive to locating the unused loan page, associate a respective GPA with the unused loan page and place a second fresh page, wherein each respective GPP of the first group having an inflated state is temporarily backed by a respective loan page.

15. The system of claim 14 , wherein the hypervisor is configured to register a fault thread as a fault handler for the guest memory.

16. The system of claim 14 , wherein the hypervisor is configured to:

discard a first loan page of the at least one loan page responsive to each loan page being in-use, thereby transitioning the first loan page from in-use to unused.

17. The system of claim 16 , wherein the first loan page is the least recent loan page to be associated with a respective GPA.

18. The system of claim 14 , further comprising at least one para-virtualized memory device, and wherein the guest memory corresponds to device memory.

19. The system of claim 14 , wherein the guest OS configured to:

inflate a respective GPP of the plurality of GPPs, and

deflate a respective GPP of the plurality of GPPs.

20. The system of claim 19 , wherein the hypervisor is configured to:

discard memory corresponding to the inflated GPP, such that a future access of a memory location associated with the inflated GPP results in a page fault; and

update a bitmap each for each instance the guest inflates or deflates a respective GPP to indicate an updated state for the respective GPP in the bitmap.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 30, 2020
From: HILDENBRAND, DAVID
To: RED HAT, INC.
Reel/Frame 054493/0232 →
Continuity (1)
Related Publication 20220171644A1 · Jun 2, 2022