From: "Andreas Färber" <afaerber@suse.de>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: Gu Zheng <guz.fnst@cn.fujitsu.com>,
Igor Mammedov <imammedo@redhat.com>,
qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v4 4/5] target-i386: Move APIC ID compatibility code to pc.c
Date: Thu, 05 Mar 2015 16:47:53 +0100 [thread overview]
Message-ID: <54F87AA9.5030004@suse.de> (raw)
In-Reply-To: <20150305133726.GU3513@thinpad.lan.raisama.net>
Am 05.03.2015 um 14:37 schrieb Eduardo Habkost:
> On Thu, Mar 05, 2015 at 01:32:02AM +0100, Andreas Färber wrote:
>> Am 04.03.2015 um 03:13 schrieb Eduardo Habkost:
>>> The APIC ID compatibility code is required only for PC, and now that
>>> x86_cpu_initfn() doesn't use x86_cpu_apic_id_from_index() anymore, that
>>> code can be moved to pc.c.
>>>
>>> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
>>> Reviewed-by: Andreas Färber <afaerber@suse.de>
>>> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
>>> ---
>>> hw/i386/pc.c | 35 +++++++++++++++++++++++++++++++++++
>>> target-i386/cpu.c | 34 ----------------------------------
>>> 2 files changed, 35 insertions(+), 34 deletions(-)
>>>
>>> diff --git a/hw/i386/pc.c b/hw/i386/pc.c
>>> index b229856..8c3c470 100644
>>> --- a/hw/i386/pc.c
>>> +++ b/hw/i386/pc.c
[...]
>>> @@ -629,6 +631,39 @@ bool e820_get_entry(int idx, uint32_t type, uint64_t *address, uint64_t *length)
>>> return false;
>>> }
>>>
>>> +/* Enables contiguous-apic-ID mode, for compatibility */
>>> +static bool compat_apic_id_mode;
>>> +
>>> +void enable_compat_apic_id_mode(void)
>>> +{
>>> + compat_apic_id_mode = true;
>>> +}
>>> +
>>> +/* Calculates initial APIC ID for a specific CPU index
>>> + *
>>> + * Currently we need to be able to calculate the APIC ID from the CPU index
>>> + * alone (without requiring a CPU object), as the QEMU<->Seabios interfaces have
>>> + * no concept of "CPU index", and the NUMA tables on fw_cfg need the APIC ID of
>>> + * all CPUs up to max_cpus.
>>> + */
>>> +uint32_t x86_cpu_apic_id_from_index(unsigned int cpu_index)
>>
>> Looking a bit closer here, as I am poking around its call site for the
>> socket modeling, can't this be made static while at it? (If so, don't
>> forget to drop the prototype.)
>
> Yes, I'll make it static. I assume it's OK to do it before committing
> instead of resending the series because of that?
For me, sure. If you want to go safe or be verbose, you can post the
diff as a reply when you apply.
Cheers,
Andreas
--
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Jennifer Guild, Dilip Upmanyu,
Graham Norton; HRB 21284 (AG Nürnberg)
next prev parent reply other threads:[~2015-03-05 15:48 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-04 2:13 [Qemu-devel] [PATCH v4 0/5] target-i386: Simplify APIC ID initialization, move compat code to pc.c Eduardo Habkost
2015-03-04 2:13 ` [Qemu-devel] [PATCH v4 1/5] target-i386: Move topology.h to include/hw/i386 Eduardo Habkost
2015-03-04 2:13 ` [Qemu-devel] [PATCH v4 2/5] target-i386: Remove unused APIC ID default code Eduardo Habkost
2015-03-05 13:43 ` Eduardo Habkost
2015-03-05 13:46 ` Paolo Bonzini
2015-03-05 18:35 ` Andreas Färber
2015-03-05 18:46 ` Eduardo Habkost
2015-03-06 20:27 ` Eduardo Habkost
2015-03-04 2:13 ` [Qemu-devel] [PATCH v4 3/5] target-i386: Move CPUX86State.cpuid_apic_id to X86CPU.apic_id Eduardo Habkost
2015-03-04 14:20 ` Andreas Färber
2015-03-04 15:02 ` Eduardo Habkost
2015-03-04 2:13 ` [Qemu-devel] [PATCH v4 4/5] target-i386: Move APIC ID compatibility code to pc.c Eduardo Habkost
2015-03-05 0:32 ` Andreas Färber
2015-03-05 13:37 ` Eduardo Habkost
2015-03-05 15:47 ` Andreas Färber [this message]
2015-03-06 15:29 ` Eduardo Habkost
2015-03-04 2:13 ` [Qemu-devel] [PATCH v4 5/5] target-i386: Require APIC ID to be explicitly set before CPU realize Eduardo Habkost
2015-03-05 0:22 ` 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=54F87AA9.5030004@suse.de \
--to=afaerber@suse.de \
--cc=ehabkost@redhat.com \
--cc=guz.fnst@cn.fujitsu.com \
--cc=imammedo@redhat.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).