Hello community,

here is the log from the commit of package qemu for openSUSE:Factory
checked in at Thu Sep 29 12:53:21 CEST 2011.



--------
--- openSUSE:Factory/qemu/qemu.changes  2011-09-27 16:07:04.000000000 +0200
+++ /mounts/work_src_done/STABLE/qemu/qemu.changes      2011-09-27 
12:10:29.000000000 +0200
@@ -1,0 +2,6 @@
+Tue Sep 27 09:57:34 UTC 2011 - [email protected]
+
+- add 0020-linux-user-implement-reboot-syscall.patch from alex
+- extend 0010 mmap patch for files
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


New:
----
  0020-linux-user-implement-reboot-syscall.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ qemu.spec ++++++
--- /var/tmp/diff_new_pack.7zEheU/_old  2011-09-29 12:53:17.000000000 +0200
+++ /var/tmp/diff_new_pack.7zEheU/_new  2011-09-29 12:53:17.000000000 +0200
@@ -44,6 +44,7 @@
 Patch17:        0017-S-390-build-fix.patch
 Patch18:        0018-qemu-0.14.1-mcast-udp.patch
 Patch19:        0019-linux-user-fix-openat.patch
+Patch20:        0020-linux-user-implement-reboot-syscall.patch
 # this is to make lint happy
 Source300:      rpmlintrc
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
@@ -106,6 +107,7 @@
 %patch16 -p1
 %patch18 -p1
 %patch19 -p1
+%patch20 -p1
 
 %build
 # build QEMU

++++++ 0010-qemu-cvs-mmap-amd64.patch ++++++
--- /var/tmp/diff_new_pack.7zEheU/_old  2011-09-29 12:53:17.000000000 +0200
+++ /var/tmp/diff_new_pack.7zEheU/_new  2011-09-29 12:53:17.000000000 +0200
@@ -1,33 +1,21 @@
-From 2013ec7c2d1b5a71d73701da746363b69d4c992c Mon Sep 17 00:00:00 2001
-From: Ulrich Hecht <[email protected]>
-Date: Tue, 14 Apr 2009 16:34:05 +0200
-Subject: [PATCH 10/17] qemu-cvs-mmap-amd64
-
-Map stuff to address space < 4GB on AMD64. This patch got continually smaller
-as most cases were this was an issue were dealt with in other ways. May
-already be fully obsolete.
+From: Alexander Graf <[email protected]>
 
-Signed-off-by: Ulrich Hecht <[email protected]>
+When executing 32-bit guest binaries on 64-bit hosts, mmap() can return
+a 64-bit pointer. Tell mmap() to always map in 32-bit address space, so
+we make 32-bit guest applications happy.
+
+This is a hack and should not go upstream in its current form!
+
+Signed-off-by: Alexander Graf <[email protected]>
 ---
- linux-user/mmap.c |    6 +++++-
- 1 files changed, 5 insertions(+), 1 deletions(-)
+ linux-user/mmap.c |   12 ++++++------
+ 1 files changed, 6 insertions(+), 6 deletions(-)
 
 diff --git a/linux-user/mmap.c b/linux-user/mmap.c
-index e18c228..de8abe9 100644
+index 994c02b..e24b63a 100644
 --- a/linux-user/mmap.c
 +++ b/linux-user/mmap.c
-@@ -31,6 +31,10 @@
- #include "qemu.h"
- #include "qemu-common.h"
- 
-+#if !defined(MAP_32BIT)
-+#define MAP_32BIT 0
-+#endif
-+
- //#define DEBUG_MMAP
- 
- #if defined(CONFIG_USE_NPTL)
-@@ -169,7 +173,7 @@ static int mmap_frag(abi_ulong real_start,
+@@ -169,7 +169,7 @@ static int mmap_frag(abi_ulong real_start,
      if (prot1 == 0) {
          /* no page was there, so we allocate one */
          void *p = mmap(host_start, qemu_host_page_size, prot,
@@ -36,6 +24,51 @@
          if (p == MAP_FAILED)
              return -1;
          prot1 = prot;
+@@ -292,7 +292,7 @@ abi_ulong mmap_find_vma(abi_ulong start, abi_ulong size)
+          *  - shmat() with SHM_REMAP flag
+          */
+         ptr = mmap(g2h(addr), size, PROT_NONE,
+-                   MAP_ANONYMOUS|MAP_PRIVATE|MAP_NORESERVE, -1, 0);
++                   MAP_ANONYMOUS|MAP_PRIVATE|MAP_NORESERVE|MAP_32BIT, -1, 0);
+ 
+         /* ENOMEM, if host address space has no memory */
+         if (ptr == MAP_FAILED) {
+@@ -454,14 +454,14 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, int 
prot,
+            especially important if qemu_host_page_size >
+            qemu_real_host_page_size */
+         p = mmap(g2h(mmap_start),
+-                 host_len, prot, flags | MAP_FIXED | MAP_ANONYMOUS, -1, 0);
++                 host_len, prot, flags | MAP_FIXED | MAP_ANONYMOUS | 
MAP_32BIT, -1, 0);
+         if (p == MAP_FAILED)
+             goto fail;
+         /* update start so that it points to the file position at 'offset' */
+         host_start = (unsigned long)p;
+         if (!(flags & MAP_ANONYMOUS)) {
+             p = mmap(g2h(mmap_start), len, prot, 
+-                     flags | MAP_FIXED, fd, host_offset);
++                     flags | MAP_FIXED | MAP_32BIT, fd, host_offset);
+             host_start += offset - host_offset;
+         }
+         start = h2g(host_start);
+@@ -547,7 +547,7 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, int 
prot,
+             else
+                 offset1 = offset + real_start - start;
+             p = mmap(g2h(real_start), real_end - real_start,
+-                     prot, flags, fd, offset1);
++                     prot, flags | MAP_32BIT, fd, offset1);
+             if (p == MAP_FAILED)
+                 goto fail;
+         }
+@@ -603,7 +603,7 @@ static void mmap_reserve(abi_ulong start, abi_ulong size)
+     }
+     if (real_start != real_end) {
+         mmap(g2h(real_start), real_end - real_start, PROT_NONE,
+-                 MAP_FIXED | MAP_ANONYMOUS | MAP_PRIVATE | MAP_NORESERVE,
++                 MAP_FIXED | MAP_ANONYMOUS | MAP_PRIVATE | MAP_NORESERVE | 
MAP_32BIT,
+                  -1, 0);
+     }
+ }
 -- 
-1.7.1
+1.6.0.2
+
 

++++++ 0020-linux-user-implement-reboot-syscall.patch ++++++
From: Alexander Graf <[email protected]>

For OBS, we're running a full cross-guest inside of a VM. When a build
is done there, we reboot the guest as shutdown mechanism.

Unfortunately, reboot is not implemented in linux-user. So this mechanism
fails, spilling unpretty warnings. This patch implements sys_reboot()
emulation.

Signed-off-by: Alexander Graf <[email protected]>
---
 linux-user/syscall.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

Index: qemu-0.14.1/linux-user/syscall.c
===================================================================
--- qemu-0.14.1.orig/linux-user/syscall.c
+++ qemu-0.14.1/linux-user/syscall.c
@@ -239,6 +239,8 @@ _syscall6(int,sys_futex,int *,uaddr,int,
           const struct timespec *,timeout,int *,uaddr2,int,val3)
 #endif
 #endif
+_syscall4(int, reboot, int, magic1, int, magic2, unsigned int, cmd,
+          void *, arg);
 
 static bitmask_transtbl fcntl_flags_tbl[] = {
   { TARGET_O_ACCMODE,   TARGET_O_WRONLY,    O_ACCMODE,   O_WRONLY,    },
@@ -5536,7 +5538,11 @@ abi_long do_syscall(void *cpu_env, int n
         break;
 #endif
     case TARGET_NR_reboot:
-        goto unimplemented;
+        if (!(p = lock_user_string(arg4)))
+            goto efault;
+        ret = reboot(arg1, arg2, arg3, p);
+        unlock_user(p, arg4, 0);
+        break;
 #ifdef TARGET_NR_readdir
     case TARGET_NR_readdir:
         goto unimplemented;

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to