[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: Josef Johansson <josef@xxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 3 Feb 2023 08:05:04 +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=BnOUj5TLMf2PZxo7PDKEU2yiIsuRDwt/vGTXTVee/B0=; b=R+jImaa103jDIh3D0PyAenI/aGvkk80ZQqvjWofcuiIG2dtw0Ze9wzbR7TCLTjM8TSC8/YNIaJPKQLCeDS+akGi/kgKIzKQlVglN69GI+tJcCuYpzKUjWH41Ia1WwiY5AxPXcXLt6TihVp+7oSJtpvoqq80kY/z8DVXI65zN4VGm8QtSnuuym/fzOFBlK1IJDeIfuMNyJG6GTzf+DT104ZqtyfE+6FAWNyQcbkeZ2JFB1rM5hg2PHzHu5cLePC3ddNqP2sPmyDN+Wakt6+ukuTMaKPptkCHp59N0yWqAiEVa/BA95MF2A56QGsGqgDB5JaRV1/+pOK7cUKHJvzS6eg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O1BtWLNf2VrjpPfM57pv2ot1bfuZPXhOspOEB2jjNUUtVWY9y/z8CdgfLe4De43E1659ArpDHYDtKcF2jHaBpbDvlA0m84+ski1r2eiPXFLkTL4yt2GtA0FXDfqM27GXnygbhxbVcu6cHIv8sjGElhPE9WInhfgm6v/ACmhqcbV22b7dIR8Yv1gMeAzgY0+b3kRI1gOycrss8lcoY6mtqFhCIn3Tt6t5vN8Gf0pCo2r9mS/q4b/LFGYZUThlUL6+USil43CdHaVEA76P7Zv/+sz8sLK/s8TAN1WZIWt19SHU2VwTAUeyKNn/w2aFI34hccQ/3yxoyGcnDzcevBpMjw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, x86@xxxxxxxxxx, linux-acpi@xxxxxxxxxxxxxxx, Roger Pau Monne <roger.pau@xxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx
  • Delivery-date: Fri, 03 Feb 2023 07:05:28 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 30.01.2023 10:21, Josef Johansson wrote:
> On 11/21/22 11:21, Roger Pau Monne wrote:
>> --- a/arch/x86/xen/enlighten.c
>> +++ b/arch/x86/xen/enlighten.c
>> @@ -346,3 +346,30 @@ void xen_arch_unregister_cpu(int num)
>>   }
>>   EXPORT_SYMBOL(xen_arch_unregister_cpu);
>>   #endif
>> +
>> +#ifdef CONFIG_XEN_DOM0
>> +bool __init xen_processor_present(uint32_t acpi_id)
>> +{
>> +    unsigned int i, maxid;
>> +    struct xen_platform_op op = {
>> +            .cmd = XENPF_get_cpuinfo,
>> +            .interface_version = XENPF_INTERFACE_VERSION,
>> +    };
>> +    int ret = HYPERVISOR_platform_op(&op);
>> +
>> +    if (ret)
>> +            return false;
>> +
>> +    maxid = op.u.pcpu_info.max_present;
>> +    for (i = 0; i <= maxid; i++) {
>> +            op.u.pcpu_info.xen_cpuid = i;
>> +            ret = HYPERVISOR_platform_op(&op);
>> +            if (ret)
>> +                    continue;
>> +            if (op.u.pcpu_info.acpi_id == acpi_id)
>> +                    return op.u.pcpu_info.flags & XEN_PCPU_FLAGS_ONLINE;
>> +    }
>> +
>> +    return false;
>> +}
> My compiler (Default GCC on Fedora 32, compiling for Qubes) complain 
> loudly that the below was missing.
> 
> +}
> +EXPORT_SYMBOL(xen_processor_present);
> 
> `ERROR: MODPOST xen_processor_present 
> [drivers/xen/xen-acpi-processor.ko] undefined!`
> 
> Same thing with xen_sanitize_pdc in the next patch.
> 
> +}
> +EXPORT_SYMBOL(xen_sanitize_pdc);
> 
> Everything compiled fine after those changes.

Except that you may not export __init symbols. The section mismatch checker
should actually complain about that.

Jan



 


Rackspace

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