Message ID | 1425435224-2630-3-git-send-email-ehabkost@redhat.com |
---|---|
State | New |
Headers | show |
On Tue, Mar 03, 2015 at 11:13:41PM -0300, Eduardo Habkost wrote: > The existing apic_id = cpu_index code has no visible effect: the PC code > already initializes the APIC ID according to the topology on > pc_new_cpu(), and linux-user memcpy()s the CPU state (including > cpuid_apic_id) on cpu_copy(). > > Remove the dead code and simply let APIC ID to to be 0 by default. This > doesn't change behavior of PC because apic-id is already explicitly set, > and doesn't affect linux-user because APIC ID was already always 0. > > Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> This patch is holding the rest of the series, so a Reviewed-by or Acked-by would be welcome. This change removes the 254-CPU limit from {i386,x86_64}-linux-user that Peter and I discussed previously. > --- > target-i386/cpu.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/target-i386/cpu.c b/target-i386/cpu.c > index 8fc5727..05cac57 100644 > --- a/target-i386/cpu.c > +++ b/target-i386/cpu.c > @@ -2923,7 +2923,6 @@ static void x86_cpu_initfn(Object *obj) > NULL, NULL, (void *)cpu->filtered_features, NULL); > > cpu->hyperv_spinlock_attempts = HYPERV_SPINLOCK_NEVER_RETRY; > - env->cpuid_apic_id = x86_cpu_apic_id_from_index(cs->cpu_index); > > x86_cpu_load_def(cpu, xcc->cpu_def, &error_abort); > > -- > 2.1.0 > >
On 05/03/2015 14:43, Eduardo Habkost wrote: > On Tue, Mar 03, 2015 at 11:13:41PM -0300, Eduardo Habkost wrote: >> The existing apic_id = cpu_index code has no visible effect: the PC code >> already initializes the APIC ID according to the topology on >> pc_new_cpu(), and linux-user memcpy()s the CPU state (including >> cpuid_apic_id) on cpu_copy(). >> >> Remove the dead code and simply let APIC ID to to be 0 by default. This >> doesn't change behavior of PC because apic-id is already explicitly set, >> and doesn't affect linux-user because APIC ID was already always 0. >> >> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> > > This patch is holding the rest of the series, so a Reviewed-by or > Acked-by would be welcome. > > This change removes the 254-CPU limit from {i386,x86_64}-linux-user that > Peter and I discussed previously. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> > >> --- >> target-i386/cpu.c | 1 - >> 1 file changed, 1 deletion(-) >> >> diff --git a/target-i386/cpu.c b/target-i386/cpu.c >> index 8fc5727..05cac57 100644 >> --- a/target-i386/cpu.c >> +++ b/target-i386/cpu.c >> @@ -2923,7 +2923,6 @@ static void x86_cpu_initfn(Object *obj) >> NULL, NULL, (void *)cpu->filtered_features, NULL); >> >> cpu->hyperv_spinlock_attempts = HYPERV_SPINLOCK_NEVER_RETRY; >> - env->cpuid_apic_id = x86_cpu_apic_id_from_index(cs->cpu_index); >> >> x86_cpu_load_def(cpu, xcc->cpu_def, &error_abort); >> >> -- >> 2.1.0 >> >> >
Am 05.03.2015 um 14:43 schrieb Eduardo Habkost: > On Tue, Mar 03, 2015 at 11:13:41PM -0300, Eduardo Habkost wrote: >> The existing apic_id = cpu_index code has no visible effect: the PC code >> already initializes the APIC ID according to the topology on >> pc_new_cpu(), and linux-user memcpy()s the CPU state (including >> cpuid_apic_id) on cpu_copy(). >> >> Remove the dead code and simply let APIC ID to to be 0 by default. This >> doesn't change behavior of PC because apic-id is already explicitly set, >> and doesn't affect linux-user because APIC ID was already always 0. >> >> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> > > This patch is holding the rest of the series, so a Reviewed-by or > Acked-by would be welcome. > > This change removes the 254-CPU limit from {i386,x86_64}-linux-user that > Peter and I discussed previously. Reviewed-by: Andreas Färber <afaerber@suse.de> Are you going to send a new pull for the 2 plus these 5 now? Thanks, Andreas
On Thu, Mar 05, 2015 at 07:35:17PM +0100, Andreas Färber wrote: > Am 05.03.2015 um 14:43 schrieb Eduardo Habkost: > > On Tue, Mar 03, 2015 at 11:13:41PM -0300, Eduardo Habkost wrote: > >> The existing apic_id = cpu_index code has no visible effect: the PC code > >> already initializes the APIC ID according to the topology on > >> pc_new_cpu(), and linux-user memcpy()s the CPU state (including > >> cpuid_apic_id) on cpu_copy(). > >> > >> Remove the dead code and simply let APIC ID to to be 0 by default. This > >> doesn't change behavior of PC because apic-id is already explicitly set, > >> and doesn't affect linux-user because APIC ID was already always 0. > >> > >> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> > > > > This patch is holding the rest of the series, so a Reviewed-by or > > Acked-by would be welcome. > > > > This change removes the 254-CPU limit from {i386,x86_64}-linux-user that > > Peter and I discussed previously. > > Reviewed-by: Andreas Färber <afaerber@suse.de> > > Are you going to send a new pull for the 2 plus these 5 now? Yes. I plan to send a pull request tomorrow. (If we get reviews in time, the pull request may include the instance_init series as well)
On Thu, Mar 05, 2015 at 03:46:13PM -0300, Eduardo Habkost wrote: > On Thu, Mar 05, 2015 at 07:35:17PM +0100, Andreas Färber wrote: > > Am 05.03.2015 um 14:43 schrieb Eduardo Habkost: > > > On Tue, Mar 03, 2015 at 11:13:41PM -0300, Eduardo Habkost wrote: > > >> The existing apic_id = cpu_index code has no visible effect: the PC code > > >> already initializes the APIC ID according to the topology on > > >> pc_new_cpu(), and linux-user memcpy()s the CPU state (including > > >> cpuid_apic_id) on cpu_copy(). > > >> > > >> Remove the dead code and simply let APIC ID to to be 0 by default. This > > >> doesn't change behavior of PC because apic-id is already explicitly set, > > >> and doesn't affect linux-user because APIC ID was already always 0. > > >> > > >> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> > > > > > > This patch is holding the rest of the series, so a Reviewed-by or > > > Acked-by would be welcome. > > > > > > This change removes the 254-CPU limit from {i386,x86_64}-linux-user that > > > Peter and I discussed previously. > > > > Reviewed-by: Andreas Färber <afaerber@suse.de> > > > > Are you going to send a new pull for the 2 plus these 5 now? > > Yes. I plan to send a pull request tomorrow. > > (If we get reviews in time, the pull request may include the > instance_init series as well) I just learned from another thread that Peter will be back to work on March 10th, so I will submit the pull request on Monday.
diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 8fc5727..05cac57 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -2923,7 +2923,6 @@ static void x86_cpu_initfn(Object *obj) NULL, NULL, (void *)cpu->filtered_features, NULL); cpu->hyperv_spinlock_attempts = HYPERV_SPINLOCK_NEVER_RETRY; - env->cpuid_apic_id = x86_cpu_apic_id_from_index(cs->cpu_index); x86_cpu_load_def(cpu, xcc->cpu_def, &error_abort);
The existing apic_id = cpu_index code has no visible effect: the PC code already initializes the APIC ID according to the topology on pc_new_cpu(), and linux-user memcpy()s the CPU state (including cpuid_apic_id) on cpu_copy(). Remove the dead code and simply let APIC ID to to be 0 by default. This doesn't change behavior of PC because apic-id is already explicitly set, and doesn't affect linux-user because APIC ID was already always 0. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> --- target-i386/cpu.c | 1 - 1 file changed, 1 deletion(-)