* [PATCH] x86: cleanup unused compat_apic_id_mode
@ 2022-02-28 13:16 Igor Mammedov
2022-02-28 13:36 ` Philippe Mathieu-Daudé
2022-02-28 13:39 ` Thomas Huth
0 siblings, 2 replies; 3+ messages in thread
From: Igor Mammedov @ 2022-02-28 13:16 UTC (permalink / raw)
To: qemu-devel; +Cc: pbonzini, thuth, richard.henderson, mst
commit
f862ddbb1a4 (hw/i386: Remove the deprecated pc-1.x machine types)
removed the last user of broken APIC ID compat knob,
but compat_apic_id_mode itself was forgotten.
Clean it up and simplify x86_cpu_apic_id_from_index()
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
---
include/hw/i386/x86.h | 2 --
hw/i386/x86.c | 16 +---------------
2 files changed, 1 insertion(+), 17 deletions(-)
diff --git a/include/hw/i386/x86.h b/include/hw/i386/x86.h
index a145a30370..916cc325ee 100644
--- a/include/hw/i386/x86.h
+++ b/include/hw/i386/x86.h
@@ -35,8 +35,6 @@ struct X86MachineClass {
/* TSC rate migration: */
bool save_tsc_khz;
- /* Enables contiguous-apic-ID mode */
- bool compat_apic_id_mode;
/* use DMA capable linuxboot option rom */
bool fwcfg_dma_enabled;
};
diff --git a/hw/i386/x86.c b/hw/i386/x86.c
index b84840a1bb..4cf107baea 100644
--- a/hw/i386/x86.c
+++ b/hw/i386/x86.c
@@ -83,24 +83,11 @@ inline void init_topo_info(X86CPUTopoInfo *topo_info,
uint32_t x86_cpu_apic_id_from_index(X86MachineState *x86ms,
unsigned int cpu_index)
{
- X86MachineClass *x86mc = X86_MACHINE_GET_CLASS(x86ms);
X86CPUTopoInfo topo_info;
- uint32_t correct_id;
- static bool warned;
init_topo_info(&topo_info, x86ms);
- correct_id = x86_apicid_from_cpu_idx(&topo_info, cpu_index);
- if (x86mc->compat_apic_id_mode) {
- if (cpu_index != correct_id && !warned && !qtest_enabled()) {
- error_report("APIC IDs set in compatibility mode, "
- "CPU topology won't match the configuration");
- warned = true;
- }
- return cpu_index;
- } else {
- return correct_id;
- }
+ return x86_apicid_from_cpu_idx(&topo_info, cpu_index);
}
@@ -1330,7 +1317,6 @@ static void x86_machine_class_init(ObjectClass *oc, void *data)
mc->cpu_index_to_instance_props = x86_cpu_index_to_props;
mc->get_default_cpu_node_id = x86_get_default_cpu_node_id;
mc->possible_cpu_arch_ids = x86_possible_cpu_arch_ids;
- x86mc->compat_apic_id_mode = false;
x86mc->save_tsc_khz = true;
x86mc->fwcfg_dma_enabled = true;
nc->nmi_monitor_handler = x86_nmi;
--
2.31.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] x86: cleanup unused compat_apic_id_mode
2022-02-28 13:16 [PATCH] x86: cleanup unused compat_apic_id_mode Igor Mammedov
@ 2022-02-28 13:36 ` Philippe Mathieu-Daudé
2022-02-28 13:39 ` Thomas Huth
1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-02-28 13:36 UTC (permalink / raw)
To: Igor Mammedov, qemu-devel; +Cc: pbonzini, thuth, richard.henderson, mst
On 28/2/22 14:16, Igor Mammedov wrote:
> commit
> f862ddbb1a4 (hw/i386: Remove the deprecated pc-1.x machine types)
> removed the last user of broken APIC ID compat knob,
> but compat_apic_id_mode itself was forgotten.
> Clean it up and simplify x86_cpu_apic_id_from_index()
>
> Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> ---
> include/hw/i386/x86.h | 2 --
> hw/i386/x86.c | 16 +---------------
> 2 files changed, 1 insertion(+), 17 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] x86: cleanup unused compat_apic_id_mode
2022-02-28 13:16 [PATCH] x86: cleanup unused compat_apic_id_mode Igor Mammedov
2022-02-28 13:36 ` Philippe Mathieu-Daudé
@ 2022-02-28 13:39 ` Thomas Huth
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Huth @ 2022-02-28 13:39 UTC (permalink / raw)
To: Igor Mammedov, qemu-devel; +Cc: pbonzini, richard.henderson, mst
On 28/02/2022 14.16, Igor Mammedov wrote:
> commit
> f862ddbb1a4 (hw/i386: Remove the deprecated pc-1.x machine types)
> removed the last user of broken APIC ID compat knob,
> but compat_apic_id_mode itself was forgotten.
> Clean it up and simplify x86_cpu_apic_id_from_index()
>
> Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> ---
> include/hw/i386/x86.h | 2 --
> hw/i386/x86.c | 16 +---------------
> 2 files changed, 1 insertion(+), 17 deletions(-)
Sorry that I missed this!
Reviewed-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-02-28 13:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-28 13:16 [PATCH] x86: cleanup unused compat_apic_id_mode Igor Mammedov
2022-02-28 13:36 ` Philippe Mathieu-Daudé
2022-02-28 13:39 ` Thomas Huth
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).