[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 1/5] xen/acpi: upload power and performance related data from a PVH dom0


  • To: Jan Beulich <jbeulich@xxxxxxxx>, Penny Zheng <Penny.Zheng@xxxxxxx>, "Roger Pau Monne" <roger.pau@xxxxxxxxxx>
  • From: Jason Andryuk <jason.andryuk@xxxxxxx>
  • Date: Tue, 25 Mar 2025 12:49:29 -0400
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=suse.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=HycmxVDEqqZCPf74R2+PCdRep2uYwvSEg3Z9pvxEVqI=; b=vQwIXVzNmKLUCAh8sDXs5015NXGBFcuWTFu3oErdNeWO0ZUpWMYKssy/2FTkUYtqQLyCZdLcJFoKA6uIavB/VmwRsFCbh8p1B/HyCiN3p+757SCn0LC9NLal7m/k15pTwdZypizIrX+9x1eSSp0TNEHp+PPjZ6oMMZZu8HiuJh4et3L+I6vzkW8kVtXgVV0q5NrjwEzcQMdVhiQwJjqrpk6aRrs8sEuA/4QVEnHcVYBLAbRD8G5Hndf35PtOCayU/CjUjQVXcu8AAHRZ0wX3E7bnlvtqY4sE+GqEKfxXkOvbYxlCwu/t9G9Cw3QihKdvlUdNMJ6lzTVPjBaTym13ww==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Rt6mXzRAx86fIskw1kzGJqweQOwaBfCywK3FjUE8mTi8UJ7JD+PGQxfVgAd1hcUAQHq/0sHzc9VyAlG11D6yVyPA3/HucgbPQyNd/GaLQU/LIG5VYOGZn867hXgR2aId77tT+QRmAdc3eqedjJLTOJen1RdRpScus3EzBzP/3lmazFz6R8rhYox4/a6iaA/MmmiXMw75xCKf/hcZjZKt/GkbgNuDjujClzW/phjNd58hTM5AUTW5wTWRhMoKaM6Q1fD5h7Vz1dewBIMYdfnPwTvGuZLnpMIlB3UQOAuznVtTlT/LHaxgGnaum0kLEXXT0lW948LvReYtjWUgeJboug==
  • Cc: Ray Huang <Ray.Huang@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, "Stefano Stabellini" <sstabellini@xxxxxxxxxx>, Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>
  • Delivery-date: Tue, 25 Mar 2025 16:49:43 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 2025-03-25 12:17, Jan Beulich wrote:
On 06.03.2025 12:08, Penny Zheng wrote:
From: Roger Pau Monne <roger.pau@xxxxxxxxxx>

When running as a PVH dom0 the ACPI MADT is crafted by Xen in order to
report the correct numbers of vCPUs that dom0 has, so the host MADT is
not provided to dom0.  This creates issues when parsing the power and
performance related data from ACPI dynamic tables, as the ACPI
Processor UIDs found on the dynamic code are likely to not match the
ones crafted by Xen in the dom0 MADT.

Xen would rely on Linux having filled at least the power and
performance related data of the vCPUs on the system, and would clone
that information in order to setup the remaining pCPUs on the system
if dom0 vCPUs < pCPUs.  However when running as PVH dom0 it's likely
that none of dom0 CPUs will have the power and performance data
filled, and hence the Xen ACPI Processor driver needs to fetch that
information by itself.

In order to do so correctly, introduce a new helper to fetch the _CST
data without taking into account the system capabilities from the
CPUID output, as the capabilities reported to dom0 in CPUID might be
different from the ones on the host.

Note that the newly introduced code will only fetch the _CST, _PSS,
_PPC and _PCT from a single CPU, and clone that information for all the
other Processors.  This won't work on an heterogeneous system with
Processors having different power and performance related data between
them.

Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
Signed-off-by: Jason Andryuk <jason.andryuk@xxxxxxx>
---
  drivers/xen/pcpu.c               |   3 +-
  drivers/xen/xen-acpi-processor.c | 232 ++++++++++++++++++++++++++++---
  include/xen/xen.h                |   2 +-
  3 files changed, 216 insertions(+), 21 deletions(-)

No dependency on another patch is mentioned anywhere (the cover letter
only says the series is based on the very patch here), yet the bulk of
the changes here (to drivers/xen/xen-acpi-processor.c) are meaningless
for a PVH Dom0, because of

config XEN_ACPI_PROCESSOR
        tristate "Xen ACPI processor"
        depends on XEN && XEN_PV_DOM0 && X86 && ACPI_PROCESSOR && CPU_FREQ

(note the XEN_PV_DOM0 in there). Is the patch here perhaps missing an
adjustment to the above, to use XEN_DOM0 instead?

Wow, I'm surprised you found that :) Yes, that is a build-time dependency, but the runtime dependency is only on xen_initial_domain(). Yes, it deserves updating.

Thanks,
Jason



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.