From: Keir Fraser Subject: Re: [PATCH/RFC] Wrong account for cpus other than 0 on hotplug Date: Fri, 13 Oct 2006 22:56:59 +0100 Message-ID: References: <20061013211850.GA14367@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20061013211850.GA14367@redhat.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Glauber de Oliveira Costa Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 13/10/06 10:18 pm, "Glauber de Oliveira Costa" wrote: > I just found that the offending code is in the HV itself, and not in the > guest. In arch_do_vcpu_op(), we see that the information is only passed > up to the guest, if the check (current == v) holds, which seems to be > the > true source of it. (taking the check away makes it work). Makes sense. CPU0 sets up the area for the AP then immediately tries to read from the area which isn't initialised at that point (because of the check you point out). > I can see no reason for this check to be there. If there is one, we > could maybe make sure it holds. (maybe calling set_current(v) on HV > side?) Removing it will change the ABI. Assumption is that AP may have a different virt->phys translation for that virtual address. I'll look into fixing this before 3.0.3 goes out. I think it can be done with a fairly small patch. -- Keir > Your comments on this are , as usual, very welcome ;-)