Hypervisor PMU Multiplexing for Guest and Host Telemetry
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In computer systems hosting multiple virtual machines, performance monitoring hardware is often underutilized due to conflicts in resource allocation, preventing the host from extracting useful telemetry data as the PMU is assumed to be used by guest VMs.
Innovation Solution
A hypervisor-based system that allows multiplexing access to performance monitoring hardware in three modes: guest, host, and system modes, prioritizing guest mode access to ensure accurate telemetry collection while enabling resource reallocation and management.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If the performance monitoring hardware is allocated exclusively to guest VMs, then the guest VMs can access performance monitoring data, but the host cannot extract useful telemetry data
Solution Approach 1:
The patent combines guest mode and host mode performance monitoring capabilities into a single PMU resource. The hypervisor implements both guest mode (for VM telemetry) and host mode (for host telemetry) simultaneously, allowing both guest VMs and the host to extract useful performance data from the same hardware resource through virtualization and mode switching mechanisms.
Solution Approach 2:
The performance monitoring unit is designed to serve multiple functions: it can operate in guest mode to provide telemetry data to virtual machines, switch to host mode to collect system-wide performance data, and support multiple VMs concurrently. This multi-functionality resolves the contradiction by making the PMU a universal resource that benefits both guest and host.
2Ease of operation
If the PMU is offered to guest VMs, then guest VMs can use it for their own purposes, but the host cannot access the PMU hardware
Solution Approach 1:
The patent implements dynamic mode switching between guest mode and host mode. The hypervisor can switch the PMU between these modes based on current needs, allowing the system to adapt flexibly. When guest VMs need performance monitoring, the PMU operates in guest mode; when the host needs telemetry data, it switches to host mode. This dynamic capability resolves the contradiction between ease of guest access and host versatility.
Solution Approach 2:
The hypervisor acts as an intermediary between the PMU hardware and both guest VMs and the host. It manages the PMU resource, implementing mode switching and arbitration to ensure both guests and host can access the PMU at appropriate times. This intermediary layer provides the flexibility needed for both guest ease of operation and host adaptability.
3Measurement precision
If multiple VMs compete for finite PMU resources, then each VM can monitor its own performance, but resource utilization becomes inefficient
Solution Approach 1:
The patent segments the PMU resource allocation by implementing separate guest mode and host mode operational states. Each VM can be assigned specific PMU counters and event monitoring capabilities within guest mode, while the host can independently access the PMU in host mode. This segmentation allows multiple VMs to monitor their own performance accurately while the hypervisor manages overall resource utilization efficiency through centralized control.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
A method for multiplexing access of the performance monitoring hardware in different modes includes providing a first mode at one or more guest partitions and providing a second mode at a management partition. Each of one or more guest partitions and the management partition is a virtual machine managed by a hypervisor. The first mode enables a guest partition access to the performance monitoring hardware for a corresponding partition. The second mode enables a management partition access to the performance monitoring hardware for at least one guest partition. The first mode has a first priority, and the second mode has a second priority that is lower than the first priority, such that when the first mode at a particular guest partition is enabled, the corresponding second mode at the management partition is automatically disabled.