* [Qemu-devel] [Bug 529008] Re: Should emulate /proc/cpuinfo
[not found] <20100227142202.21488.20001.malonedeb@soybean.canonical.com>
@ 2010-06-02 16:27 ` DaveHansen
2010-06-02 19:19 ` Anthony Liguori
1 sibling, 0 replies; 2+ messages in thread
From: DaveHansen @ 2010-06-02 16:27 UTC (permalink / raw)
To: qemu-devel
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 “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.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Qemu-devel] [Bug 529008] Re: Should emulate /proc/cpuinfo
[not found] <20100227142202.21488.20001.malonedeb@soybean.canonical.com>
2010-06-02 16:27 ` [Qemu-devel] [Bug 529008] Re: Should emulate /proc/cpuinfo DaveHansen
@ 2010-06-02 19:19 ` Anthony Liguori
1 sibling, 0 replies; 2+ messages in thread
From: Anthony Liguori @ 2010-06-02 19:19 UTC (permalink / raw)
To: qemu-devel
I think the preferred way to do this is just to create a /proc/cpuinfo
file within the root file system. It's impossible for qemu to know
which file is /proc/cpuinfo because you can technically mount procfs
anywhere.
** Changed in: qemu
Status: New => Invalid
--
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: Invalid
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-06-02 19:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20100227142202.21488.20001.malonedeb@soybean.canonical.com>
2010-06-02 16:27 ` [Qemu-devel] [Bug 529008] Re: Should emulate /proc/cpuinfo DaveHansen
2010-06-02 19:19 ` Anthony Liguori
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).