linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vitaly Kuznetsov <vkuznets@redhat.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: the arch/x86 maintainers <x86@kernel.org>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"linux-ia64@vger.kernel.org" <linux-ia64@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	Andrew Jones <drjones@redhat.com>
Subject: Re: [PATCH] x86/acpi: keep x86_cpu_to_acpiid mapping valid on cpu hotplug
Date: Tue, 07 Feb 2017 10:29:03 +0100	[thread overview]
Message-ID: <87shnqs61s.fsf@vitty.brq.redhat.com> (raw)
In-Reply-To: <CAJZ5v0i83hgXVymsdpLTGxrChy0qMpdbQR3Lzqvt3fFMzoaxxw@mail.gmail.com> (Rafael J. Wysocki's message of "Mon, 6 Feb 2017 22:05:57 +0100")

"Rafael J. Wysocki" <rafael@kernel.org> writes:

> On Mon, Feb 6, 2017 at 6:01 PM, Vitaly Kuznetsov <vkuznets@redhat.com> wrote:
>> We may or may not have all possible CPUs in MADT on boot but in any case
>> we're overwriting x86_cpu_to_acpiid mapping with U32_MAX when
>> acpi_register_lapic() is called again on the CPU hotplug path:
>> acpi_processor_hotadd_init() -> acpi_map_cpu() -> acpi_register_lapic().
>>
>> As we have the required acpi_id information in acpi_processor_hotadd_init()
>> propagate it to acpi_map_cpu() to always keep x86_cpu_to_acpiid mapping
>> valid.
>>
>> Reported-by: Andrew Jones <drjones@redhat.com>
>> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
>
> Is the bug report available and if so, do you have a pointer to it?
>

There was no 'real' bug, the issue was found by code inspection.
Potentially, the following scenario is currently broken:
- boot Xen HVM guest and do kdump on a secondary CPU
- with kdump kernel running try to hot-plug additional CPUs.
we'll end up with U32_MAX in x86_cpu_to_acpiid for hot-plugged CPUs so
we'll be assuming direct Linux<->Xen mapping which won't be the case and
all hypercalls referring to these CPUs will end up affecting some other
CPUs.

-- 
  Vitaly

      reply	other threads:[~2017-02-07  9:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-06 17:01 [PATCH] x86/acpi: keep x86_cpu_to_acpiid mapping valid on cpu hotplug Vitaly Kuznetsov
2017-02-06 21:05 ` Rafael J. Wysocki
2017-02-07  9:29   ` Vitaly Kuznetsov [this message]

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=87shnqs61s.fsf@vitty.brq.redhat.com \
    --to=vkuznets@redhat.com \
    --cc=drjones@redhat.com \
    --cc=hpa@zytor.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rafael@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.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).