Re: [RFC] ich9:cpuhp: add support for cpu hot-unplug with SMI broadcast enabled

2020-11-30 Thread Ankur Arora
On 2020-11-30 8:58 a.m., Laszlo Ersek wrote: On 11/28/20 00:48, Ankur Arora wrote: It is possible that there are CPUs with bits for both is_inserting and is_removing. In that case QemuCpuhpCollectApicIds() would put them in the PluggedApicIds array and the unplug eventually happens in the next

Re: [RFC] ich9:cpuhp: add support for cpu hot-unplug with SMI broadcast enabled

2020-11-30 Thread Laszlo Ersek
On 11/28/20 01:43, Ankur Arora wrote: > On 2020-11-27 7:19 a.m., Laszlo Ersek wrote: >> On 11/27/20 05:10, Ankur Arora wrote: >> >>> Yeah I was wondering what would happen for simultaneous hot add and >>> remove. >>> I guess we would always do remove first and then the add, unless we hit >>> the

Re: [RFC] ich9:cpuhp: add support for cpu hot-unplug with SMI broadcast enabled

2020-11-30 Thread Laszlo Ersek
On 11/28/20 00:48, Ankur Arora wrote: > It is possible that there are CPUs with bits for both is_inserting and > is_removing. In that case QemuCpuhpCollectApicIds() would put them in the > PluggedApicIds array and the unplug eventually happens in the next > firmware invocation. > > If a CPU has

Re: [RFC] ich9:cpuhp: add support for cpu hot-unplug with SMI broadcast enabled

2020-11-27 Thread Ankur Arora
On 2020-11-27 7:19 a.m., Laszlo Ersek wrote: On 11/27/20 05:10, Ankur Arora wrote: Yeah I was wondering what would happen for simultaneous hot add and remove. I guess we would always do remove first and then the add, unless we hit the break due to max_cpus_per_pass and switch to hot-add mode.

Re: [RFC] ich9:cpuhp: add support for cpu hot-unplug with SMI broadcast enabled

2020-11-27 Thread Ankur Arora
On 2020-11-27 3:47 a.m., Igor Mammedov wrote: On Thu, 26 Nov 2020 20:10:59 -0800 Ankur Arora wrote: On 2020-11-26 12:38 p.m., Igor Mammedov wrote: On Thu, 26 Nov 2020 12:17:27 +0100 Laszlo Ersek wrote: On 11/24/20 13:25, Igor Mammedov wrote: If firmware negotiates

Re: [RFC] ich9:cpuhp: add support for cpu hot-unplug with SMI broadcast enabled

2020-11-27 Thread Ankur Arora
On 2020-11-27 7:02 a.m., Laszlo Ersek wrote: On 11/27/20 12:33, Igor Mammedov wrote: On Thu, 26 Nov 2020 19:35:30 -0800 Ankur Arora wrote: On 2020-11-26 4:46 a.m., Laszlo Ersek wrote: On 11/26/20 11:24, Ankur Arora wrote: On 2020-11-24 4:25 a.m., Igor Mammedov wrote: If firmware

Re: [RFC] ich9:cpuhp: add support for cpu hot-unplug with SMI broadcast enabled

2020-11-27 Thread Laszlo Ersek
On 11/27/20 16:07, Igor Mammedov wrote: > On Fri, 27 Nov 2020 15:48:34 +0100 > Laszlo Ersek wrote: >> The firmware logic needs to be aware of is_removing though, at least >> understand the existence of this bit, as the "get pending" command >> will report such CPUs too that only have is_removing

Re: [RFC] ich9:cpuhp: add support for cpu hot-unplug with SMI broadcast enabled

2020-11-27 Thread Laszlo Ersek
On 11/27/20 05:10, Ankur Arora wrote: > Yeah I was wondering what would happen for simultaneous hot add and remove. > I guess we would always do remove first and then the add, unless we hit > the break due to max_cpus_per_pass and switch to hot-add mode. Considering the firmware only, I disagree

Re: [RFC] ich9:cpuhp: add support for cpu hot-unplug with SMI broadcast enabled

2020-11-27 Thread Laszlo Ersek
On 11/26/20 21:38, Igor Mammedov wrote: > On Thu, 26 Nov 2020 12:17:27 +0100 > Laszlo Ersek wrote: > >> On 11/24/20 13:25, Igor Mammedov wrote: >>> diff --git a/docs/specs/acpi_cpu_hotplug.txt >>> b/docs/specs/acpi_cpu_hotplug.txt >>> index 9bb22d1270..f68ef6e06c 100644 >>> ---

Re: [RFC] ich9:cpuhp: add support for cpu hot-unplug with SMI broadcast enabled

2020-11-27 Thread Laszlo Ersek
On 11/27/20 12:33, Igor Mammedov wrote: > On Thu, 26 Nov 2020 19:35:30 -0800 > Ankur Arora wrote: > >> On 2020-11-26 4:46 a.m., Laszlo Ersek wrote: >>> On 11/26/20 11:24, Ankur Arora wrote: On 2020-11-24 4:25 a.m., Igor Mammedov wrote: > If firmware negotiates

Re: [RFC] ich9:cpuhp: add support for cpu hot-unplug with SMI broadcast enabled

2020-11-27 Thread Igor Mammedov
On Fri, 27 Nov 2020 15:48:34 +0100 Laszlo Ersek wrote: > On 11/26/20 21:38, Igor Mammedov wrote: > > On Thu, 26 Nov 2020 12:17:27 +0100 > > Laszlo Ersek wrote: > > > >> On 11/24/20 13:25, Igor Mammedov wrote: > > >>> diff --git a/docs/specs/acpi_cpu_hotplug.txt > >>>

Re: [RFC] ich9:cpuhp: add support for cpu hot-unplug with SMI broadcast enabled

2020-11-27 Thread Igor Mammedov
On Thu, 26 Nov 2020 20:10:59 -0800 Ankur Arora wrote: > On 2020-11-26 12:38 p.m., Igor Mammedov wrote: > > On Thu, 26 Nov 2020 12:17:27 +0100 > > Laszlo Ersek wrote: > > > >> On 11/24/20 13:25, Igor Mammedov wrote: > >>> If firmware negotiates ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT feature, >

Re: [RFC] ich9:cpuhp: add support for cpu hot-unplug with SMI broadcast enabled

2020-11-27 Thread Igor Mammedov
On Thu, 26 Nov 2020 19:35:30 -0800 Ankur Arora wrote: > On 2020-11-26 4:46 a.m., Laszlo Ersek wrote: > > On 11/26/20 11:24, Ankur Arora wrote: > >> On 2020-11-24 4:25 a.m., Igor Mammedov wrote: > >>> If firmware negotiates ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT feature, > >>> OSPM on CPU eject

Re: [RFC] ich9:cpuhp: add support for cpu hot-unplug with SMI broadcast enabled

2020-11-26 Thread Ankur Arora
On 2020-11-26 12:38 p.m., Igor Mammedov wrote: On Thu, 26 Nov 2020 12:17:27 +0100 Laszlo Ersek wrote: On 11/24/20 13:25, Igor Mammedov wrote: If firmware negotiates ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT feature, OSPM on CPU eject will set bit #4 in CPU hotplug block for to be ejected CPU to mark

Re: [RFC] ich9:cpuhp: add support for cpu hot-unplug with SMI broadcast enabled

2020-11-26 Thread Ankur Arora
On 2020-11-26 11:50 a.m., Igor Mammedov wrote: On Thu, 26 Nov 2020 13:46:32 +0100 Laszlo Ersek wrote: On 11/26/20 11:24, Ankur Arora wrote: On 2020-11-24 4:25 a.m., Igor Mammedov wrote: If firmware negotiates ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT feature, OSPM on CPU eject will set bit #4 in

Re: [RFC] ich9:cpuhp: add support for cpu hot-unplug with SMI broadcast enabled

2020-11-26 Thread Ankur Arora
On 2020-11-26 4:46 a.m., Laszlo Ersek wrote: On 11/26/20 11:24, Ankur Arora wrote: On 2020-11-24 4:25 a.m., Igor Mammedov wrote: If firmware negotiates ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT feature, OSPM on CPU eject will set bit #4 in CPU hotplug block for to be ejected CPU to mark it for removal

Re: [RFC] ich9:cpuhp: add support for cpu hot-unplug with SMI broadcast enabled

2020-11-26 Thread Igor Mammedov
On Thu, 26 Nov 2020 12:17:27 +0100 Laszlo Ersek wrote: > On 11/24/20 13:25, Igor Mammedov wrote: > > If firmware negotiates ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT feature, > > OSPM on CPU eject will set bit #4 in CPU hotplug block for to be > > ejected CPU to mark it for removal by firmware and

Re: [RFC] ich9:cpuhp: add support for cpu hot-unplug with SMI broadcast enabled

2020-11-26 Thread Igor Mammedov
On Thu, 26 Nov 2020 02:24:27 -0800 Ankur Arora wrote: > On 2020-11-24 4:25 a.m., Igor Mammedov wrote: > > If firmware negotiates ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT feature, > > OSPM on CPU eject will set bit #4 in CPU hotplug block for to be > > ejected CPU to mark it for removal by firmware and

Re: [RFC] ich9:cpuhp: add support for cpu hot-unplug with SMI broadcast enabled

2020-11-26 Thread Igor Mammedov
On Thu, 26 Nov 2020 13:46:32 +0100 Laszlo Ersek wrote: > On 11/26/20 11:24, Ankur Arora wrote: > > On 2020-11-24 4:25 a.m., Igor Mammedov wrote: > >> If firmware negotiates ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT feature, > >> OSPM on CPU eject will set bit #4 in CPU hotplug block for to be > >>

Re: [RFC] ich9:cpuhp: add support for cpu hot-unplug with SMI broadcast enabled

2020-11-26 Thread Ankur Arora
On 2020-11-24 4:25 a.m., Igor Mammedov wrote: If firmware negotiates ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT feature, OSPM on CPU eject will set bit #4 in CPU hotplug block for to be ejected CPU to mark it for removal by firmware and trigger SMI upcall to let firmware do actual eject. Signed-off-by:

Re: [RFC] ich9:cpuhp: add support for cpu hot-unplug with SMI broadcast enabled

2020-11-26 Thread Laszlo Ersek
On 11/26/20 11:24, Ankur Arora wrote: > On 2020-11-24 4:25 a.m., Igor Mammedov wrote: >> If firmware negotiates ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT feature, >> OSPM on CPU eject will set bit #4 in CPU hotplug block for to be >> ejected CPU to mark it for removal by firmware and trigger SMI >> upcall

Re: [RFC] ich9:cpuhp: add support for cpu hot-unplug with SMI broadcast enabled

2020-11-26 Thread Laszlo Ersek
On 11/24/20 13:25, Igor Mammedov wrote: > If firmware negotiates ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT feature, > OSPM on CPU eject will set bit #4 in CPU hotplug block for to be > ejected CPU to mark it for removal by firmware and trigger SMI > upcall to let firmware do actual eject. > >

Re: [RFC] ich9:cpuhp: add support for cpu hot-unplug with SMI broadcast enabled

2020-11-24 Thread Laszlo Ersek
On 11/24/20 13:25, Igor Mammedov wrote: > If firmware negotiates ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT feature, > OSPM on CPU eject will set bit #4 in CPU hotplug block for to be > ejected CPU to mark it for removal by firmware and trigger SMI > upcall to let firmware do actual eject. > >