linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Roger Pau Monne <roger.pau@citrix.com>
To: linux-kernel@vger.kernel.org
Cc: xen-devel@lists.xenproject.org, jgross@suse.com,
	Roger Pau Monne <roger.pau@citrix.com>
Subject: [PATCH 0/3] xen: ACPI processor related fixes
Date: Mon, 21 Nov 2022 11:21:09 +0100	[thread overview]
Message-ID: <20221121102113.41893-1-roger.pau@citrix.com> (raw)

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


             reply	other threads:[~2022-11-21 10:33 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-21 10:21 Roger Pau Monne [this message]
2022-11-21 10:21 ` [PATCH 1/3] acpi/processor: fix evaluating _PDC method when running as Xen dom0 Roger Pau Monne
2022-11-21 14:02   ` Jan Beulich
2022-11-21 14:29     ` Roger Pau Monné
2022-11-21 14:51       ` Jan Beulich
2022-11-21 15:09         ` Roger Pau Monné
2022-11-29 16:01   ` Roger Pau Monné
2022-11-29 17:43   ` Dave Hansen
2022-11-30 15:53     ` Roger Pau Monné
2022-11-30 16:48       ` Dave Hansen
2022-12-02 12:24         ` Roger Pau Monné
2022-12-02 16:17           ` Dave Hansen
2022-12-02 16:37             ` Roger Pau Monné
2022-12-02 17:06               ` Rafael J. Wysocki
2022-12-09 10:12                 ` Roger Pau Monné
2023-01-30  9:21   ` Josef Johansson
2023-02-03  7:05     ` Jan Beulich
2023-02-03 13:58       ` Josef Johansson
2022-11-21 10:21 ` [PATCH 2/3] acpi/processor: sanitize _PDC buffer bits " Roger Pau Monne
2022-11-21 14:10   ` Jan Beulich
2022-11-21 14:13     ` Jan Beulich
2022-11-21 15:03     ` Roger Pau Monné
2023-06-14 19:57       ` Jason Andryuk
2023-06-16 14:39         ` Roger Pau Monné
2022-11-21 10:21 ` [PATCH 3/3] xen/acpi: upload power and performance related data from a PVH dom0 Roger Pau Monne
2023-01-30  9:10   ` Josef Johansson
2023-03-15 11:39     ` Roger Pau Monné
2023-03-16  7:54       ` Josef Johansson
2023-03-16 10:06         ` Roger Pau Monné
2022-11-21 14:20 ` [PATCH 0/3] xen: ACPI processor related fixes Jan Beulich
2022-11-21 16:27   ` Roger Pau Monné

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221121102113.41893-1-roger.pau@citrix.com \
    --to=roger.pau@citrix.com \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).