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

[PATCH 0/3] xen: ACPI processor related fixes


  • To: linux-kernel@xxxxxxxxxxxxxxx
  • From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Date: Mon, 21 Nov 2022 11:21:09 +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=k4SvY7y6ErqHXHaRFZW96PoM5qCfueW0X+04g2uti3o=; b=LYc7Ohas8NawiwUoNbBGFDUIpVQAL+KLfee2uOx/ivoEWmc5KMu6ieQkMYFcoUHFtNmZ6qMR8xXcHPdG4oDUaELsi7M6GSCuFFeI3Yq6/OotDNLHu5EFKbMoYEQ1JIrVJDejta/58CuoyDkqxWX+ddyNcW3s3k0Z8rkWVERsadtY5K1hWXxD97xf78svhi1ymfFjbPCKJGQNCffqz4d/1rI1VhiAdo3E1ToWQgFIdHope9IDMYmFVlIzsby/s9zfA5I3zG26ruvTRS5Vy/3/vk+kGGbowtabUrRdldHQadkQYN/HFyAOtsPacvJ41jRWG4aj4lYijxrNK817xXDMwQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gRvXG2DzKR9Szh8BWAphbhsHwRSTZfkQdNWCw2OmD5rhz9FKRL8a1J3ulHFVTeZvbArs7sS2pqu8LlaGfcEG8uTI7ujEDXeOiI2bGDr3UE41G4bAZthAehrihN3dpC8D8uWWh2zo6eP71NZiI7mbHDf1WlTAGHrjH8qcI6O2uYAVIU/zEyge9hnwdipN8AM5fhr91AdMcwW1ljnNA5zfam+W/06q2M8DRBqflRobxLj3IN607TWYsUrquigo1nrYA65dfjRzNfk5qCAbdMYmgvBDmXtLq6Iul1urlOCQBf4XS+rHE1fl/xPJWsy6Z3Ju2fGNeNI4vLEX/onuO1oc5g==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, jgross@xxxxxxxx, Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Delivery-date: Mon, 21 Nov 2022 10:33:35 +0000
  • Ironport-data: A9a23:35ylQ6oSiJoLI/wwuZ5kFxSFocJeBmIsZBIvgKrLsJaIsI4StFCzt garIBmHOPuJa2vwedFxPN+1pBxS65eByoJjQFY6rns3RCNE8JuZCYyVIHmrMnLJJKUvbq7FA +Y2MYCccZ9uHhcwgj/3b9ANeFEljfngqoLUUbKCYWYpAFc+E0/NsDo788YhmIlknNOlNA2Ev NL2sqX3NUSsnjV5KQr40YrawP9UlKm06W1wUmAWP6gR5gaHzSBNVfrzGInqR5fGatgMdgKFb 76rIIGRpgvx4xorA9W5pbf3GmVirmn6ZFXmZtJ+AsBOszAazsAA+v9T2Mk0MC+7vw6hjdFpo OihgLTrIesf0g8gr8xGO/VQO3kW0aSrY9YrK1Dn2SCY5xWun3cBX5yCpaz5VGEV0r8fPI1Ay RAXABRSVECsmL2d/PW+FKpO3856F/XoH7pK7xmMzRmBZRonabbqZvyQoPpnhnI3jM0IGuvCb c0EbzYpdA7HfxBEJlYQDtQ5gfusgX78NTZfrTp5p4JuuzSVkFM3juarbIO9lt+iHK25mm6Co W3L5SLhCwwyP92D0zuVtHmrg4cjmAurBdhPS+DjqpaGhnW2x1AjLi8zWGed4sKj1BfuSdhiF ko9r39GQa8asRbDosPGdxm5pmOU+x0RQdxdF8Uk5wyXjKnZ+QCUAi4DVDEpQMwrsoo6SCIn0 neNnsj1Hnp/vbuNU3Wf+7yI6zSoNkA9L2AYYjQfZRAY+NSlq4Y25i8jVf5mGa+xy9jqQzf5x mnQqDBk3+lKy8kWy6+84FbLxSq2oYTERRI04QORWX+56gR+Z8iuYInABUXn0Mus5b2xFjGp1 EXoUeDHhAzSJflhTBCwfdg=
  • Ironport-hdrordr: A9a23:LTSCHqF2p7Mdq+DNpLqFnJLXdLJyesId70hD6qkvc3Fom52j/f xGws5x6faVslkssb8b6LK90c67MAvhHP9OkPAs1NKZMDUO11HYSL2KgbGD/9SCIVyCygci79 YGT0EWMrSZYzlHZK7BkXOF+r0bsby6Gc6T9ITjJyAHd3AQV0gs1XYMNi+rVmlNACVWD5swE5 SRouJBujqbYHwSKuirG3UfWODHhtvT0LbrewQPCRIL4BSHyWrA0s+zLzGomjMlFx9fy7Yr9m bI1yT/+6WYqvm+jjPMymPJ6JxSud35jv9OHtaFhMQ5IijlziyoeINicbufuy1dmpDn1H8a1P 335zswNcV67H3cOkmzvBvWwgHllBIj8WXrx1O0iWbq5ZWRfkNNN+NxwaZiNjfJ4Uspu99xlI pNwmKirpJSSTfNhj706dTkXwxj0mC0vX0hu+gOiGE3a/poVJZh6agkuG9FGpYJGyz3rKghDe lVFcnZoM1bdFuLBkqpzVVH8ZiJZDAeDx2GSk8Ntoi+yD5Nhk10yEMe2Yg2gmoA3IhVcegJ28 30doBT0J1eRM4faqxwQM0bR9GsN2DLSRXQdEqPPFXcEr0dMX6lke+73FwM3pDlRHU09upypH yYO2ko9VLaOnieQ/Fm5ac7vSwkGw6GLHfQIsI33ekIhlSzfsuoDcS5ciFRryKRmYRiPiTlYY fNBHsvOY6EEYLPI/c64+SsYegmFVAuFOsoh/0cZ3Wi5ur2F6yCjJ2rTB+UHsunLQoZ
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hello,

This series aims to fix some shortcomings with the handling of ACPI
Processors objects when running as a Xen dom0.

First two patches fix the execution of the _PDC methods for all CPUs on
the system and not just the ones available to dom0, while also making
sure that the _PDC capabilities reported to ACPI match what the
perfrmance and power drivers in Xen can handle.

Final patch fixes the Xen ACPI Processor driver to also work when used
in a PVH dom0, that has a custom build ACPI MADT table and mismatched
Processor UIDs between the MADT and the Processor objects in the dynamic
AML.

I don't really like the current implementation of the Xen ACPI Processor
driver, it IMO relies too much on data being fetched by generic kernel
code.  For one the generic fetcher functions can take CPUID data into
account in order to sanitize what's found in ACPI, but capabilities
reported to dom0 can be different from the native ones.  Also the Xen
ACPI Processor code relies on cloning the data from CPUs in order to fill
for the pCPUs > vCPUs, but this is wrong when running on heterogeneous
systems.

Last patch introduces some helpers to Xen ACPI Processor that should
allow fetching all the required data, for each ACPI Processor object on
the dynamic tables.  It might be helpful to explore disabling any
Processor object handling done by generic drivers and just fetch all the
data from the Xen Processor driver itself for every Processor object on
the namespace.  Likewise it might be better to just execute _PDC from
that same Xen ACPI Processor driver instead of polluting the generic
ACPI Processor driver.

The series should be taken as a RFC partially, due to my own doubts
about whether the current implementation is indeed the right one moving
forward.

Thanks, Roger.

Roger Pau Monne (3):
  acpi/processor: fix evaluating _PDC method when running as Xen dom0
  acpi/processor: sanitize _PDC buffer bits when running as Xen dom0
  xen/acpi: upload power and performance related data from a PVH dom0

 arch/x86/include/asm/xen/hypervisor.h |  12 ++
 arch/x86/xen/enlighten.c              |  44 +++++
 drivers/acpi/processor_pdc.c          |  19 +++
 drivers/xen/xen-acpi-processor.c      | 225 ++++++++++++++++++++++++--
 4 files changed, 284 insertions(+), 16 deletions(-)

-- 
2.37.3




 


Rackspace

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