IP Library Granted Patent US 8,271,450
Granted Patent B2
US 8,271,450 · App. 12/572,158 · Granted Sep 18, 2012

Monitoring a data structure in a virtual machine and determining if memory pages containing the data structure are swapped into or out of guest physical memory

Assignee: VMware, Inc.
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 8,271,450
App. No.
12/572,158
Granted
Sep 18, 2012
Kind
B2
Abstract

A method for monitoring a data structure maintained by guest software within a virtual machine is disclosed. Changes to the contents of the data structure are determined, such as by placing write traces on the memory pages containing the data structure. Also, the method involves determining when memory pages containing the data structure are swapped into and/or out of guest physical memory by the guest software, such as by placing write traces on the memory pages containing the guest page table and detecting changes to the present bit of page table entries involved in mapping virtual addresses for the data structure. Information about the contents of the data structure is retained while memory pages containing the data structure are swapped out of guest physical memory.

Claims (30)

1. A method for monitoring a data structure maintained by guest software within a virtual machine, the virtual machine being supported by virtualization logic in a virtualized computer system, the method comprising:

monitoring said data structure and detecting changes to said data structure;

determining either that one or more memory pages containing said data structure are swapped into guest physical memory by guest software or that one or more memory pages containing said data structure are swapped out of guest physical memory by guest software; and

based on the determination that one or more memory pages are swapped into or out of guest physical memory, retaining information about the contents of the data structure contained in at least one memory page that is swapped out of guest physical memory so that said contents are available after the at least one memory page has been swapped out of guest physical memory.

2. The method of claim 1 , wherein, upon detecting that a first memory page containing at least a portion of said data structure is to be swapped out of guest physical memory, copying said portion of said data structure prior to the swapping out of the first memory page and maintaining said copy of said portion while the first memory page remains swapped out of guest physical memory.

3. The method of claim 1 , wherein, upon detecting that a first memory page containing at least a portion of said data structure is to be swapped into guest physical memory, copying said portion of said data structure after the first memory page is swapped into guest physical memory and maintaining said copy of said portion until after the first memory page is subsequently swapped out of guest physical memory.

4. The method of claim 1 , wherein retaining information about the contents of the data structure comprises maintaining a shadow copy of at least a portion of the data structure.

5. The method of claim 1 , wherein the monitoring of said data structure comprises placing a write trace on one or more memory pages containing said data structure.

6. The method of claim 1 , wherein determining that one or more memory pages are swapped into or out of guest physical memory comprises placing a write trace on one or more memory pages containing a guest page table to detect a write to a guest page table entry involved in mapping virtual addresses for the data structure.

7. The method of claim 6 , wherein determining that one or more memory pages are swapped into or out of guest physical memory comprises detecting a write to a guest page table entry involved in mapping virtual addresses for the data structure that changes a present bit in the entry.

8. A computer program product embodied in a computer readable medium, the computer program product performing a method for monitoring a data structure maintained by guest software within a virtual machine, the virtual machine being supported by virtualization logic in a virtualized computer system, the method comprising:

monitoring said data structure and detecting changes to said data structure;

determining either that one or more memory pages containing said data structure are swapped into guest physical memory by guest software or that one or more memory pages containing said data structure are swapped out of guest physical memory by guest software; and

based on the determination that one or more memory pages are swapped into or out of guest physical memory, retaining information about the contents of the data structure contained in at least one memory page that is swapped out of guest physical memory so that said contents are available after the at least one memory page has been swapped out of guest physical memory.

9. The computer program product of claim 8 , wherein, upon detecting that a first memory page containing at least a portion of said data structure is to be swapped out of guest physical memory, copying said portion of said data structure prior to the swapping out of the first memory page and maintaining said copy of said portion while the first memory page remains swapped out of guest physical memory.

10. The computer program product of claim 8 , wherein, upon detecting that a first memory page containing at least a portion of said data structure is to be swapped into guest physical memory, copying said portion of said data structure after the first memory page is swapped into guest physical memory and maintaining said copy of said portion until after the first memory page is subsequently swapped out of guest physical memory.

11. The computer program product of claim 8 , wherein retaining information about the contents of the data structure comprises maintaining a shadow copy of at least a portion of the data structure.

12. The computer program product of claim 8 , wherein the monitoring of said data structure comprises placing a write trace on one or more memory pages containing said data structure.

13. The computer program product of claim 8 , wherein determining that one or more memory pages are swapped into or out of guest physical memory comprises placing a write trace on one or more memory pages containing a guest page table to detect a write to a guest page table entry involved in mapping virtual addresses for the data structure.

14. The computer program product of claim 13 , wherein determining that one or more memory pages are swapped into or out of guest physical memory comprises detecting a write to a guest page table entry involved in mapping virtual addresses for the data structure that changes a present bit in the entry.

15. A virtualized computer system comprising a physical computer system with virtualization software executing thereon, the virtualization software supporting operation of a virtual machine with guest software executing therein, the virtualized computer system further comprising computer program code, the computer program code performing a method for monitoring a data structure maintained by the guest software within the virtual machine, the method comprising:

monitoring said data structure and detecting changes to said data structure;

determining either that one or more memory pages containing said data structure are swapped into guest physical memory by guest software or that one or more memory pages containing said data structure are swapped out of guest physical memory by guest software; and

based on the determination that one or more memory pages are swapped into or out of guest physical memory, retaining information about the contents of the data structure contained in at least one memory page that is swapped out of guest physical memory so that said contents are available after the at least one memory page has been swapped out of guest physical memory.

16. The virtualized computer system of claim 15 , wherein, upon detecting that a first memory page containing at least a portion of said data structure is to be swapped out of guest physical memory, copying said portion of said data structure prior to the swapping out of the first memory page and maintaining said copy of said portion while the first memory page remains swapped out of guest physical memory.

17. The virtualized computer system of claim 15 , wherein, upon detecting that a first memory page containing at least a portion of said data structure is to be swapped into guest physical memory, copying said portion of said data structure after the first memory page is swapped into guest physical memory and maintaining said copy of said portion until after the first memory page is subsequently swapped out of guest physical memory.

18. The virtualized computer system of claim 15 , wherein retaining information about the contents of the data structure comprises maintaining a shadow copy of at least a portion of the data structure.

19. The virtualized computer system of claim 15 , wherein the monitoring of said data structure comprises placing a write trace on one or more memory pages containing said data structure.

20. The virtualized computer system of claim 15 , wherein determining that one or more memory pages are swapped into or out of guest physical memory comprises placing a write trace on one or more memory pages containing a guest page table to detect a write to a guest page table entry involved in mapping virtual addresses for the data structure.

21. The virtualized computer system of claim 20 , wherein determining that one or more memory pages are swapped into or out of guest physical memory comprises detecting a write to a guest page table entry involved in mapping virtual addresses for the data structure that changes a present bit in the entry.

Assignments (2)
CHANGE OF NAME Recorded Apr 15, 2024
From: VMWARE, INC.
To: VMWARE LLC
Reel/Frame 067102/0242 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 30, 2009
From: HOROVITZ, ODED; RACHMAN, OPHIR; XU, WEI; DRZEWIECKI, ADRIAN; CHEN, XIAOXIN
To: VMWARE, INC.
Reel/Frame 023447/0236 →
Continuity (1)
Related Publication 20110082962A1 · Apr 7, 2011