Switching between multiple software entities using different operating modes of a processor in a computer system
First Claim
1. A computer program embodied in a tangible medium, the computer program being executable in a computer system, the computer system comprising a new processor having a new operating mode and a legacy operating mode, the legacy operating mode being suitable for executing a legacy application and a legacy operating system (OS), the computer system further comprising a host OS that is executable on the new processor in the new operating mode, the computer program comprising:
- a virtualization software that is executable on the new processor in the legacy mode, the virtualization software supporting a virtual machine (VM) having a virtual legacy processor on which a legacy OS and a legacy application can run;
a switch routine for switching between the host OS executing in the new operating mode and the virtualization software executing in the legacy operating mode, the new processor including a legacy instruction set for the legacy operating mode and a new instruction set for the new operation mode, the switching includes switching from the new instruction set to the legacy instruction set and switching paging tables, each of the new operating mode and the legacy operating mode having separate paging tables,wherein, the switch routine is incorporated in a switch page that is locked in physical memory, the switch page having a first section to store a part of switching instructions conforming to the new instruction set and a second section to store another part of the switching instructions conforming to the legacy instruction set; and
a driver loaded in the host OS for initiating the switch routine from the host OS, wherein the switch routine is a part of the driver.
2 Assignments
0 Petitions
Accused Products
Abstract
A processor has multiple operating modes, such as the long/compatibility mode, the long/64-bit mode and the legacy modes of the x86-64 microprocessor. Different software entities execute in different ones of these operating modes. A switching routine is implemented to switch from one operating mode to another and to transfer control from one software entity to another. The software entities may be, for example, a host operating system and a virtual machine monitor. Thus, for example, a virtual computer system may comprise a 64-bit host operating system and a 32-bit virtual machine monitor, executing on an x86-64 microprocessor in long mode and legacy mode, respectively, with the virtual machine monitor supporting an x86 virtual machine. The switching routine may be implemented partially or completely in an identity-mapped memory page. Execution of the switching routine may be initiated by a driver that is installed in the host operating system of a virtual computer system.
-
Citations
33 Claims
-
1. A computer program embodied in a tangible medium, the computer program being executable in a computer system, the computer system comprising a new processor having a new operating mode and a legacy operating mode, the legacy operating mode being suitable for executing a legacy application and a legacy operating system (OS), the computer system further comprising a host OS that is executable on the new processor in the new operating mode, the computer program comprising:
-
a virtualization software that is executable on the new processor in the legacy mode, the virtualization software supporting a virtual machine (VM) having a virtual legacy processor on which a legacy OS and a legacy application can run; a switch routine for switching between the host OS executing in the new operating mode and the virtualization software executing in the legacy operating mode, the new processor including a legacy instruction set for the legacy operating mode and a new instruction set for the new operation mode, the switching includes switching from the new instruction set to the legacy instruction set and switching paging tables, each of the new operating mode and the legacy operating mode having separate paging tables, wherein, the switch routine is incorporated in a switch page that is locked in physical memory, the switch page having a first section to store a part of switching instructions conforming to the new instruction set and a second section to store another part of the switching instructions conforming to the legacy instruction set; and a driver loaded in the host OS for initiating the switch routine from the host OS, wherein the switch routine is a part of the driver. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. A method for switching from a first software entity executing in a 64-bit mode of an x86-64 processor to a second software entity executing in a legacy mode of the processor, the first and second software entities both running at the same system level of the processor, the first software entity and the second software entity each executing with memory paging enabled, the first software entity using a first page table, the second software entity using a second page table, the method comprising:
-
a) activating a switch page table, the switch page table being different from the first and second page tables, the switch page table including a first identity mapping for a switch page, wherein the switch page includes a switch code section and a switch data section, the switch code section includes instructions for performing a context switch and the switch data section includes instructions to perform a switch between the first software entity and the second software entity, a part of the instructions for performing the switch being compiled to work in a long mode of the x86-64 processor; b) switching to a compatibility mode of the processor; c) switching to fetch instructions from the switch page using the first identity mapping; d) disabling memory paging, wherein disabling memory paging causes the processor to switch to the legacy mode; e) disabling the long mode of the processor; f) activating the second page table, the second page table including a second identity mapping for the switch page; g) enabling memory paging; and h) loading a plurality of registers of the processor with values for the second software entity, to restore a context of the second software entity. - View Dependent Claims (12, 13, 14, 15, 16, 17, 18, 19, 20)
-
-
21. A method for switching from a second software entity executing in a legacy mode of an x86-64 processor to a first software entity executing in a 64-bit mode of the processor, the first and second software entities both running at the same system level of the processor, the first software entity and the second software entity each executing with memory paging enabled, the first software entity using a first page table, the second software entity using a second page table, the method comprising:
-
a) switching to fetch instructions from a switch page using a second identity mapping for the switch page, the second identity mapping being in the second page table, wherein the switch page includes a switch code section and a switch data section, the switch code section includes instructions for performing a context switch and the switch data section includes instructions to perform a switch between the first software entity and the second software entity, a part of the instructions for performing the switch being compiled to work in the 64-bit mode of the x86-64 processor; b) disabling memory paging; c) activating a switch page table, the switch page table being different from the first and second page tables, the switch page table including a first identity mapping for the switch page, and continuing to fetch instructions from the switch page, but now using the first identity mapping; d) enabling the long mode of the processor; e) enabling memory paging, which causes the processor to switch to the compatibility mode; f) switching to the 64-bit mode of the processor; g) activating the first page table; and h) loading a plurality of registers of the processor with values for the first software entity, to restore a context of the first software entity. - View Dependent Claims (22, 23, 24, 25, 26, 27, 28, 29, 30)
-
-
31. A computer program embodied in a tangible medium, the computer program being executable in a computer system, the computer system comprising a new processor having a new operating mode and a legacy operating mode, the legacy operating mode being suitable for executing a legacy application and a legacy operating system (OS), the computer system further comprising a host OS that is executable on the new processor in the new operating mode, the computer program comprising:
-
a virtualization software that is executable on the new processor in the legacy mode, the virtualization software supporting a virtual machine (VM) having a virtual legacy processor on which a legacy OS and a legacy application can run; a switch routine for switching between the host OS executing in the new operating mode and the virtualization software executing in the legacy operating mode, the new processor including a legacy instruction set for the legacy operating mode and a new instruction set for the new operation mode, the switching includes switching from the new instruction set to the legacy instruction set and switching paging tables, each of the new operating mode and the legacy operating mode having separate paging tables, wherein, the switch routine is incorporated in a switch page that is locked in physical memory, the switch page having a first section to store a part of switching instructions conforming to the new instruction set and a second section to store another part of the switching instructions conforming to the legacy instruction set; and a driver loaded in the host OS and a host application executing on the host OS, the host application being schedulable by the host OS and calling into the driver to initiate the switch routine. - View Dependent Claims (32, 33)
-
Specification