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

Re: [PATCH 1/1] x86/cpu/topology: Don't limit CPUs to 1 for Xen PV guests due to disabled APIC


  • To: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
  • From: Petr Vaněk <arkamar@xxxxxxxx>
  • Date: Mon, 7 Apr 2025 15:24:26 +0200
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, arkamar@xxxxxxxx, Juergen Gross <jgross@xxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, stable@xxxxxxxxxxxxxxx, x86@xxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-acpi@xxxxxxxxxxxxxxx
  • Delivery-date: Mon, 07 Apr 2025 13:25:11 +0000
  • Ironport-data: A9a23:qYR9uqv9Qc3XtNVlAKtlOG8abefnVKtfMUV32f8akzHdYApBsoF/q tZmKWqAaPmCMGv2L913YdjioUIOvsPWytIyHlM/+3szQi8WgMeUXt7xwmUcns+xwm8vaGo9s q3yv/GZdJhcokf0/0rrb/646yEhiMlkf5KkYMbcICd9WAR4fykojBNnioYRj5Vh6TSDK1rlV eja/YuGZTdJ5xYuajhJs/7b90sz1BjPkGpwUmIWNK0jUGD2yCF94KI3fcmZM3b+S49IKe+2L 86r5K255G7Q4yA2AdqjlLvhGmVSKlIFFVXmZtJ+AsBOszAazsAA+v9T2Mk0NS+7vw60c+VZk 72hg7TrEFt0Yfec8Agqe0Iw/ylWZcWq8VJcSJS1mZT7I0buKxMAzxjyZa2f0EJxFutfWAlzG fIkxD8lTDG4v96N/L2CEqpKudZ+MpbBMN1YtSQ1pd3ZJa5OrZHrTKCP/tpExG5pwMtDG+rEe s9fYigHgBboP0MJYApKTshkw6H32xETcBUBwL6RjaMt4GHWxRZZ2aTpOcGTcc7iqcB9xx7F9 jqWoz6kav0cHOOwjgicsW+svcnCogbxCLBIHp+Jz8c/1TV/wURWUnX6T2CTqOO6g0u3QfpWN 0gd4Wwlv8Aa/UqnVNT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DzJLLXMG/y8w6ra6LM3VHeytmWqe8z76EEq1LmtRrhOU4v8mVh3 sMdh2eT4oXiCAsUTI7rVUA25152queJTDM64tbs2GF2eZe9tJzBk4YgHugszx+6V95DNKqfU gTgRZ5JT/OyIfAnzgD6JikPO/pfoettZ5vOSg==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Sun, Apr 06, 2025 at 12:08:29PM +0200, Thomas Gleixner wrote:
> On Sat, Apr 05 2025 at 20:16, Petr Vaněk wrote:
> 
> > Xen PV guests in DomU have APIC disabled by design, which causes
> > topology_apply_cmdline_limits_early() to limit the number of possible
> > CPUs to 1, regardless of the configured number of vCPUs.
> 
> PV guests have a APIC emulation and there is no code which actually
> disables the APIC by design unconditionally. There is one way though,
> which disables the APIC indirectly.

It seems I have got a bit lost in APIC/ACPI abbreviations. Sorry.

> xen_arch_setup() disables ACPI, which in turn causes acpi_mps_check() to
> return 1, which disables the APIC. This only happens when the kernel
> configuration has:
> 
>      CONFIG_X86_MPPARSE=n
>      CONFIG_ACPI=y
> 
> If you enable MPPARSE the problem goes away, no?

Yes, it goes away.

> > +   /* 'maxcpus=0' 'nosmp' 'nolapic'
> > +    *
> > +    * The apic_is_disabled check is ignored for Xen PV domains because Xen
> > +    * disables ACPI in unprivileged PV DomU guests, which would otherwise 
> > limit
> > +    * CPUs to 1, even if multiple vCPUs were configured.
> 
> This is the wrong place as it invalidates the effect of 'nolapic' on the
> kernel command line for XEN PV.
> 
> You actually explain in the comment that XEN disables ACPI, so why are
> you slapping this xen check into this code instead of doing the obvious
> and prevent acpi_mps_check() to cause havoc?

Thank you for your explanation and suggestion. I will correct acpi_mps_check()
in following patch.

Thanks,
Petr



 


Rackspace

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