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/
Home Products Support Community News


[Xen-devel] Need help with xen-detect patch

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Need help with xen-detect patch
From: Benjamin Schweikert <b.schweikert@xxxxxxxxxxxxxx>
Date: Wed, 15 Jun 2011 13:28:46 +0200
Delivery-date: Wed, 15 Jun 2011 09:12:40 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=LQMy7p7aR3lbsBfaLABIALfFHAQ5ksO3oGsX6NEt6N4=; b=Y5phe5ma6MkYk/CwuPPK4l4jGnEI6yR3Kz9CO2R4iqpYxfV8XNjLCAt9Gwf0zXofy9 qD4axw0il3GmOlaKdChEMuy8X6fEUKlHZ8DjbD4GT8E4OJSo/TPNi5BazrstwwhWMZX5 T5XTYkP5ZLet0ePS1X7G5QAfG0T+/GaQCFM8k=
Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=wAgY/DA1xyTjoaTfYWVmuyrmFDyzAuJLnrPxsyw9lGQlZjNp0nSajs5irH085xjo4N G4eBFxfIp7RDJsy3UY4g/0zadZcluJCNd8AXgn7KgSL6+ItpPEHu43Q0C9lYT7cvWTI2 vCm2e2HEXD2Oq3tBWQa4Ii0SvqPekirj8B+34=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <BANLkTimdBRDerXUo_S1=UyfpNJ2qo2cKVg@xxxxxxxxxxxxxx>
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: <BANLkTimdBRDerXUo_S1=UyfpNJ2qo2cKVg@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx

me and a friend of mine working on a patch with which xen-tools build with the CFLAGS pie/pic and stack-protection. We saw, that everything builds expect of xen-detect. We developed a patch with which xen-detect builds and we can execute the binary after that, but we dont get the right information, that for example we are running a PV fedora domain. Maybe someone, who is better in assembly than we are can give us some hints.

thanx and bye


xen-detect: Change assembly cpuinfo code that allows this to be built with

diff -r 4b0692880dfa tools/misc/xen-detect.c
--- a/tools/misc/xen-detect.c Thu May 05 17:40:34 2011 +0100
+++ b/tools/misc/xen-detect.c Fri May 06 17:14:46 2011 +0200
@@ -41,8 +41,20 @@
int pv_context)
asm volatile (
- "test %1,%1 ; jz 1f ; ud2a ; .ascii \"xen\" ; 1: cpuid"
- : "=a" (*eax), "=b" (*ebx), "=c" (*ecx), "=d" (*edx)
+ "test %1,%1 ; jz 1f ; ud2a ; .ascii \"xen\" ;"
+#if defined(__PIC__)&& defined(__i386__)
+ "1: pushl %%ebx;"
+ "cpuid;"
+ "movl %%ebx,%%esi;"
+ "popl %%ebx"
+ : "=S" (*ebx),
+ "1: cpuid"
+ : "=b" (*ebx),
+ "=a" (*eax),
+ "=c" (*ecx),
+ "=d" (*edx)
: "0" (idx), "1" (pv_context) );

Xen-devel mailing list
<Prev in Thread] Current Thread [Next in Thread>