summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2016-06-24 16:27:00 +0200
committerEduardo Habkost <ehabkost@redhat.com>2016-07-20 12:02:19 -0300
commit1dfe3282cf851dce186ab15b07225e5d8588b63f (patch)
tree1a96b53914b8f18c52d716866697d852481da4e5 /include
parent889211b18b8d0acc814fbbe01b986f07b229a8c9 (diff)
downloadqemu-1dfe3282cf851dce186ab15b07225e5d8588b63f.tar.gz
apic: Drop APICCommonState.idx and use APIC ID as index in local_apics[]
local_apics[] is sized to contain all APIC ID supported in xAPIC mode, so use APIC ID as index in it instead of constantly increasing counter idx. Fixes error "apic initialization failed" when a CPU hotplugged and unplugged more times than there are free slots in local_apics[]. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Radim Krčmář <rkrcmar@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/hw/i386/apic_internal.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/include/hw/i386/apic_internal.h b/include/hw/i386/apic_internal.h
index 67348e9571..8330592638 100644
--- a/include/hw/i386/apic_internal.h
+++ b/include/hw/i386/apic_internal.h
@@ -174,7 +174,6 @@ struct APICCommonState {
uint32_t initial_count;
int64_t initial_count_load_time;
int64_t next_time;
- int idx; /* not actually common, used only by 'apic' derived class */
QEMUTimer *timer;
int64_t timer_expiry;
int sipi_vector;