|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] [PATCH] Only include online cpus in cpu_mask_to_apicid_f
On 31/08/2010 09:55, "Jan Beulich" <JBeulich@xxxxxxxxxx> wrote:
>> In fact, setup_ioapic_dest() would be called to reprogram the IOAPIC
>> redirection
>> table to follow "irq_cfg->cpu_mask", after SMP initialization work was
>> done. So I think the better choice is to keep the original value in irq_cfg-
>>> cpu_mask, and just make sure the value we wrote to the IOAPIC redirection
>> table
>> is valid. Then modifying cpu_mask_to_apicid_flat() seems like a better idea.
>
> Why would you need to modify only this function, but not the other
> variants? If a CPU in the passed in mask can be offline, then
> first_cpu() (as used in the other variants) can return an offline CPU,
> and you don't want to program such into an RTE.
Indeed, also all other assignments to irq_cfg->cpu_mask include only online
CPUs, so the current code is only being consistent in that respect. And in
the general case (even if not specifically for IRQ0) that is important
because IDT vectors are not allocated on offline CPUs, and so we could
otherwise end up with CPUs coming online and finding they are in multiple
irq_cfg's with the same vector! Also the PIT is usually disabled after boot
on Xen and so it being restricted to only CPU0 would really not matter. I
think we should leave the code as is.
-- Keir
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|