# US 2017/0364379 A1 · Hypervisor backdoor interface

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

- Number: US 2017/0364379 A1
- Document ID: US20170364379A1
- Status: Published application
- Kind: A1
- Application number: 15/184,455
- Filed: 2016-06-16
- Published: 2017-12-21
- Earliest claimed: 2016-06-16
- Assignees: VMware, Inc.
- Applicants: VMware, Inc.
- Inventors: Andrei WARKENTIN; Harvey TUCH; Cyprien LAPLACE; Alexander FAINKICHEN
- Web page: https://patentgrep.com/patent/US20170364379A1

## CPC

- G06F 9/45558: {Hypervisor-specific management and integration aspects}
- G06F 9/3861: {Recovery, e.g. branch miss-prediction, exception handling (error detection or correction G06F11/00)}
- G06F 11/362: Debugging of software
- G06F 11/3636: {by tracing the execution of the program}
- G06F 11/3644: {by instrumenting at runtime}
- G06F 11/3648: {using additional hardware}
- G06F 9/4812: {by interrupt, e.g. masked}
- G06F 13/24: using interrupt (G06F13/32 takes precedence)
- G06F 2009/45591: {Monitoring or debugging support}
- G06F 2209/481: Exception handling
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method of providing a backdoor interface between software executing in a virtual machine and a hypervisor executing on a computing system that supports the virtual machine includes trapping, at the hypervisor, an exception generated in response to execution of a debug instruction on a central processing unit (CPU) by the software; identifying, by an exception handler of the hypervisor handling the exception, an equivalence between an immediate operand of the debug instruction and a predefined value; and invoking, in response to the equivalence, a backdoor service of the hypervisor using state of at least one register of the CPU as parametric input, the state being set by the software prior to executing the debug instruction.

## Claims

### Claim 1

A method of providing a backdoor interface between software executing in a virtual machine and a hypervisor executing on a computing system that supports the virtual machine, the method comprising:
trapping, at the hypervisor, an exception generated in response to execution of a debug instruction on a central processing unit (CPU) by the software;
identifying, by an exception handler of the hypervisor handling the exception, an equivalence between an immediate operand of the debug instruction and a predefined value; and
invoking, in response to the equivalence, a backdoor service of the hypervisor using state of at least one register of the CPU as parametric input, the state being set by the software prior to executing the debug instruction.

### Claim 2 (depends on 1)

The method of claim 1, wherein the CPU supports at least first, second, and third execution privilege levels in order of increasing privilege, and wherein the hypervisor executes at the third execution privilege level.

### Claim 3 (depends on 2)

The method of claim 2, wherein the software executes within a context of a guest operating system of the virtual machine, and wherein the guest operating system executes at either the first execution privilege level or the second execution privilege level.

### Claim 4 (depends on 2)

The method of claim 2, wherein the first execution privilege level supports unprivileged execution in the CPU and the third execution privilege level supports virtualized operation of the CPU.

### Claim 5 (depends on 4)

The method of claim 4, wherein the CPU does not support an instruction, executable at the first execution privilege level, which generates an exception targeting the third execution privilege level.

### Claim 6 (depends on 1)

The method of claim 1, wherein the debug instruction comprises a software breakpoint instruction and the exception comprises a software breakpoint instruction exception, and wherein the method further comprises:
setting a field in a system register of the CPU to enable trapping of software breakpoint instruction exceptions at an execution privilege level of the hypervisor generated in response to the software breakpoint instruction.

### Claim 7 (depends on 1)

The method of claim 1, further comprising:
evaluating the state of the at least one register of the CPU against pre-defined criteria;
wherein the backdoor service is invoked in response to the equivalence between the immediate operand of the debug instruction and the predefined value and in response to the state of the at least one register of the CPU satisfying the pre-defined criteria.

### Claim 8 (depends on 1)

The method of claim 1, wherein the debug instruction is a first debug instruction and the exception is a first exception, and the method further comprises:
trapping, at the hypervisor, a second exception generated in response to execution of a second debug instruction on the CPU by the software;
identifying, by the exception handler of the hypervisor, a non-equivalence between an immediate operand of the second debug instruction and the predefined value; and
injecting, in response to the non-equivalence, the second exception into a less privileged execution privilege level than that of the hypervisor.

### Claim 9 (depends on 8)

The method of claim 8, wherein the software executes within a context of a guest operating system of the virtual machine, and wherein the guest operating system executes at the less privileged execution privilege level.

### Claim 10

A non-transitory computer readable medium comprising instructions to be executed in a computing device to cause the computing device to carry out a method of providing a backdoor interface between software executing in a virtual machine and a hypervisor executing on a computing device that supports the virtual machine, the method comprising:
trapping, at the hypervisor, an exception generated in response to execution of a debug instruction on a central processing unit (CPU) by the software;
identifying, by an exception handler of the hypervisor handling the exception, an equivalence between an immediate operand of the debug instruction and a predefined value; and
invoking, in response to the equivalence, a backdoor service of the hypervisor using state of at least one register of the CPU as parametric input, the state being set by the software prior to executing the debug instruction.

### Claim 11 (depends on 10)

The non-transitory computer readable medium of claim 10, wherein the CPU supports at least first, second, and third execution privilege levels in order of increasing privilege, and wherein the hypervisor executes at the third execution privilege level.

### Claim 12 (depends on 11)

The non-transitory computer readable medium of claim 11, wherein the software executes within a context of a guest operating system of the virtual machine, and wherein the guest operating system executes at either the first execution privilege level or the second execution privilege level.

### Claim 13 (depends on 11)

The non-transitory computer readable medium of claim 11, wherein the first execution privilege level supports unprivileged execution in the CPU and the third execution privilege level supports virtualized operation of the CPU.

### Claim 14 (depends on 13)

The non-transitory computer readable medium of claim 13, wherein the CPU does not support an instruction, executable at the first execution privilege level, which generates an exception targeting the third execution privilege level.

### Claim 15 (depends on 10)

The non-transitory computer readable medium of claim 10, wherein the debug instruction comprises a software breakpoint instruction and the exception comprises a software breakpoint instruction exception, and wherein the method further comprises:
setting a field in a system register of the CPU to enable trapping of software breakpoint instruction exceptions at an execution privilege level of the hypervisor generated in response to the software breakpoint instruction.

### Claim 16 (depends on 10)

The non-transitory computer readable medium of claim 10, further comprising:
evaluating the state of the at least one register of the CPU against pre-defined criteria;
wherein the backdoor service is invoked in response to the equivalence between the immediate operand of the debug instruction and the predefined value and in response to the state of the at least one register of the CPU satisfying the pre-defined criteria.

### Claim 17 (depends on 10)

The non-transitory computer readable medium of claim 10, wherein the debug instruction is a first debug instruction and the exception is a first exception, and the method further comprises:
trapping, at the hypervisor, a second exception generated in response to execution of a second debug instruction on the CPU by the software;
identifying, by the exception handler of the hypervisor, a non-equivalence between an immediate operand of the second debug instruction and the predefined value; and
injecting, in response to the non-equivalence, the second exception into a less privileged execution privilege level than that of the hypervisor.

### Claim 18 (depends on 17)

The non-transitory computer readable medium of claim 17, wherein the software executes within a context of a guest operating system of the virtual machine, and wherein the guest operating system executes at the less privileged execution privilege level.

### Claim 19

A computing device, comprising:
a hardware platform having a central processing unit (CPU) and memory; and
a software platform having a hypervisor executing on the hardware platform, the hypervisor supporting a virtual machine having software executing therein, the hypervisor including an exception handling and a backdoor service, the hypervisor configured to:
trap an exception generated in response to execution of a debug instruction on the CPU by the software;
identify, by the exception handler, an equivalence between an immediate operand of the debug instruction and a predefined value; and
invoke, in response to the equivalence, the backdoor service using state of at least one register of the CPU as parametric input, the state being set by the software prior to executing the debug instruction.

### Claim 20 (depends on 19)

The computing device of claim 19, wherein the CPU supports at least first, second, and third execution privilege levels in order of increasing privilege, wherein the hypervisor executes at the third execution privilege level, wherein the software executes within a context of a guest operating system of the virtual machine, and wherein the guest operating system executes at either the first execution privilege level or the second execution privilege level.
