[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 2/9] apic_common: improve readability of apic_reset_c
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 2/9] apic_common: improve readability of apic_reset_common |
Date: |
Fri, 8 May 2015 14:48:57 +0200 |
From: "Denis V. Lunev" <address@hidden>
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 <address@hidden>
CC: Andreas Färber <address@hidden>
CC: Paolo Bonzini <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
hw/intc/apic_common.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/hw/intc/apic_common.c b/hw/intc/apic_common.c
index d38d24b..d595d63 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);
--
2.3.5
- [Qemu-devel] [PULL v2 0/9] KVM, QOM, NBD, build fixes for 2015-05-08, Paolo Bonzini, 2015/05/08
- [Qemu-devel] [PULL 1/9] kvm: Silence warning from valgrind, Paolo Bonzini, 2015/05/08
- [Qemu-devel] [PULL 2/9] apic_common: improve readability of apic_reset_common,
Paolo Bonzini <=
- [Qemu-devel] [PULL 3/9] mtree: tag & indent a bit better, Paolo Bonzini, 2015/05/08
- [Qemu-devel] [PULL 4/9] mtree: also print disabled regions, Paolo Bonzini, 2015/05/08
- [Qemu-devel] [PULL 5/9] kvm: add support for memory transaction attributes, Paolo Bonzini, 2015/05/08
- [Qemu-devel] [PULL 6/9] exec: move rcu_read_lock/unlock to address_space_translate callers, Paolo Bonzini, 2015/05/08
- [Qemu-devel] [PULL 7/9] configure: require __thread support, Paolo Bonzini, 2015/05/08
- [Qemu-devel] [PULL 9/9] qemu-nbd: only send a limited number of errno codes on the wire, Paolo Bonzini, 2015/05/08
- Re: [Qemu-devel] [PULL v2 0/9] KVM, QOM, NBD, build fixes for 2015-05-08, Peter Maydell, 2015/05/11