From: "Denis V. Lunev" <den@openvz.org>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
qemu-devel@nongnu.org, "Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [PATCH 1/1] apic_common: improve readability of apic_reset_common
Date: Tue, 28 Apr 2015 08:38:14 +0300 [thread overview]
Message-ID: <553F1CC6.3080305@openvz.org> (raw)
In-Reply-To: <1428414832-3104-1-git-send-email-den@openvz.org>
On 07/04/15 16:53, Denis V. Lunev wrote:
> 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>
> ---
> 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 042e960..7a0c7e2 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);
ping
next prev parent reply other threads:[~2015-04-28 5:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-07 13:53 [Qemu-devel] [PATCH 1/1] apic_common: improve readability of apic_reset_common Denis V. Lunev
2015-04-07 14:00 ` Paolo Bonzini
2015-04-28 5:38 ` Denis V. Lunev [this message]
2015-04-28 9:49 ` Paolo Bonzini
2015-04-28 12:03 ` Andreas Färber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=553F1CC6.3080305@openvz.org \
--to=den@openvz.org \
--cc=afaerber@suse.de \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.