Received: from [140.186.70.92] (port=60524 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OJqvO-0008QQ-8C for qemu-devel@nongnu.org; Wed, 02 Jun 2010 12:36:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OJqvI-0001bs-OI for qemu-devel@nongnu.org; Wed, 02 Jun 2010 12:36:14 -0400 Received: from adelie.canonical.com ([91.189.90.139]:43742) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OJqvI-0001bn-KL for qemu-devel@nongnu.org; Wed, 02 Jun 2010 12:36:08 -0400 Received: from loganberry.canonical.com ([91.189.90.37]) by adelie.canonical.com with esmtp (Exim 4.69 #1 (Debian)) id 1OJqvF-0005HR-MK for ; Wed, 02 Jun 2010 17:36:06 +0100 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 28B412E84B3 for ; Wed, 2 Jun 2010 17:35:48 +0100 (BST) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Wed, 02 Jun 2010 16:27:50 -0000 From: DaveHansen Sender: bounces@canonical.com References: <20100227142202.21488.20001.malonedeb@soybean.canonical.com> Message-Id: <20100602162750.14512.27266.malone@wampee.canonical.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 529008] Re: Should emulate /proc/cpuinfo Reply-To: Bug 529008 <529008@bugs.launchpad.net> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org If you're chroot'ing anyway, then you should have privileged access. You could probably do this entirely in userspace, without even specially intercepting the syscalls. When you set up the chroot, just get a copy of how you want cpuinfo to look, and bind mount it on top of the existing cpuinfo file: root@nimitz:~# egrep cache.size\|^processor /proc/cpuinfo = processor : 0 cache size : 4096 KB processor : 1 cache size : 4096 KB root@nimitz:~# cat /proc/cpuinfo | perl -pe 's/4096 KB/8192 KB/g' > cpuinfo= .lie root@nimitz:~# mount --bind cpuinfo.lie /proc/cpuinfo = root@nimitz:~# egrep cache.size\|^processor /proc/cpuinfo = processor : 0 cache size : 8192 KB processor : 1 cache size : 8192 KB Would that work? -- = Should emulate /proc/cpuinfo https://bugs.launchpad.net/bugs/529008 You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. Status in QEMU: New Status in =E2=80=9Cqemu-kvm=E2=80=9D package in Ubuntu: Confirmed Bug description: Binary package hint: qemu-kvm qemu should emulate /proc/cpuinfo contents as some apps parse it to find ou= t which CPU they are running on.