US2024385867A1PendingUtilityA1

Dynamic performance monitoring virtualization support

Assignee: MICROSOFT TECHNOLOGY LICENSING LLCPriority: Jun 16, 2021Filed: Jun 13, 2022Published: Nov 21, 2024
Est. expiryJun 16, 2041(~14.9 yrs left)· nominal 20-yr term from priority
G06F 2009/45591G06F 9/45558
47
PatentIndex Score
0
Cited by
0
References
0
Claims

Abstract

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.

Claims

exact text as granted — not AI-modified
1 . A method, implemented at a computer system that includes one or more processors associated with performance monitoring hardware configured to generate telemetry data related to performance of the one or more processors, for multiplexing access the performance monitoring hardware in different modes, the computer system having a hypervisor configured to manage a plurality of virtual machines including a management partition and one or more guest partitions, each of which corresponds to one of the plurality of virtual machines, the method comprising:
 providing a first mode at the one or more guest partitions, the first mode enabling each of the one or more guest partitions to access the performance monitoring hardware for monitoring one or more virtual processors of a corresponding partition; and   providing a second mode at the management partition, the second mode enabling the management partition to access the performance monitoring hardware for monitoring one or more virtual processors of at least one of the one or more guest partitions, wherein:
 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 second mode associated with the particular guest partition at the management partition is automatically disabled. 
   
     
     
         2 . The method of  claim 1 , wherein the performance monitoring hardware includes one or more registers, and state of the performance monitoring hardware includes values stored in the one or more registers. 
     
     
         3 . The method of  claim 2 , wherein the one or more registers include at least one of (1) one or more CPU counter registers, or (2) one or more CPU configuration registers. 
     
     
         4 . The method of  claim 2 , wherein the one or more registers include one or more model-specific registers (MSRs). 
     
     
         5 . The method of  claim 1 , wherein the telemetry data includes at least one of (1) processor pipeline slot utilization, (2) stalls due to last level cache (LLC) misses, (3) shortage in hardware resources, (4) shortage in software dependencies, (5) thermal and power capping throttling events, (6) processor microcode revision, or (7) whether hyper-threading is on or off. 
     
     
         6 . The method of  claim 1 , the method further comprising providing a third mode at the management partition, the third mode enabling performance monitoring for processors of the computer system, wherein the third mode has a third priority that is lower than the second priority, such that when the first mode is enabled, the second mode and the third mode are automatically disabled, and when the second mode is enabled, the third mode is automatically disabled. 
     
     
         7 . The method of  claim 6 , the method further comprising:
 receiving a request from the management partition for enabling the second mode associated with a particular guest partition selected from the one or more guest partitions;   determining whether the first mode of the particular guest partition is enabled;   in response to determining that the first mode of the particular guest partition is enabled, preventing the second mode associated with the particular guest partition from being enabled; and   in response to determining that the first mode of the particular guest partition is disabled,
 sending a request to the hypervisor for enabling the second mode associated with the particular guest partition; 
 determining, by the hypervisor, whether the third mode associated with at least one processor among the one or more processors corresponding to one or more virtual processors of the particular guest partition has been enabled; 
 in response to determining that the third mode associated with the at least one processor has been enabled, disabling the third mode associated with the at least one processor; and 
 in response to determining that the third mode associated with the at least one processor is disabled, 
 causing, by the hypervisor, a portion of the performance monitoring hardware associated with the at least one processor to generate a set of telemetry data associated with the at least one processor; and 
 providing, by the hypervisor, the set of telemetry data generated by the portion of performance monitoring hardware to the management partition. 
   
     
     
         8 . The method of  claim 7 , when the second mode associated with the particular guest partition is enabled, the method further comprising:
 receiving a request from the management partition, indicating a request for changing at least one configuration of a portion of performance monitoring hardware associated with the at least one processor;   sending, by the management partition, a hypercall to the hypervisor, for changing the at least one configuration of the performance monitoring hardware associated with the at least one processor;   updating, by the hypervisor, the at least one configuration of the portion of performance monitoring hardware associated with at least one processor, causing the portion of performance monitoring hardware to generate a set of updated telemetry data;   reading, by the hypervisor, the set of updated telemetry data generated by the portion of performance monitoring hardware;   sending, by the hypervisor, the set of updated telemetry data generated by the portion of performance monitoring hardware to the management partition; and   causing the set of updated telemetry data to be visualized at the management partition.   
     
     
         9 . The method of  claim 6 , the method further comprising:
 sending a request from the particular guest partition for enabling the first mode of the particular guest partition;   determining whether the second mode associated with the particular guest partition has been enabled;   in response to determining that the second mode associated with the particular guest partition is enabled,
 saving a state of performance monitoring hardware associated with the particular guest partition in the second mode; 
 disabling the second mode associated with the particular guest partition; 
 enabling the third mode comprising restoring the state of performance monitoring hardware associated with the particular guest partition in the third mode; and 
 sending telemetry data generated by the performance monitoring hardware associated with the particular guest partition to the particular guest partition. 
   
     
     
         10 . The method of  claim 9 , the method further comprising:
 in response to determining that the second mode associated with the particular guest partition is disabled,
 determining, by the hypervisor, whether the third mode associated with the at least one processor has been enabled; 
 in response to determining that the third mode associated with the at least one processor has been enabled, disabling, by the hypervisor, the third mode associated with the at least one processor; and
 when the third mode associated with the at least one processor is disabled, 
 causing, by the hypervisor, the performance monitoring hardware associated with the particular guest partition to generate telemetry data associated with the at least one processor; and 
 causing the telemetry data associated with the particular partition to be sent to the particular guest partition. 
 
   
     
     
         11 . The method of  claim 9 , when the first mode of the particular guest partition is enabled, the method further comprising:
 receiving a request from the guest partition in the first mode, indicating a request for changing at least one configuration of a portion of performance monitoring hardware associated with the at least one processor;   sending, by the guest partition, an intercept to the hypervisor, for changing the at least one configuration of the performance monitoring hardware associated with the at least one processor;   updating, by the hypervisor, the at least one configuration of the portion of performance monitoring hardware associated with at least one processor, causing the portion of performance monitoring hardware to generate a set of updated telemetry data;   reading, by the hypervisor, the set of updated telemetry data generated by the portion of performance monitoring hardware;   causing the set of updated telemetry data generated by the portion of performance monitoring hardware to be received by the guest partition; and   causing the set of updated telemetry data to be visualized at the guest partition.   
     
     
         12 . The method of  claim 9 , the method further comprising:
 receiving a request for enabling a third mode associated with at least one processor among one or more processors;   identifying a guest partition that has one or more virtual processors corresponding to the at least one processor;   determining whether the first mode or the second mode associated with the guest partition has been enabled; and   in response to determining that the first mode or the second mode has been enabled, preventing the third mode from being enabled.   
     
     
         13 . The method of  claim 10 , the method further comprising:
 in response to determining that the first mode or the second mode has been disabled,
 causing performance monitoring hardware associated with the at least one processor to generate telemetry data associated with at least one processor; and 
 receiving the telemetry data associated with the at least one processor. 
   
     
     
         14 . A computer system, comprising
 one or more processors associated with performance monitoring hardware configured to generate telemetry data related to performance of the one or more processors; and   one or more computer-readable storage devices stored thereon computer-executable instructions, when the computer-executable instructions are executed, the computer system is configured to run a hypervisor configured to manage a plurality of virtual machines, including a management partition and one or more guest partitions, each of which corresponds to one of the plurality of virtual machines, the computer system further configured to:
 provide a first mode at the one or more guest partitions, the first mode enabling each of the one or more guest partitions to access the performance monitoring hardware for monitoring one or more virtual processors of a corresponding partition; 
 provide a second mode at the management partition, the second mode enabling the management partition to access the performance monitoring hardware for monitoring one or more virtual processors of at least one of the one or more guest partitions; and 
 provide a third mode at the management partition, the third mode enabling performance monitoring for processors of the computer system, wherein:
 the first mode has a first priority; 
 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 second mode associated with the particular guest partition at the management partition is automatically disabled; and 
 the third mode has a third priority that is lower than the second priority, such that when the first mode is enabled, the second mode and the third mode are automatically disabled, and when the second mode is enabled, the third mode is automatically disabled. 
 
   
     
     
         15 . The computer system of  claim 14 , the computer system further configured to:
 receive a request from the management partition for enabling the second mode associated with a particular guest partition selected from the one or more guest partitions;   determining whether the first mode of the particular guest partition is enabled;   in response to determining that the first mode of the particular guest partition is enabled, prevent the second mode associated with the particular guest partition from being enabled; and   in response to determining that the first mode of the particular guest partition is disabled,
 send a request to the hypervisor for enabling the second mode associated with the particular guest partition; 
 determine, by the hypervisor, whether the third mode associated with at least one processor among the one or more processors corresponding to one or more virtual processors of the particular guest partition has been enabled; 
 in response to determining that the third mode associated with the at least one processor has been enabled, disabling the third mode associated with the at least one processor; and 
 in response to determining that the third mode associated with the at least one processor is disabled,
 cause, by the hypervisor, a portion of the performance monitoring hardware associated with the at least one processor to generate a set of telemetry data associated with the at least one processor; and 
 provide, by the hypervisor, the set of telemetry data generated by the portion of performance monitoring hardware to the management partition. 
 
   
     
     
         16 . The computer system of  claim 14 , wherein the performance monitoring hardware includes one or more registers, and state of the performance monitoring hardware includes values stored in the one or more registers. 
     
     
         17 . The computer system of  claim 16 , wherein the one or more registers include at least one of (1) one or more CPU counter registers, or (2) one or more CPU configuration registers. 
     
     
         18 . The computer system of  claim 16 , wherein the one or more registers include one or more model-specific registers (MSRs). 
     
     
         19 . The computer system of  claim 14 , wherein the telemetry data includes at least one of (1) processor pipeline slot utilization, (2) stalls due to last level cache (LLC) misses, (3) shortage in hardware resources, (4) shortage in software dependencies, (5) thermal and power capping throttling events, (6) processor microcode revision, or (7) whether hyper-threading is on or off. 
     
     
         20 . A computer-readable storage device having stored thereon computer-executable instructions that, when executed at a processor that is associated with performance monitoring hardware configured to generate telemetry data related to performance of the processor, configure a computer system to:
 operate a hypervisor configured to manage a plurality of virtual machines, including a management partition and one or more guest partitions, each of which corresponds to one of the plurality of virtual machines;   provide a first mode at the one or more guest partitions, the first mode enabling each of the one or more guest partitions to access the performance monitoring hardware for monitoring one or more virtual processors of a corresponding partition; and   provide a second mode at the management partition, the second mode enabling the management partition to access the performance monitoring hardware for monitoring one or more virtual processors of at least one of the one or more guest partitions, wherein:
 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 second mode associated with the particular guest partition at the management partition is automatically disabled.

Join the waitlist — get patent alerts

Track US2024385867A1 — get alerts on status changes and closely related new filings.

We store only your email — no account needed. See our privacy policy.