Comments

On Tue, Jul 10, 2012 at 03:15:51PM +0200, Igor Mammedov wrote:
> /* pc.c */> -int cpu_is_bsp(CPUX86State *env);
Why remove it instead of modifying it to check BSP bit in apic base?
I think it will make the patch smaller and open code the check does not
look nice.
--
Gleb.

On 07/12/2012 08:38 AM, Gleb Natapov wrote:
> On Tue, Jul 10, 2012 at 03:15:51PM +0200, Igor Mammedov wrote:>> /* pc.c */>> -int cpu_is_bsp(CPUX86State *env);> Why remove it instead of modifying it to check BSP bit in apic base?> I think it will make the patch smaller and open code the check does not> look nice.
It's smaller than if I keep cpu_is_bsp() because keeping it would require
as minimum adapting Andreas' patch [1] and without cpu_is_bsp() there won't
be need in it as well.
plain check doesn't look horrible though. It's documented in patch
description and Intel's SDM also mentions APIC base and BSP bit in it. So
may be it's better to use it this way.
Anyway,
I've made a version that keeps cpu_is_bsp() with a bits from [1].
I'll send it as followup to this email, please see if that way is any better.
1) [PATCH qom-next 06/59] pc: Pass X86CPU to cpu_is_bsp()
http://lists.gnu.org/archive/html/qemu-devel/2012-05/msg03185.html