diff options
author | Igor Mammedov <imammedo@redhat.com> | 2016-06-24 16:27:00 +0200 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2016-07-20 12:02:19 -0300 |
commit | 1dfe3282cf851dce186ab15b07225e5d8588b63f (patch) | |
tree | 1a96b53914b8f18c52d716866697d852481da4e5 /include/hw/i386/apic_internal.h | |
parent | 889211b18b8d0acc814fbbe01b986f07b229a8c9 (diff) |
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/hw/i386/apic_internal.h')
-rw-r--r-- | include/hw/i386/apic_internal.h | 1 |
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; |