Olaf Hering
c75061c9b8
- Update to v2.6.0-rc0: See http://wiki.qemu-project.org/ChangeLog/2.6 * Patch queue updated from git://github.com/openSUSE/qemu.git opensuse-2.6 * Accept every size in DISCARD request from a guest (bsc#964427) 0039-block-split-large-discard-requests-.patch * Recognize libxl flag to disable flush in block device (bsc#879425) 0040-xen_disk-Add-suse-specific-flush-di.patch * Use correct flag for crypto tests 0041-tests-Use-correct-config-param-for-.patch * Fix build on powerpc: 0042-build-link-with-libatomic-on-powerp.patch * Patches dropped (upstreamed): seabios_checkrom_typo.patch seabios_avoid_smbios_signature_string.patch OBS-URL: https://build.opensuse.org/request/show/383004 OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=289
62 lines
2.0 KiB
Diff
62 lines
2.0 KiB
Diff
From 5f725ce31e36fe7fdef6cfb2b10418513225acbb Mon Sep 17 00:00:00 2001
|
|
From: Alexander Graf <agraf@suse.de>
|
|
Date: Mon, 23 Jul 2012 10:24:14 +0200
|
|
Subject: [PATCH] linux-user: Fake /proc/cpuinfo
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Fedora 17 for ARM reads /proc/cpuinfo and fails if it doesn't contain
|
|
ARM related contents. This patch implements a quick hack to expose real
|
|
/proc/cpuinfo data taken from a real world machine.
|
|
|
|
The real fix would be to generate at least the flags automatically based
|
|
on the selected CPU. Please do not submit this patch upstream until this
|
|
has happened.
|
|
|
|
Signed-off-by: Alexander Graf <agraf@suse.de>
|
|
[AF: Rebased for v1.6 and v1.7]
|
|
Signed-off-by: Andreas Färber <afaerber@suse.de>
|
|
---
|
|
linux-user/syscall.c | 20 ++++++++++++++++++++
|
|
1 file changed, 20 insertions(+)
|
|
|
|
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
|
|
index 780f760..7350980 100644
|
|
--- a/linux-user/syscall.c
|
|
+++ b/linux-user/syscall.c
|
|
@@ -5697,6 +5697,25 @@ static int open_self_stat(void *cpu_env, int fd)
|
|
return 0;
|
|
}
|
|
|
|
+static int open_cpuinfo(void *cpu_env, int fd)
|
|
+{
|
|
+ dprintf(fd,
|
|
+"Processor : ARMv7 Processor rev 5 (v7l)\n"
|
|
+"BogoMIPS : 799.53\n"
|
|
+"Features : swp half thumb fastmult vfp edsp thumbee neon vfpv3\n"
|
|
+"CPU implementer : 0x41\n"
|
|
+"CPU architecture: 7\n"
|
|
+"CPU variant : 0x2\n"
|
|
+"CPU part : 0xc08\n"
|
|
+"CPU revision : 5\n"
|
|
+"\n"
|
|
+"Hardware : Genesi Efika MX (Smarttop)\n"
|
|
+"Revision : 51030\n"
|
|
+"Serial : 0000000000000000\n");
|
|
+
|
|
+ return 0;
|
|
+}
|
|
+
|
|
static int open_self_auxv(void *cpu_env, int fd)
|
|
{
|
|
CPUState *cpu = ENV_GET_CPU((CPUArchState *)cpu_env);
|
|
@@ -5811,6 +5830,7 @@ static int do_openat(void *cpu_env, int dirfd, const char *pathname, int flags,
|
|
#if defined(HOST_WORDS_BIGENDIAN) != defined(TARGET_WORDS_BIGENDIAN)
|
|
{ "/proc/net/route", open_net_route, is_proc },
|
|
#endif
|
|
+ { "cpuinfo", open_cpuinfo, is_proc_myself },
|
|
{ NULL, NULL, NULL }
|
|
};
|
|
|