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

[Xen-devel] current not very current (vs curr_vcpu)

To: "Xen-devel@xxxxxxxxxxxxxxxxxxx" <Xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] current not very current (vs curr_vcpu)
From: Mukesh Rathor <mukesh.rathor@xxxxxxxxxx>
Date: Thu, 18 Feb 2010 20:21:58 -0800
Cc:
Delivery-date: Thu, 18 Feb 2010 20:22:43 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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
Hi,

This on xen 4.0. 

I noticed while debugging something that current is not pointing to the
current vcpu upon serial interrupt. The regs->SP clearly shows 64bit dom0
stack, guest_mode(regs) returns 1, but current is pointing
to idle vcpu. I'm not able to figure how this is possible. I can come up
with scenario where dom0.vcpu yields cpu to idle vcpu in which case 
curr_vcpu will point to dom0.vcpu and current to idle vcpu. But in that
case guest_mode(regs) will be false, and regs.SP will show hyp stack.
Correct?

Am I correct that if guest_mode() then current should always point to 
guest vcpu? If yes, then I will debug this further.

Here's what I see in ns16550_interrupt: 
      regs.SP: ffffffff8041bf50  (my 64bit dom0 stack)
      regs.IP: ffffffff800053aa (dom0 return from hypercall)
      regs: ffff82c48030ff28 (hyp cpu 0 stack)
      SP in ns16550_interrupt(): ffff82c48030fd50 (hyp stack again)
      guest_mode == 1
      current == idle domain ??????

thanks in advance,
Mukesh


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel