WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] Only include online cpus in cpu_mask_to_apicid_f

To: Jan Beulich <JBeulich@xxxxxxxxxx>, Sheng Yang <sheng.yang@xxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Only include online cpus in cpu_mask_to_apicid_flat
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Tue, 31 Aug 2010 11:46:28 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 31 Aug 2010 03:47:13 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4C7CDFA00200007800013124@xxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: ActI6krH3cDHxv1vTy+9R8ok5yARjwAD3kTO
Thread-topic: [Xen-devel] [PATCH] Only include online cpus in cpu_mask_to_apicid_flat
User-agent: Microsoft-Entourage/12.26.0.100708
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