Cross-Domain Inlining in System Virtual Machines

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing system virtual machines are limited in optimizing program calls across protection domain boundaries, leading to inefficiencies due to the need for costly and overhead-intensive protection domain transitions, especially for system calls and hypercalls that cross privilege and address space boundaries.

Innovation Solution

A system and method for inlining and optimizing program calls across protection domain boundaries by generating an intermediate representation graph that spans the boundary, enhancing region nodes with protection domain information, and converting this into native ISA instructions that include privilege and address space details, allowing for optimized code generation and execution without altering the hardware's privilege level.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If inlining is performed for function calls, then code optimization and performance are improved, but inlining is limited to function calls within the same protection domain boundary

Engineering Contradiction:
Improvecode optimization capabilityVSAvoidprotection domain boundary crossing
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The patent segments the protection domain boundary by introducing a new instruction type (CALL_PROTECT) that explicitly handles protection domain transitions. This allows the inlining optimization to be applied to code sequences that span multiple protection domains by breaking down the cross-domain call into manageable segments: pre-processing in the caller domain, the actual call instruction, and post-processing in the callee domain.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces an intermediary mechanism (the CALL_PROTECT instruction and associated validation logic) that mediates between the caller and callee across protection domain boundaries. This intermediary validates the call, checks protection domain compatibility, and facilitates the transition, enabling inlining optimization while maintaining security boundaries.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If system calls and hypercalls are executed with traditional protection domain transitions, then security and isolation are maintained, but performance degradation occurs due to pipeline flushes and context reconfiguration

Engineering Contradiction:
Improveprotection domain isolationVSAvoidsystem call overhead
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent applies preliminary action by performing validation and preparation work before the actual protection domain transition. The CALL_PROTECT instruction validates the call parameters and checks protection domain compatibility in advance, so that when the transition occurs, it can be executed more efficiently without unnecessary pipeline flushes or context reconfigurations.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent changes the parameters of the call instruction by introducing a new instruction type (CALL_PROTECT) with additional parameters for specifying protection domain information. This allows the system to encode protection domain transition information directly in the instruction, enabling more efficient handling compared to traditional indirect system call mechanisms.

Inventive Principle:
Principle #35Parameter changes

3Reliability

If protection domain transitions are performed with full context reconfiguration, then security is ensured, but execution speed decreases due to pipeline flushes and register modifications

Engineering Contradiction:
Improvesecurity validationVSAvoidexecution speed
Core Design Contradiction:
ReliabilityVSSpeed

Solution Approach 1:

The patent applies local quality by making protection domain transitions local and targeted rather than global and comprehensive. Instead of flushing the entire pipeline and reconfiguring all context registers for every protection domain transition, the system performs minimal, localized validation and context changes only where necessary, maintaining security while reducing performance impact.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS8307353B2Cross-domain inlining in a system virtual machine
Publication Date: 2012.11.06 ORACLE AMERICAN INC
  • US8307353B2 patent drawing
  • US8307353B2 patent drawing
  • US8307353B2 patent drawing

AI summary

A system and method are provided for inlining across protection domain boundaries with a system virtual machine. A protection domain comprises a unique combination of a privilege level and a memory address space. The system virtual machine interprets or dynamically compiles not only application code executing under guest operating systems, but also the guest operating systems. For a program call that crosses a protection domain boundary, the virtual machine assembles an intermediate representation (IR) graph that spans the boundary. Region nodes corresponding to code on both sides of the call are enhanced with information identifying the applicable protection domains. The IR is optimized and used to generate instructions in a native ISA (Instruction Set Architecture) of the virtual machine. Individual instructions reveal the protection domain in which they are to operate, and instructions corresponding to different domains may be interleaved.