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] [semi-urgent Xen CS question] Re: git commit 9fd67b4ed0714ab

To: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Subject: [Xen-devel] [semi-urgent Xen CS question] Re: git commit 9fd67b4ed0714ab718f1f9bd14c344af336a6df7 (x86-64: Give vvars their own page) breaks Xen PV guests (64-bit).
From: Andrew Lutomirski <luto@xxxxxxx>
Date: Tue, 26 Jul 2011 15:08:28 -0400
Cc: Jeremy Fitzhardinge <jeremy@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 26 Jul 2011 12:09:20 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=K+ZcK+syp2sttvMpZ3UAKK6fCZy8OnrJ8BJ3QriTplk=; b=wimenhpFUFlkOUI9LCYcySiVjEExFhD70gIRZNMx5nfgwHpslVvM+PPNWiOxk1iC0P qqnySfPFaV/KRmXg8y+tdHCifcsCcn5Ww53V2RJxGiXgVJX2hpU8bG8WMSAKpyW2pXvd F4kC5B/GG09s1/+Zn+Pm/4auUDv6CgLxCNh9I=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20110726153220.GA15110@xxxxxxxxxxxx>
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>
References: <20110725155442.GA21759@xxxxxxxxxxxx> <CAObL_7GpX=f3+tXA4ga6cBB_9VWBe6yVFvon=TzECQs5kcb-ag@xxxxxxxxxxxxxx> <20110726153220.GA15110@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Tue, Jul 26, 2011 at 11:32 AM, Konrad Rzeszutek Wilk
<konrad.wilk@xxxxxxxxxx> wrote:
> On Mon, Jul 25, 2011 at 09:50:30PM -0400, Andrew Lutomirski wrote:
>> After staring at the Xen assembly code with vague comprehension, I
>> think I can sort of understand what's going on.
>
> Ok.
>>
>> Can you run this little program on a working kernel and tell me what
>> it says (built as 64-bit and as 32-bit (with -m32)):
>
> 32-bit:
> [konrad@f13-x86-build ~]$ ./check
> cs = 73
> [konrad@f13-x86-build ~]$ uname -a
> Linux f13-x86-build.dumpdata.com 3.0.0 #1 SMP PREEMPT Tue Jul 26 09:56:38 EDT 
> 2011 i686 i686 i386 GNU/Linux
>
>
> 64-bit:
>
> [konrad@f13-amd64-build ~]$ ./check
> cs = e033

My best guess is that each task starts out with standard __USER_CS,
but the code in write_stack_trampoline (in the hypervisor) tells the
kernel that CS is 0xe033 and then the next return to userspace makes
it true.

I'll hack up a patch to avoid the crash.  I'll feel better about it if
you or any of the Xen gurus can confirm that explanation.  If I'm
right, I need to check for both __USER_CS and FLAT_RING3_CS.

--Andy

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

<Prev in Thread] Current Thread [Next in Thread>