Skip to content

Commit

Permalink
qemu-usermode: linux-user: disable commpage.
Browse files Browse the repository at this point in the history
[qemu-usermode] linux-user: disable commpage. JB#51953
It will break when we run i686 SailfishSDK on 64 bit kernels.
  • Loading branch information
krnlyng committed Dec 8, 2020
1 parent ff673ee commit cabcd95
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 106 deletions.
46 changes: 46 additions & 0 deletions rpm/0001-linux-user-disable-commpage.patch
@@ -0,0 +1,46 @@
From 456bf439bdaa2cefede8b09f224a660b8aee8353 Mon Sep 17 00:00:00 2001
From: Frajo Haider <f_haider@gmx.at>
Date: Tue, 8 Dec 2020 00:19:06 +0200
Subject: [PATCH 1/1] linux-user: disable commpage

---
linux-user/elfload.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index fe9dfe795d..d18dca677a 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -4,6 +4,9 @@

#include <sys/resource.h>
#include <sys/shm.h>
+#include <unistd.h>
+#include <sys/syscall.h>
+#include <sys/utsname.h>

#include "qemu.h"
#include "disas/disas.h"
@@ -383,8 +386,10 @@ enum {

/* The commpage only exists for 32 bit kernels */

-#define ARM_COMMPAGE (intptr_t)0xffff0f00u
+#define ARM_COMMPAGE 0
+#define init_guest_commpage() true

+#if 0
static bool init_guest_commpage(void)
{
void *want = g2h(ARM_COMMPAGE & -qemu_host_page_size);
@@ -408,6 +413,7 @@ static bool init_guest_commpage(void)
}
return true;
}
+#endif

#define ELF_HWCAP get_elf_hwcap()
#define ELF_HWCAP2 get_elf_hwcap2()
--
2.26.2

105 changes: 0 additions & 105 deletions rpm/0001-linux-user-don-t-fail-if-commpage-is-not-usable.patch

This file was deleted.

2 changes: 1 addition & 1 deletion rpm/qemu-usermode.spec
Expand Up @@ -32,7 +32,7 @@ Patch13: 0017-Revert-linux-user-Use-safe_syscall-wrapper-for-fcntl.patch
Patch14: 0018-linux-user-Support-f_flags-in-statfs64-when-availabl.patch

Patch19: 0001-Force-AVX2-off.patch
Patch20: 0001-linux-user-don-t-fail-if-commpage-is-not-usable.patch
Patch20: 0001-linux-user-disable-commpage.patch

BuildRequires: pkgconfig(ext2fs)
BuildRequires: pkgconfig(glib-2.0)
Expand Down

0 comments on commit cabcd95

Please sign in to comment.