qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 04/19] pc: cpu: consolidate apic-id validity


From: Eduardo Habkost
Subject: Re: [Qemu-devel] [PATCH v3 04/19] pc: cpu: consolidate apic-id validity checks in pc_cpu_pre_plug()
Date: Tue, 12 Jul 2016 09:25:51 -0300
User-agent: Mutt/1.6.1 (2016-04-27)

On Tue, Jul 12, 2016 at 02:01:13PM +0200, Igor Mammedov wrote:
> On Mon, 11 Jul 2016 23:28:51 -0300
> Eduardo Habkost <address@hidden> wrote:
> 
> > On Wed, Jul 06, 2016 at 08:20:40AM +0200, Igor Mammedov wrote:
> > [...]
> > > +static void pc_cpu_pre_plug(HotplugHandler *hotplug_dev,
> > > +                            DeviceState *dev, Error **errp)
> > > +{
> > > +    int idx;
> > > +    X86CPU *cpu = X86_CPU(dev);
> > > +    PCMachineState *pcms = PC_MACHINE(hotplug_dev);
> > > +    CPUArchId *cpu_slot = pc_find_cpu_slot(pcms, CPU(dev), &idx);  
> > 
> > Why are you passing &idx to pc_find_cpu_slot() here, if you don't
> > use it for anything?
> > 
> 
> +static void pc_cpu_pre_plug(HotplugHandler *hotplug_dev,
> +                            DeviceState *dev, Error **errp)
> +{
> [...]
> +    if (cpu_slot->cpu) {
> +        error_setg(errp, "CPU[%ld] with APIC ID %" PRIu32 " exists",
> +                   cpu_slot - pcms->possible_cpus->cpus,
> it should have been used here, so I'll fix this place to use idx
> and along the way print APIC ID in hex

With this change:

Reviewed-by: Eduardo Habkost <address@hidden>

-- 
Eduardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]