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

Re: [PATCH 1/3] acpi/processor: fix evaluating _PDC method when running as Xen dom0


  • To: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 21 Nov 2022 15:02:30 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=IPGbfdI0s5RvrhldWpZ8LqzeGn10EJlf7jOZx4NJznk=; b=IkpKNQNEeTGxu7IvfjnwBH67qOoceh+8vLZhG8Sf66sGjZqBWUka+YkRhIxCj+M2TkZDEL0KCYxLd2uqu57zOgc6G+aFYRFndRkaoka2jAnUASA5AhZWSJPooB8sKbm0dmmllAeiq15vnZTGFkHPd9pXX7PihEyZUu5ccj7gkJ8q/Ck1uqefhI61NTrZsU2uNnZwVMj8rbjQzfIDmqA949nSWcMNuCNPZlK8ZNQY/yaR8xI5Tec8ZkWqPqsD/Tusdch9vjm1yzf1c4le3TMnnj708EvsdQ6+JWvck53MOuDQ5qqEJ0U+5t/V5lEhsFM8KTOo8au7Pd2HvUiwNyusYQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PkY9CRI/ZBJj+43CC5yEuSMdyRs5x5jxpg6wrnu+0PeGBMCw1jheQGQ5U7msP6BgxibLTDLrhcU16PbTPFl7SWA5yrXaGmTd0Xy8+BrwE9YGHzM6uwovyZBSW7HFPqwidj2inN1ucq0wqiNoubkU+lPDdILxVcgKO8smhnK6SSJ8yHEiO13LMarAQjsBB2JVWbUdKraVMFaXFdeMcImKA++hatxlp/TJx4D4UWk3ysHKZGb7igfLMq836CCtt3v095jkL6lbIO/VOFcE4xT+t7uGtfgkvuuPMVP6UiakxiWTPVcWPdn/bI0lVNgPJZjwEwlWdo//QWFchNHd2AdveA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, jgross@xxxxxxxx, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>, x86@xxxxxxxxxx, "H. Peter Anvin" <hpa@xxxxxxxxx>, "Rafael J. Wysocki" <rafael@xxxxxxxxxx>, Len Brown <lenb@xxxxxxxxxx>, Alex Chiang <achiang@xxxxxx>, Venkatesh Pallipadi <venkatesh.pallipadi@xxxxxxxxx>, linux-acpi@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
  • Delivery-date: Mon, 21 Nov 2022 14:02:53 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 21.11.2022 11:21, Roger Pau Monne wrote:
> @@ -47,6 +49,15 @@ static bool __init 
> processor_physically_present(acpi_handle handle)
>               return false;
>       }
>  
> +     if (xen_initial_domain())
> +             /*
> +              * When running as a Xen dom0 the number of processors Linux
> +              * sees can be different from the real number of processors on
> +              * the system, and we still need to execute _PDC for all of
> +              * them.
> +              */
> +             return xen_processor_present(acpi_id);
> +
>       type = (acpi_type == ACPI_TYPE_DEVICE) ? 1 : 0;
>       cpuid = acpi_get_cpuid(handle, type, acpi_id);

We had to deal with this in our XenoLinux forward ports as well, but at
the time it appeared upstream I decided to make use of acpi_get_apicid()
(which meanwhile was renamed to acpi_get_phys_id()). Wouldn't than be an
option, eliminating the need for a Xen-specific new function?

Jan



 


Rackspace

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