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

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


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Mon, 21 Nov 2022 17:27:19 +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=UsDEQpJHO5qJ24sFtz7HXkUECot20VnojR6DUr5V4Ms=; b=ntMaA6Azl3RsjhJsBsXqCj0Nh/G7UGhKXMMdKTVbWGWigxNxCcmYe4fCiELKfT9btdOexdWDJvVQFkTRmLiPr0wGTB4J5kSPZ+a3aDP89JUQaKtlKcOmb64HH1bZMzctJ1o6c4SNhLWSnN78oRD2usZABbH8F0UJPvZJ+7351afYCELUdTR0AWlp1sqmG5xRKgHz8NpaqPECQfXa+LaV9ac1n9jIy1Sw7C7NvTpOtoqX1ztIUtXbh1nq2nTrOeBLZrBk+RGS1iZXey+0FJomW5bEOGU7K+yOtKa9iZ9V8dWXlTfKuRzEu8bEQXxjFfHdxC43DqpyumPgXyhklaNIyA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oIoxd9JhG43ATbf3w97tlDb4bQ3lwzWvfEL7XmdRL9GAqu20lNH/YcdvOJG+Q+89BPQUR0iGMWWDeosjjE/kBxPx2pivMHJmACWz634Y3LSmZs2Tt86W1JpcevtUcvJkG1LMy2Wzonp37zeEiV9mSMPve6pzKFm8sLE7em8s1s/9evWTqLHtKHGPrx4cZh8CFsW/DC74H1Ww8GJQO7b/JXvpLI5F73tsR55b7Aue0DJy++sePbD+iRoRP/0KlKiPKXxNXfvu+a2uWUAtwhKh45985X9mAx/UuLwhPSg3KyY8dPd9wCe8OubhKxYkrfr0dIWGAK7NCxlp/Dv+TOKEYw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, jgross@xxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
  • Delivery-date: Mon, 21 Nov 2022 16:27:41 +0000
  • Ironport-data: A9a23:VQT8A6OV53tuQvrvrR1llsFynXyQoLVcMsEvi/4bfWQNrUp00DcHy zdMDGnVbKrbYzHweIt0bd/n8xhVvJbdmIVjSQto+SlhQUwRpJueD7x1DKtS0wC6dZSfER09v 63yTvGacajYm1eF/k/F3oDJ9CU6jufQA+KmU4YoAwgpLSd8UiAtlBl/rOAwh49skLCRDhiE/ Nj/uKUzAnf8s9JPGj9SuvzrRC9H5qyo4mpB5AVmPJingXeF/5UrJMNHTU2OByOQrrl8RoaSW +vFxbelyWLVlz9F5gSNy+uTnuUiG9Y+DCDW4pZkc/HKbitq/0Te5p0TJvsEAXq7vh3S9zxHJ HehgrTrIeshFvWkdO3wyHC0GQkmVUFN0OevzXRSLaV/ZqAJGpfh66wGMa04AWEX0tcuMUpu7 NYhExUEawKIqaWykLKUceY506zPLOGzVG8ekldJ6GiBSNoDH9XESaiM4sJE1jAtgMwIBezZe 8cSdTtoalLHfgFLPVAUTpk5mY9EhFGmK2Ee9A3T+PpxujCKpOBy+OGF3N79YNuFSN8Thk+Fj mnH4374ElcRM9n3JT+toi782rKSwH+TtIQ6LaC57NpIkVuq4W0sEwEIZF2Dr/2GlRvrMz5YA wlOksY0loAw/kG2Stj2XzWjvWWJ+BUbXrJ4A+A8rQ2A1KfQywKYHXQfCC5MbsQ8s807TiBs0 UWG9/vrCiZoq6a9Um+G+/GfqjbaESwUK3ISICwJVw0I5/H9r4wpyBHCVNBuFOiylNKdJN3r6 zWDrSx7i7BNi8cOjv2/5Qqe22vqoYXVRAko4AmRRnii8g5yeI+iYcqv9ETf6vFDao2eSzFto UQ5piRX18hWZbnlqcBHaLxl8G2BjxpdDADhvA==
  • Ironport-hdrordr: A9a23:GJu9a60y4848+sWtqQO/rAqjBdhxeYIsimQD101hICG9Lfb0qy n+pp4mPEHP4wr5OEtOpTlPAtjkfZr5z+8M3WBxB8baYOCCggeVxe5ZjbcKrweQeBEWs9Qtrp uIEJIOdOEYb2IK6voSiTPQe7hA/DDEytHPuQ639QYRcegAUdAF0+4WMHf4LqUgLzM2f6bRWa DskfZvln6FQzA6f867Dn4KU6zqoMDKrovvZVorFgMq8w6HiBKv8frfHwKD1hkTfjtTyfN6mF K12DDR1+GGibWW2xXc32jc49B/n8bg8MJKAIihm9UYMTLljyevfcBEV6eZtD44jemz4BIBkc XKoT0nI8NvgkmhNl2dkF/I4U3NwTwu43jtxRuxhmbim9XwQHYfB9BajYxUXxPF4w541esMmZ 5j7ia8jd56HBnAlCPy65zhUAxrrFO9pT4HnfQIh3JSfIMCYPt6rJAZ/mlSDJAcdRiKnrwPIa 1LNoXx9fxWeVSVYzTwuXRu+sWlWjAJEhKPUiE5y76o+gkTuEo841oTxcQZkHtF3ok6UYN46+ PNNbktvK1ST+cNBJgNS9spcI+SMCjgUBjMOGWdLRDMD6ccIU/ArJbx/fEc+PyqQpoV15E/8a 6xHG+wjVRCOn4GNPf+nKGiqnv2MSaAtHXWu4xjDqFCy/PBrOGBC1zAdLgs+/HQ0Mn3TPerHs pbA6gmcsMLHVGeZrqh4DeOJaW6CUNuJfH96exLL26mk4bsFrDAkND9XbL6GIfNeAxUKl8XRE FzFgTOGA==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Mon, Nov 21, 2022 at 03:20:53PM +0100, Jan Beulich wrote:
> On 21.11.2022 11:21, Roger Pau Monne wrote:
> > 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.
> 
> Yes, these are problems (and as per reading the description of the
> last patch you even extend this "cloning" of data), but ...
> 
> > 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.
> 
> ... cloning functions living elsewhere also has the genuine problem of
> them then needing to be kept in sync without there being any trigger to
> know when an original function was changed in some way.

Well, yes, but using generic functions also has the risk of them being
modified to take into account CPUID data for example and then the
result would no longer be suitable for Xen's usage without us
noticing.

Also has the downside of parsing the data into Linux structures which
then need to be translated into Xen format.  It might be more straight
forward to just evaluate the required ACPI methods and parse the ACPI
data from the Xen ACPI Processor driver into the format used by Xen
and upload that to the hypervisor.

I realize however this is a big change, and would mean almost a
rewrite from scratch of the Xen ACPI Processor driver.  I wouldn't
want to start that task without having agreement that this is the
correct way forward.

Roger.



 


Rackspace

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