From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: current not very current (vs curr_vcpu) Date: Tue, 23 Feb 2010 21:03:04 +0000 Message-ID: References: <20100223114646.70e196ea@mantra.us.oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20100223114646.70e196ea@mantra.us.oracle.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: Mukesh Rathor Cc: "Xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On 23/02/2010 19:46, "Mukesh Rathor" wrote: > struct cpu_user_regs *regs = guest_cpu_user_regs(); <------ > > The cpu is clearly running idle_vcpu, so current is correctly pointing > to idle vcpu. But guest_mode() is showing guest mode incorrectly. > > I'm not much familiar with ns16550 stuff, so cant' think of a fix other > than just setting regs to current stack pointer in ns16550_poll(). > > __asm__ ( "movq %%rsp,%0" : "=r" (val)); > struct cpu_user_regs *regs = val; > > Let me know if you like the fix and I'll submit a patch. Given the only thing this apparently affected was some of your own ad-hoc debug code, do we really care about this at all? We can probably happily just leave it. -- Keir