aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2015-04-07 16:53:52 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2015-04-30 16:55:16 +0200
commit813297541196698f60525d611dd09007fa60b45b (patch)
treeed9272a8cff7fc628721c351e77e605613e518f1
parent03a96b83b539498510e22aab585e41015ba18247 (diff)
apic_common: improve readability of apic_reset_common
Replace call of cpu_is_bsp(s->cpu) which really returns !!(s->apicbase & MSR_IA32_APICBASE_BSP) with directly collected value. Due to this the tracepoint trace_cpu_get_apic_base((uint64_t)s->apicbase); will not be hit anymore in apic_reset_common. Signed-off-by: Denis V. Lunev <den@openvz.org> CC: Andreas Färber <afaerber@suse.de> CC: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <1428414832-3104-1-git-send-email-den@openvz.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--hw/intc/apic_common.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/hw/intc/apic_common.c b/hw/intc/apic_common.c
index d38d24b814..d595d63a51 100644
--- a/hw/intc/apic_common.c
+++ b/hw/intc/apic_common.c
@@ -233,11 +233,10 @@ static void apic_reset_common(DeviceState *dev)
{
APICCommonState *s = APIC_COMMON(dev);
APICCommonClass *info = APIC_COMMON_GET_CLASS(s);
- bool bsp;
+ uint32_t bsp;
- bsp = cpu_is_bsp(s->cpu);
- s->apicbase = APIC_DEFAULT_ADDRESS |
- (bsp ? MSR_IA32_APICBASE_BSP : 0) | MSR_IA32_APICBASE_ENABLE;
+ bsp = s->apicbase & MSR_IA32_APICBASE_BSP;
+ s->apicbase = APIC_DEFAULT_ADDRESS | bsp | MSR_IA32_APICBASE_ENABLE;
s->vapic_paddr = 0;
info->vapic_base_update(s);