# US 2005/0091029 A1 · System and method for the logical substitution of processor control in an emulated computing environment

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2005/0091029 A1
- Document ID: US20050091029A1
- Status: Published application
- Kind: A1
- Application number: 10/971,948
- Filed: 2004-10-22
- Published: 2005-04-28
- Earliest claimed: 2000-12-21
- Assignees: Microsoft Corporation
- Inventors: Eric Traut
- Web page: https://patentgrep.com/patent/US20050091029A1

## CPC

- G06F 9/45558: {Hypervisor-specific management and integration aspects}
- G06F 2009/45583: {Memory management, e.g. access or allocation}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

In an emulated computing environment, a method is provided for logically decoupling the host operating system from the processor of the computer system with respect to certain processor settings of the processor. A hypervisor of the emulation program replaces some of the processor settings of the processor with processor settings associated with software routines or data structures provided by the guest operating system. The replaced processor settings are written to memory. During this period, when the processor calls a software routine or accesses a data structure associated with the replaced processor setting, the processor will call or access a software routine or access a data structure associated with the guest operating system, bypassing the host operating system and communicating directly with the guest operating system. When the host operating system is to be recoupled to the processor, the processor settings that have been saved to memory are rewritten to the appropriate registers of the processor.

## Claims

### Claim 1

A method for emulating in a host computer system a guest computer system, the host computer system including a processor and a host operating system, comprising the steps of:
running an emulator program on the host system that emulates the operation of a guest operating system; and
logically decoupling the host operating system from the processor for at least one processor function related to a guest processor setting associated with the emulator program.

### Claim 2 (depends on 1)

The method for emulating in a host computer system a guest computer system of claim 1, wherein the guest processor setting associated with the emulator program is an exception vector, and further comprising the step of calling the exception handler pointed to by the exception vector.

### Claim 3 (depends on 1)

The method for emulating in a host computer system a guest computer system of claim 1, further comprising the step of logically recoupling the host operating system to the processor for the function related to a host processor setting associated with the host operating system.

### Claim 4 (depends on 1)

The method for emulating in a host computer system a guest computer system of claim 1, further comprising the steps of:
temporarily logically recoupling the host operating system to the processor to perform a function requested by the emulator program; and
logically recoupling the emulator program to the processor for the function related to the guest processor setting associated with the emulator program following completion by the host operating system of the function requested by the emulator program.

### Claim 5 (depends on 1)

The method for emulating in a host computer system a guest computer system of claim 1, wherein the emulator program operates as an application program on the host operating system.

### Claim 6 (depends on 1)

The method for emulating in a host computer system a guest computer system of claim 1, wherein the guest processor setting associated with the emulator program is an interrupt routine pointer, and further comprising the step of calling the interrupt routine pointed to by the interrupt routine pointer.

### Claim 7 (depends on 1)

The method for emulating in a host computer system a guest computer system of claim 1, wherein the guest processor setting associated with the emulator program is a pointer to an exception vector table, and further comprising the step of accessing the exception vector table using the guest processor setting associated with the emulator program.

### Claim 8 (depends on 1)

The method for emulating in a host computer system a guest computer system of claim 1, wherein the guest processor setting associated with the emulator program is a pointer to a page table associated with the guest computer system, and further comprising the step of accessing the page table of the guest computer system using the guest processor setting associated with the emulator program.

### Claim 9

A method for logically decoupling a host operating system of a computer system from the processor of the computer system, comprising the steps of:
running on the host computer system an application program having a set of functionality associated with a supervisor state of the processor of the computer system; and
replacing in the processor as part of a first replacement step a processor setting associated with the functionality of the application program and the supervisor state of the processor such that the host operating system is logically decoupled from the processor with respect to the processor operations associated with the replaced processor setting (a “decoupling process”).

### Claim 10 (depends on 9)

The method for logically decoupling a host operating system of a computer system from the processor of the computer system of claim 9, wherein the processor setting associated with the functionality of the application program is a pointer to an exception handler provided by the application program.

### Claim 11 (depends on 9)

The method for logically decoupling a host operating system of a computer system from the processor of the computer system of claim 9, wherein the processor setting associated with the functionality of the application program is a pointer to a page table of the application program.

### Claim 12 (depends on 9)

The method for logically decoupling a host operating system of a computer system from the processor of the computer system of claim 9, further comprising the steps of:
temporarily logically recoupling the host operating system to the processor for the purpose of performing a function requested by the application program; and
logically recoupling the application program to the processor for the processor settings associated with the application program following the completion by the host operating system of the function requested by the application program.

### Claim 13 (depends on 9)

The method for logically decoupling a host operating system of a computer system from the processor of the computer system of claim 9 further comprising:
reading in from an identifiable register of the processor a processor setting associated with the host operating system; and
writing the processor setting read in from memory to memory.

### Claim 14 (depends on 13)

The method for logically decoupling a host operating system of a computer system from the processor of the computer system of claim 13, wherein the memory is RAM memory.

### Claim 15 (depends on 9)

The method for logically decoupling a host operating system of a computer system from the processor of the computer system of claim 9, further comprising, subsequent to the decoupling process, replacing in the processor a processor setting associated with the functionality of the host operating system such that the host operating system is logically recoupled to the host operating system with respect to the processor operations associated with the replaced processor setting (a “recoupling process”).

### Claim 16 (depends on 15)

The method for logically decoupling a host operating system of a computer system from the processor of the computer system of claim 15, wherein the recoupling process comprises:
reading in from memory the processor setting associated with the host operating system; and
writing the processor setting to the identifiable register of the processor.

### Claim 17 (depends on 16)

The method for logically decoupling a host operating system of a computer system from the processor of the computer system of claim 16, wherein the memory is RAM memory.

### Claim 18 (depends on 9)

The method for logically decoupling a host operating system of a computer system from the processor of the computer system of claim 9, wherein the processor setting associated with the functionality of the application program is a pointer to an exception handler provided by the application program.

### Claim 19

A method for rerouting calls by a processor of a computer system to a guest operating system being emulated on a host operating system of the computer system, comprising writing in a set of replacement processor settings to the processor, the replacement set of processor settings associated with the functionality provided by the guest operating system, wherein with respect to the functionality associated with the replacement set of processor settings, the host operating system is logically decoupled from the processor and the guest operating system is logically coupled to the processor (a “decoupling process”).

### Claim 20 (depends on 19)

The method for rerouting calls by a processor of a computer system to a guest operating system being emulated on a host operating system of the computer system of claim 19, further comprising the steps of:
prior to said decoupling process, reading in an original set of processor settings from the processor, the processor settings being associated with functionality provided by the host operating system and storing the original processor settings in memory; and
subsequent to said decoupling process, reading in the original set of processor settings stored in memory, and writing the original set of processor settings to the processor, wherein with respect to functionality associated with the first set of processor settings, the host operating system is logically recoupled to the processor.

### Claim 21

A method for logically decoupling a host operating system from a processor of a computer system, comprising the steps of:
saving the contents of a set of registers on the processor to memory, the set of registers storing at least a part of the processor settings of the processor; and
writing to the set of registers a replacement set of processor settings associated with functionality provided by an application program on the host operating system.

### Claim 22 (depends on 21)

The method for logically decoupling a host operating system from a processor of a computer system of claim 21, wherein the replacement set of registers includes pointers to exception handler routines provided by the host operating system.

### Claim 23 (depends on 21)

The method for logically decoupling a host operating system from a processor of a computer system of claim 21, wherein the replacement set of registers includes pointers to interrupt handler routines provided by the host operating system.

### Claim 24 (depends on 21)

The method for logically decoupling a host operating system from a processor of a computer system of claim 21, wherein the replacement set of registers includes a page table associated with the host operating system.

### Claim 25

A computer-readable medium comprising computer-readable instructions for emulating in a host computer system a guest computer system, the host computer system including a processor and a host operating system, said computer-readable instructions comprising instructions for:
running an emulator program on the host system that emulates the operation of a guest operating system; and
logically decoupling the host operating system from the processor for at least one processor function related to a guest processor setting associated with the emulator program.

### Claim 26 (depends on 25)

The computer-readable medium comprising computer-readable instructions for emulating in a host computer system a guest computer system of claim 25, wherein the guest processor setting associated with the emulator program is an exception vector, and further comprising the step of calling the exception handler pointed to by the exception vector.

### Claim 27 (depends on 25)

The computer-readable medium comprising computer-readable instructions for emulating in a host computer system a guest computer system of claim 25, further comprising instructions for logically recoupling the host operating system to the processor for the function related to a host processor setting associated with the host operating system.

### Claim 28 (depends on 25)

The computer-readable medium comprising computer-readable instructions for emulating in a host computer system a guest computer system of claim 25, further comprising instructions for:
temporarily logically recoupling the host operating system to the processor to perform a function requested by the emulator program; and
logically recoupling the emulator program to the processor for the function related to the guest processor setting associated with the emulator program following completion by the host operating system of the function requested by the emulator program.

### Claim 29 (depends on 25)

The computer-readable medium comprising computer-readable instructions for emulating in a host computer system a guest computer system of claim 25, wherein the emulator program operates as an application program on the host operating system.

### Claim 30 (depends on 25)

The computer-readable medium comprising computer-readable instructions for emulating in a host computer system a guest computer system of claim 25, wherein the guest processor setting associated with the emulator program is an interrupt routine pointer, and further comprising instructions for calling the interrupt routine pointed to by the interrupt routine pointer.

### Claim 31 (depends on 25)

The computer-readable medium comprising computer-readable instructions for emulating in a host computer system a guest computer system of claim 25, wherein the guest processor setting associated with the emulator program is a pointer to an exception vector table, and further comprising instructions for accessing the exception vector table using the guest processor setting associated with the emulator program.

### Claim 32 (depends on 25)

The computer-readable medium comprising computer-readable instructions for emulating in a host computer system a guest computer system of claim 25, wherein the guest processor setting associated with the emulator program is a pointer to a page table associated with the guest computer system, and further comprising instructions for accessing the page table of the guest computer system using the guest processor setting associated with the emulator program.

### Claim 33

A computer-readable medium comprising computer-readable instructions for logically decoupling a host operating system of a computer system from the processor of the computer system, said computer-readable instructions comprising instructions for:
running on the host computer system an application program having a set of functionality associated with a supervisor state of the processor of the computer system; and
replacing in the processor as part of a first replacement step a processor setting associated with the functionality of the application program and the supervisor state of the processor such that the host operating system is logically decoupled from the processor with respect to the processor operations associated with the replaced processor setting (a “decoupling process”).

### Claim 34 (depends on 33)

The computer-readable medium comprising computer-readable instructions for logically decoupling a host operating system of a computer system from the processor of the computer system of claim 33, wherein the processor setting associated with the functionality of the application program is a pointer to an exception handler provided by the application program.

### Claim 35 (depends on 33)

The computer-readable medium comprising computer-readable instructions for logically decoupling a host operating system of a computer system from the processor of the computer system of claim 33, wherein the processor setting associated with the functionality of the application program is a pointer to a page table of the application program.

### Claim 36 (depends on 33)

The computer-readable medium comprising computer-readable instructions for logically decoupling a host operating system of a computer system from the processor of the computer system of claim 33, further comprising instructions for:
temporarily logically recoupling the host operating system to the processor for the purpose of performing a function requested by the application program; and
logically recoupling the application program to the processor for the processor settings associated with the application program following the completion by the host operating system of the function requested by the application program.

### Claim 37 (depends on 33)

The computer-readable medium comprising computer-readable instructions for logically decoupling a host operating system of a computer system from the processor of the computer system of claim 33 further comprising instructions for:
reading in from an identifiable register of the processor a processor setting associated with the host operating system; and
writing the processor setting read in from memory to memory.

### Claim 38 (depends on 37)

The computer-readable medium comprising computer-readable instructions for logically decoupling a host operating system of a computer system from the processor of the computer system of claim 37, wherein the memory is RAM memory.

### Claim 39 (depends on 33)

The computer-readable medium comprising computer-readable instructions for logically decoupling a host operating system of a computer system from the processor of the computer system of claim 33, further comprising instructions for, subsequent to the decoupling process, replacing in the processor a processor setting associated with the functionality of the host operating system such that the host operating system is logically recoupled to the host operating system with respect to the processor operations associated with the replaced processor setting (a “recoupling process”).

### Claim 40 (depends on 39)

The computer-readable medium comprising computer-readable instructions for logically decoupling a host operating system of a computer system from the processor of the computer system of claim 39, wherein the recoupling process comprises:
reading in from memory the processor setting associated with the host operating system; and
writing the processor setting to the identifiable register of the processor.

### Claim 41 (depends on 40)

The computer-readable medium comprising computer-readable instructions for logically decoupling a host operating system of a computer system from the processor of the computer system of claim 40, wherein the memory is RAM memory.

### Claim 42 (depends on 33)

The computer-readable medium comprising computer-readable instructions for logically decoupling a host operating system of a computer system from the processor of the computer system of claim 33, wherein the processor setting associated with the functionality of the application program is a pointer to an exception handler provided by the application program.

### Claim 43

A computer-readable medium comprising computer-readable instructions for rerouting calls by a processor of a computer system to a guest operating system being emulated on a host operating system of the computer system, comprising instructions for writing in a set of replacement processor settings to the processor, the replacement set of processor settings associated with the functionality provided by the guest operating system, wherein with respect to the functionality associated with the replacement set of processor settings, the host operating system is logically decoupled from the processor and the guest operating system is logically coupled to the processor (a “decoupling process”).

### Claim 44 (depends on 43)

The computer-readable medium comprising computer-readable instructions for rerouting calls by a processor of a computer system to a guest operating system being emulated on a host operating system of the computer system of claim 43, further comprising instructions for:
prior to said decoupling process, reading in an original set of processor settings from the processor, the processor settings being associated with functionality provided by the host operating system and storing the original processor settings in memory; and
subsequent to said decoupling process, reading in the original set of processor settings stored in memory, and writing the original set of processor settings to the processor, wherein with respect to functionality associated with the first set of processor settings, the host operating system is logically recoupled to the processor.

### Claim 45

A computer-readable medium comprising computer-readable instructions for logically decoupling a host operating system from a processor of a computer system, said computer-readable instructions comprising instructions for:
saving the contents of a set of registers on the processor to memory, the set of registers storing at least a part of the processor settings of the processor; and
writing to the set of registers a replacement set of processor settings associated with functionality provided by an application program on the host operating system.

### Claim 46 (depends on 45)

The computer-readable medium comprising computer-readable instructions for logically decoupling a host operating system from a processor of a computer system of claim 45, wherein the replacement set of registers includes pointers to exception handler routines provided by the host operating system.

### Claim 47 (depends on 45)

The computer-readable medium comprising computer-readable instructions for logically decoupling a host operating system from a processor of a computer system of claim 45, wherein the replacement set of registers includes pointers to interrupt handler routines provided by the host operating system.

### Claim 48 (depends on 45)

The computer-readable medium comprising computer-readable instructions for logically decoupling a host operating system from a processor of a computer system of claim 45, wherein the replacement set of registers includes a page table associated with the host operating system.
