qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [Bug 529008] Re: Should emulate /proc/cpuinfo


From: DaveHansen
Subject: [Qemu-devel] [Bug 529008] Re: Should emulate /proc/cpuinfo
Date: Wed, 02 Jun 2010 16:27:50 -0000

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:

address@hidden:~# egrep cache.size\|^processor /proc/cpuinfo 
processor       : 0
cache size      : 4096 KB
processor       : 1
cache size      : 4096 KB
address@hidden:~# cat /proc/cpuinfo | perl -pe 's/4096 KB/8192 KB/g' > 
cpuinfo.lie
address@hidden:~# mount --bind cpuinfo.lie /proc/cpuinfo 
address@hidden:~# 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 “qemu-kvm” package in Ubuntu: Confirmed

Bug description:
Binary package hint: qemu-kvm

qemu should emulate /proc/cpuinfo contents as some apps parse it to find out 
which CPU they are running on.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]