[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [XEN PATCH] x86/msr: Allow hardware domain to read package C-state residency counters
- To: Simon Gaiser <simon@xxxxxxxxxxxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- Date: Tue, 18 Jul 2023 14:25:11 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=mFNs0Q7Ip0zkS6aRrx1P0yIll+0+bJYH3YlsnpVIEVc=; b=Dow7A9GOsOCF3rPlXzqyvdCH80/k9vpxp4v5banc/IsKP/UBpvCs4FzX3obHggB3+ZTBsFgEA8mHohdSeCF4v6OWfj2sLROKQLChKMZ8AGtdkccy5wSonaQyYmPMyAPc9nK6LGVu8q986esxJ6fscpk+ViaLzj2QYWXUUyMg1eJ1bQPj6rwslOp28JEM2BBjR21gqgkb1OmwaG1TycP04KJLVgcs0Pr5w/+r+jmfqxdwiV6xV/uSdoUSTS4JcK/+EpJo4aXCGe1O97WQdGN10iq6YFSFRLn7fWJt91IMFjtztqSwXPCE+AvqOHcyILXSScOWF5hK9zhHQ7vSywA95Q==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M+qakMDy0NvauBO/5Ixx7B+ta7+Ppud8ZXKA1tfOVLW1qFG60AmL6ksby0APmjwgm2NJmAElHncE0orGmM19hNs0OnKSR6jFkc6lzgoEjPTvuvi9Y2JREkCCbRQxf9a1Us/ukoJwMZ7a2roZboiHxzTcUSdBkf6BdosNpX1/r/oQPWuHYRSBSWWEf8sSYCxRj5xfl9aSdYlAjaMKSzrc148Xm7sVQIpOIFCqBfRGFXT67riQrqobnq7FHdpMM+VamA5sAppKmj1dPJulfbOdrqKHkpktIxPhbPRmA3k1qAzRwscYTMMgsV2oFef733ktF+e50hpgrbr0y8AqivfGpA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Tue, 18 Jul 2023 13:25:45 +0000
- Ironport-data: A9a23:B/P5z64aNuNVtJWdDmttWgxRtNrGchMFZxGqfqrLsTDasY5as4F+v jQcWDzUO/mJNmvyeNwia4yy8EwP6JCAmoJkSgo4rnhhHi5G8cbLO4+Ufxz6V8+wwm8vb2o8t plDNYOQRCwQZiWBzvt4GuG59RGQ7YnRGvynTraCYnsrLeNdYH9JoQp5nOIkiZJfj9G8Agec0 fv/uMSaM1K+s9JOGjt8B5mr9lU35ZwehBtC5gZlPa8S7AeE/5UoJMl3yZ+ZfiOQrrZ8RoZWd 86bpJml82XQ+QsaC9/Nut4XpWVTH9Y+lSDX4pZnc/DKbipq/0Te4Y5iXBYoUm9Fii3hojxE4 I4lWapc6+seFvakdOw1C3G0GszlVEFM0OevzXOX6aR/w6BaGpdFLjoH4EweZOUlFuhL7W5m1 /sfGm8hbw+62s2R7ZOKU7NC3d4bBZy+VG8fkikIITDxK98DGMiGaYOVoNhS0XE3m9xEGuvYa 4wBcz1zYR/cYhpJfFAKFJY5m+TujX76G9FagAvN+exrvC6MlEooiOSF3Nn9I7RmQe18mEqCq 32A1GP+GhwAb/SUyCaf82LqjejK9c/+cNtLS+XiqqA72jV/wEQuETIRCV6j/MKAyUfud+pWD mYf3xYX+P1aGEuDC4OVsweDiGWFuxkac9tWDewh6QuJx7bU4gCWHWwNRHhKb9lOnN87Q3km2 0GEm/vtBCdzq/uFRHSF7LCWoDiufy8PIgcqZyUJUA8E6NnLu5wog1TESdMLOLGxps34H3f32 T/ihC03nbAal8MI/6S941Hcgjioq4TJTwg6/QHeVCSu6QYRWWK+T4mh6Fye5/AfKo+cFwGFp CJdw5TY6/0SB5aQkiDLWP8KALyi+/eCNnvbnEJrGJ4isT+q/hZPYLxt3d23H28xWu5sRNMjS BK7Vd95jHOLAEaXUA==
- Ironport-hdrordr: A9a23:7ULnv6D0R2MPCWXlHemL55DYdb4zR+YMi2TDtnoBMSC9F/byqy nAppomPHPP5Qr4dhkb+Oxoe5PwJE80lqQFgrX5X43SJTUO0VHAROtfBO3Zsl/d8kbFmdK1u5 0NT0EwMqyVMbHWt7ec3CCoV/wb6J2s9qSwgOfXyH1gCTttd7pr425CajpzVncGIjV7OQ==
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 18/07/2023 2:17 pm, Simon Gaiser wrote:
> Since it's limited to the hardware domain it should be safe and it's
> very useful to have access to this directly in dom0 when debugging power
> related things for example S0ix.
You need a SoB.
But, this is an area there things are subtly broken. For package-scope
MSRs on single socket systems (which does include client systems), then
this happens to function.
It does not function for core-scoped MSRs, or at all in a multi-socket
system. In such scenarios, dom0 can be rescheduled to a CPU in a
different scope while it thinks it is sampling a single scope.
This is one of the areas where dom0 and Xen end up fighting over the system.
I agree that we want some way for dom0 to get this information, but I'm
afraid it's not as simple as just permitting access to the MSRs like this.
~Andrew
|