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:10:07 +0200
Delivery-date: Wed, 15 Jun 2011 09:11:24 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=fcEjayRBEp2bPfoMgKiKVgFDmvbOzV3PM2HdetMF/Kc=; b=faszzV4E+qzbj0FMPJMK+mYR2T1txKgc1BV56aNoxbjcbxzWRV9Byzd8Tewa95Jzaw HjJu+8mqr7CoMbOUZ7N/fMrdBqowR8r7xS6VhM15eJSg9GBCOej7anzMwaosPEgr5YOk CdvPamiH+HrayijaIxFUAyx9k+DjHkJ+ngRXI=
Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=Wop90wR+Do4jj9JT77tmz90pHFevAIZhY8eee1vYQK2SxT8zVUcR3+Ytjzu1WEBVdq 2GobP8xVMkSOrCH/QP0bJgYG3A87tagkNYmok2iE1wHDl6HecuaAufdK+dOBPYyEIR4v av3goymfl60k0uGkh5yQ+19dAHK/4Gvm1jrgQ=
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

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>