Memory Page Read-Only Marking for Virtual USB Controller Change Detection

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In virtualized computer systems, frequent traversals of the frame list topology to detect changes are inefficient, as they consume time and resources, and often result in false alarms due to shared memory locations.

Innovation Solution

Marking specific memory pages as read-only and using a virtualization layer to catch page fault exceptions, allowing identified instructions to execute and storing their identifiers for future detection, thereby reducing unnecessary traversals and false positives.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If frequent traversals of the frame list topology are performed to detect changes, then detection reliability is improved, but system performance and resource usage deteriorate

Engineering Contradiction:
Improvedetection reliabilityVSAvoidsystem performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The system performs preliminary action by marking memory pages as read-only before allowing guest instructions to execute. This preventive measure enables the virtualization layer to detect write attempts through page fault exceptions without requiring frequent traversals of the frame list topology, thus maintaining detection reliability while improving system performance.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If frequent traversals of the frame list topology are performed to detect changes, then detection completeness is improved, but time consumption increases

Engineering Contradiction:
Improvedetection completenessVSAvoidtime consumption
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system replaces the mechanical traversal mechanism with a page fault-based detection mechanism. Instead of repeatedly traversing the frame list topology to detect changes, the system uses hardware-level page fault exceptions triggered when guest instructions attempt to write to read-only marked pages. This substitution eliminates time-consuming traversals while maintaining complete detection of memory modifications.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

3Measurement precision

If memory pages are marked as read-only to detect write attempts, then detection accuracy is improved, but false alarms occur due to shared memory locations

Engineering Contradiction:
Improvedetection accuracyVSAvoidfalse alarms
Core Design Contradiction:
Measurement precisionVSObject-generated harmful factors

Solution Approach 1:

The virtualization layer acts as an intermediary between the guest OS and the physical memory system. When a page fault exception occurs, the virtualization layer intercepts the exception, examines the instruction that caused it, and determines whether it was a legitimate write attempt to the frame list topology or a false alarm from shared memory locations. This intermediary analysis reduces false alarms while maintaining detection accuracy.

Inventive Principle:
Principle #24Intermediary (Mediator)

4Reliability

If complete traversal of the frame list topology is performed, then all changes are detected, but processing overhead increases

Engineering Contradiction:
Improvedetection completenessVSAvoidprocessing overhead
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The system extracts the essential detection function from the complete traversal process. By marking specific memory pages as read-only and using page fault exceptions, the system extracts only the necessary write detection capability without requiring complete traversal of the frame list topology. This extraction maintains detection completeness for write operations while significantly reducing processing overhead.

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentUS8266395B2Detecting attempts to change memory
Publication Date: 2012.09.11 VMWARE INC
  • US8266395B2 patent drawing
  • US8266395B2 patent drawing
  • US8266395B2 patent drawing

AI summary

A system and method for detecting changes of memory state. In accordance with one embodiment, memory locations to be observed are determined, and pages of these locations are marked as read-only. Then, guest instructions execute during a trial period. During the trial period, guest instructions attempting to write to the identified memory locations cause page faults which result in identifying the instructions. At the end of the trial period, the pages are returned to a writable status, and attempts to modify the memory locations by the guest code are detected based on the instruction identifier. The system and method can be used for efficient frame list topology monitoring, such as in a virtual USB controller of a virtual machine.