Virtualization with Multiple Shadow Page Tables
First Claim
Patent Images
1. A method for operating in a computing system comprised of virtualization software including a guest operating system (OS), the method comprising:
- maintaining, by the virtualization software layer, a first shadow page table for use in a kernel mode;
maintaining, by the virtualization software layer, a second shadow page table for use in a user mode; and
switching, by the virtualization software, between using the first shadow page table and the second shadow page table when the guest OS switches between operating in the kernel mode and the user mode.
1 Assignment
0 Petitions
Accused Products
Abstract
A computing system includes virtualization software including a guest operating system (OS). A method maintains, by the virtualization software layer, a first shadow page table for use in a kernel mode and a second shadow page table for use in a user mode. The virtualization software switches between using the first shadow page table and the second shadow page table when the guest OS switches between operating in the kernel mode and the user mode.
19 Citations
20 Claims
-
1. A method for operating in a computing system comprised of virtualization software including a guest operating system (OS), the method comprising:
-
maintaining, by the virtualization software layer, a first shadow page table for use in a kernel mode; maintaining, by the virtualization software layer, a second shadow page table for use in a user mode; and switching, by the virtualization software, between using the first shadow page table and the second shadow page table when the guest OS switches between operating in the kernel mode and the user mode. - View Dependent Claims (3)
-
-
2. The method of 1 further comprising:
-
receiving a kernel mode guest OS instruction; and using the first shadow page table to process the kernel mode guest OS instruction.
-
-
4. The method of 1 wherein the first shadow page table maintains entries only valid in the kernel mode and the second shadow page table maintains entries only valid in the user mode. /
-
5. The method of 1 further comprising:
-
marking guest OS pages having all user mode guest OS instructions as user mode pages; marking guest OS pages having kernel mode guest OS instructions as kernel mode pages; and marking all pages in virtualization software address space as kernel mode pages, wherein the first shadow page table is maintained for the kernel mode pages and the second shadow page table is maintained for the user mode pages.
-
-
6. The method of 1 further comprising:
-
changing kernel mode guest OS load or store instructions to load “
as user”
or store “
as user”
instructions;trapping accesses by the guest OS of kernel mode guest OS instructions; switching from the first shadow page table to the second shadow page table; and emulating and returning a value expected by the guest OS using the second shadow page table.
-
-
7. The method of 6 wherein changing comprises:
setting an “
S”
bit in each of the load or store instructions to indicate that the load or store instruction should be executed in the user mode.
-
8. The method of 1 further comprising:
-
treating a virtualization software layer load or store instruction as a normal load or store, respectively; and returning a value using the first shadow page table for the virtualization software layer load or store instruction.
-
-
9. A non-transitory computer-readable storage medium containing instructions for operating in a computing system comprised of virtualization software including a guest operating system (OS), the instructions, when executed, control the computer system to be configured for:
-
maintaining, by the virtualization software layer, a first shadow page table for use in a kernel mode; maintaining, by the virtualization software layer, a second shadow page table for use in a user mode; and switching, by the virtualization software, between using the first shadow page table and the second shadow page table when the guest OS switches between operating in the kernel mode and the user mode.
-
-
10. The non-transitory computer-readable storage medium of 9 further comprising:
-
receiving a kernel mode guest OS instruction; and using the first shadow page table to process the kernel mode guest OS instruction.
-
-
11. The non-transitory computer-readable storage medium of 9 further comprising:
-
receiving a user mode guest OS instruction; and using the second shadow page table to process the user mode guest OS instruction.
-
-
12. The non-transitory computer-readable storage medium of 9 wherein the first shadow page table maintains entries only valid in the kernel mode and the second shadow page table maintains entries only valid in the user mode.
-
13. The non-transitory computer-readable storage medium of 9 further comprising:
-
marking guest OS pages having all user mode guest OS instructions as user mode pages; marking guest OS pages having kernel mode guest OS instructions as kernel mode pages; and marking all pages in virtualization software address space as kernel mode pages, wherein the first shadow page table is maintained for the kernel mode pages and the second shadow page table is maintained for the user mode pages.
-
-
14. The non-transitory computer-readable storage medium of 9 further comprising:
-
changing kernel mode guest OS load or store instructions to load “
as user”
or store “
as user”
instructions;trapping accesses by the guest OS of kernel mode guest OS instructions; switching from the first shadow page table to the second shadow page table; and emulating and returning a value expected by the guest OS using the second shadow page table.
-
-
15. The non-transitory computer-readable storage medium of 14 wherein changing comprises:
setting an “
S”
bit in each of the load or store instructions to indicate that the load or store instruction should be executed in the user mode.
-
16. The non-transitory computer-readable storage medium of 9 further comprising:
-
treating a virtualization software layer load or store instruction as a normal load or store, respectively; and returning a value using the first shadow page table for the virtualization software layer load or store instruction.
-
-
17. An apparatus comprised of virtualization software including a guest operating system (OS), the apparatus comprising:
-
one or more computer processors; and a non-transitory computer-readable storage medium comprising instructions, that when executed, control the one or more computer processors to be configured for; maintaining, by the virtualization software layer, a first shadow page table for use in a kernel mode; maintaining, by the virtualization software layer, a second shadow page table for use in a user mode; and switching, by the virtualization software, between using the first shadow page table and the second shadow page table when the guest OS switches between operating in the kernel mode and the user mode.
-
-
18. The apparatus of 17 further configured for:
-
receiving a kernel mode guest OS instruction; and using the first shadow page table to process the kernel mode guest OS instruction.
-
-
19. The apparatus of 17 further comprising:
-
receiving a user mode guest OS instruction; and using the second shadow page table to process the user mode guest OS instruction.
-
-
20. The apparatus of 17 wherein the first shadow page table maintains entries only valid in the kernel mode and the second shadow page table maintains entries only valid in the user mode.
Specification