36ac86c950
Update to rc4 of v2.9.0. Also includes a few other fixes, and a number of tweaks to the spec files. I'd be happy to answer any questions about all those spec file changes, I believe they were all in the direction of a more correct and maintainable spec file. Since this is still in rc phase, let's keep it in devel project. Final release should appear in time for Beta2 of SLE12SP3. Delta from previous: Added Alex's patch for keyboard empty event. OBS-URL: https://build.opensuse.org/request/show/487699 OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=334
46 lines
1.5 KiB
Diff
46 lines
1.5 KiB
Diff
From d7bdbb6c509224e3d281789c8c70a30f6755cc82 Mon Sep 17 00:00:00 2001
|
|
From: Alexander Graf <agraf@suse.de>
|
|
Date: Tue, 14 Apr 2009 16:24:15 +0200
|
|
Subject: [PATCH] qemu-cvs-alsa_mmap
|
|
|
|
Hack to prevent ALSA from using mmap() interface to simplify emulation.
|
|
|
|
Signed-off-by: Alexander Graf <agraf@suse.de>
|
|
Signed-off-by: Ulrich Hecht <uli@suse.de>
|
|
---
|
|
linux-user/mmap.c | 14 ++++++++++++++
|
|
1 file changed, 14 insertions(+)
|
|
|
|
diff --git a/linux-user/mmap.c b/linux-user/mmap.c
|
|
index 4888f53139..a3fcea263f 100644
|
|
--- a/linux-user/mmap.c
|
|
+++ b/linux-user/mmap.c
|
|
@@ -357,6 +357,9 @@ abi_ulong mmap_find_vma(abi_ulong start, abi_ulong size)
|
|
}
|
|
}
|
|
|
|
+#define SNDRV_PCM_MMAP_OFFSET_STATUS 0x80000000
|
|
+#define SNDRV_PCM_MMAP_OFFSET_CONTROL 0x81000000
|
|
+
|
|
/* NOTE: all the constants are the HOST ones */
|
|
abi_long target_mmap(abi_ulong start, abi_ulong len, int prot,
|
|
int flags, int fd, abi_ulong offset)
|
|
@@ -391,6 +394,17 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, int prot,
|
|
}
|
|
#endif
|
|
|
|
+ /* Alsa tries to communcate with the kernel via mmap. This usually
|
|
+ * is a good idea when user- and kernelspace are running on the
|
|
+ * same architecture but does not work out when not. To make alsa
|
|
+ * not to use mmap, we can just have it fail on the mmap calls that
|
|
+ * would initiate this.
|
|
+ */
|
|
+ if(offset == SNDRV_PCM_MMAP_OFFSET_STATUS || offset == SNDRV_PCM_MMAP_OFFSET_CONTROL) {
|
|
+ errno = EINVAL;
|
|
+ return -1;
|
|
+ }
|
|
+
|
|
if (offset & ~TARGET_PAGE_MASK) {
|
|
errno = EINVAL;
|
|
goto fail;
|