SHA256
1
0
forked from pool/qemu

Accepting request 383004 from home:olh:qemu

- 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
This commit is contained in:
Olaf Hering 2016-04-05 13:18:15 +00:00 committed by Git OBS Bridge
parent e3ed4b4b7f
commit 7adb207e17
57 changed files with 575 additions and 405 deletions

View File

@ -1,4 +1,4 @@
From 8aa30747a59c1beab3e56a314e1963357baeb99f Mon Sep 17 00:00:00 2001
From 7261f498a3b0b99180d09faaf73dc3af06d18fbe Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Mon, 21 Nov 2011 23:50:36 +0100
Subject: [PATCH] XXX dont dump core on sigabort
@ -8,11 +8,11 @@ Subject: [PATCH] XXX dont dump core on sigabort
1 file changed, 6 insertions(+)
diff --git a/linux-user/signal.c b/linux-user/signal.c
index 9d62e02..1a8a332 100644
index 96e86c0..d422aeb 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -447,6 +447,10 @@ static void QEMU_NORETURN force_sig(int target_sig)
host_sig = target_to_host_signal(target_sig);
@@ -443,6 +443,10 @@ static void QEMU_NORETURN force_sig(int target_sig)
trace_user_force_sig(env, target_sig, host_sig);
gdb_signalled(env, target_sig);
+ if (target_sig == 6) {
@ -22,7 +22,7 @@ index 9d62e02..1a8a332 100644
/* dump core if supported by target binary format */
if (core_dump_signal(target_sig) && (ts->bprm->core_dump != NULL)) {
stop_all_tasks();
@@ -464,6 +468,8 @@ static void QEMU_NORETURN force_sig(int target_sig)
@@ -460,6 +464,8 @@ static void QEMU_NORETURN force_sig(int target_sig)
target_sig, strsignal(host_sig), "core dumped" );
}

View File

@ -1,4 +1,4 @@
From c3a774e193db19f48a4a471814360123150a3526 Mon Sep 17 00:00:00 2001
From fb897f92be5a2b144fe4f3f7f2ddb1386dd3a677 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Thu, 1 Dec 2011 19:00:01 +0100
Subject: [PATCH] XXX work around SA_RESTART race with boehm-gc (ARM only)
@ -13,10 +13,10 @@ Subject: [PATCH] XXX work around SA_RESTART race with boehm-gc (ARM only)
4 files changed, 130 insertions(+), 10 deletions(-)
diff --git a/linux-user/main.c b/linux-user/main.c
index 8acfe0f..6379e03 100644
index b432bf2..119331f 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -809,15 +809,22 @@ void cpu_loop(CPUARMState *env)
@@ -853,15 +853,22 @@ void cpu_loop(CPUARMState *env)
break;
}
} else {
@ -49,10 +49,10 @@ index 8acfe0f..6379e03 100644
} else {
goto error;
diff --git a/linux-user/qemu.h b/linux-user/qemu.h
index bd90cc3..ea9c98d 100644
index 26b0ba2..b55a9d2 100644
--- a/linux-user/qemu.h
+++ b/linux-user/qemu.h
@@ -133,6 +133,8 @@ typedef struct TaskState {
@@ -130,6 +130,8 @@ typedef struct TaskState {
struct sigqueue sigqueue_table[MAX_SIGQUEUE_SIZE]; /* siginfo queue */
struct sigqueue *first_free; /* first free siginfo queue entry */
int signal_pending; /* non zero if a signal may be pending */
@ -61,7 +61,7 @@ index bd90cc3..ea9c98d 100644
} __attribute__((aligned(16))) TaskState;
extern char *exec_path;
@@ -191,6 +193,7 @@ int get_osversion(void);
@@ -188,6 +190,7 @@ int get_osversion(void);
void init_qemu_uname_release(void);
void fork_start(void);
void fork_end(int child);
@ -70,18 +70,18 @@ index bd90cc3..ea9c98d 100644
/* Creates the initial guest address space in the host memory space using
* the given host start address hint and size. The guest_start parameter
diff --git a/linux-user/signal.c b/linux-user/signal.c
index 1a8a332..2c9b0da 100644
index d422aeb..eab88a9 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -24,6 +24,7 @@
#include <errno.h>
@@ -19,6 +19,7 @@
#include "qemu/osdep.h"
#include <sys/ucontext.h>
#include <sys/resource.h>
+#include <sched.h>
#include "qemu.h"
#include "qemu-common.h"
@@ -570,6 +571,11 @@ int queue_signal(CPUArchState *env, int sig, target_siginfo_t *info)
@@ -563,6 +564,11 @@ int queue_signal(CPUArchState *env, int sig, target_siginfo_t *info)
k->pending = 1;
/* signal that a new signal is pending */
ts->signal_pending = 1;
@ -93,7 +93,7 @@ index 1a8a332..2c9b0da 100644
return 1; /* indicates that the signal was queued */
}
}
@@ -716,8 +722,24 @@ int do_sigaction(int sig, const struct target_sigaction *act,
@@ -703,8 +709,24 @@ int do_sigaction(int sig, const struct target_sigaction *act,
if (host_sig != SIGSEGV && host_sig != SIGBUS) {
sigfillset(&act1.sa_mask);
act1.sa_flags = SA_SIGINFO;
@ -119,10 +119,10 @@ index 1a8a332..2c9b0da 100644
ignore state to avoid getting unexpected interrupted
syscalls */
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 6c64ba6..ce8eba3 100644
index 032d338..fe0dbd6 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -5663,6 +5663,87 @@ static target_timer_t get_timer_id(abi_long arg)
@@ -5847,6 +5847,87 @@ static target_timer_t get_timer_id(abi_long arg)
return timerid;
}
@ -210,7 +210,7 @@ index 6c64ba6..ce8eba3 100644
/* do_syscall() should always have a single exit point at the end so
that actions, such as logging of syscall results, can be performed.
All errnos that do_syscall() returns must be -TARGET_<errcode>. */
@@ -5676,6 +5757,12 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
@@ -5860,6 +5941,12 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
struct stat st;
struct statfs stfs;
void *p;
@ -223,7 +223,7 @@ index 6c64ba6..ce8eba3 100644
#ifdef DEBUG
gemu_log("syscall %d", num);
@@ -8998,7 +9085,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
@@ -9211,7 +9298,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
cmd = target_to_host_fcntl_cmd(arg2);
if (cmd == -TARGET_EINVAL) {
ret = cmd;
@ -232,7 +232,7 @@ index 6c64ba6..ce8eba3 100644
}
switch(arg2) {
@@ -10029,6 +10116,7 @@ fail:
@@ -10255,6 +10342,7 @@ fail:
#endif
if(do_strace)
print_syscall_ret(num, ret);

View File

@ -1,4 +1,4 @@
From 80376f4f9c820a5d1e9abe4e53f97bc7e0d349f4 Mon Sep 17 00:00:00 2001
From 65b3bf4a8d92ecb5f0ab4e89d20d8dd0a08d433a Mon Sep 17 00:00:00 2001
From: Ulrich Hecht <uli@suse.de>
Date: Tue, 14 Apr 2009 16:18:44 +0200
Subject: [PATCH] qemu-0.9.0.cvs-binfmt

View File

@ -1,4 +1,4 @@
From d0b55bb89eeaffae5f5d0563cf53801943fcefb7 Mon Sep 17 00:00:00 2001
From d2c9637b77ebbc03478f6d1a911bc01561161daa Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Tue, 14 Apr 2009 16:20:50 +0200
Subject: [PATCH] qemu-cvs-alsa_bitfield
@ -13,10 +13,10 @@ Signed-off-by: Ulrich Hecht <uli@suse.de>
2 files changed, 24 insertions(+)
diff --git a/include/exec/user/thunk.h b/include/exec/user/thunk.h
index 3b67462..f26c7f4 100644
index ad1d602..4e082a7 100644
--- a/include/exec/user/thunk.h
+++ b/include/exec/user/thunk.h
@@ -38,6 +38,7 @@ typedef enum argtype {
@@ -37,6 +37,7 @@ typedef enum argtype {
TYPE_ARRAY,
TYPE_STRUCT,
TYPE_OLDDEVT,
@ -24,7 +24,7 @@ index 3b67462..f26c7f4 100644
} argtype;
#define MK_PTR(type) TYPE_PTR, type
@@ -91,6 +92,7 @@ static inline int thunk_type_size(const argtype *type_ptr, int is_host)
@@ -90,6 +91,7 @@ static inline int thunk_type_size(const argtype *type_ptr, int is_host)
case TYPE_SHORT:
return 2;
case TYPE_INT:
@ -32,7 +32,7 @@ index 3b67462..f26c7f4 100644
return 4;
case TYPE_LONGLONG:
case TYPE_ULONGLONG:
@@ -153,6 +155,7 @@ static inline int thunk_type_align(const argtype *type_ptr, int is_host)
@@ -152,6 +154,7 @@ static inline int thunk_type_align(const argtype *type_ptr, int is_host)
case TYPE_SHORT:
return 2;
case TYPE_INT:
@ -41,10 +41,10 @@ index 3b67462..f26c7f4 100644
case TYPE_LONGLONG:
case TYPE_ULONGLONG:
diff --git a/thunk.c b/thunk.c
index f501fd7..b711860 100644
index f057d86..6db7874 100644
--- a/thunk.c
+++ b/thunk.c
@@ -39,6 +39,7 @@ static inline const argtype *thunk_type_next(const argtype *type_ptr)
@@ -37,6 +37,7 @@ static inline const argtype *thunk_type_next(const argtype *type_ptr)
case TYPE_CHAR:
case TYPE_SHORT:
case TYPE_INT:
@ -52,7 +52,7 @@ index f501fd7..b711860 100644
case TYPE_LONGLONG:
case TYPE_ULONGLONG:
case TYPE_LONG:
@@ -141,6 +142,26 @@ const argtype *thunk_convert(void *dst, const void *src,
@@ -139,6 +140,26 @@ const argtype *thunk_convert(void *dst, const void *src,
case TYPE_INT:
*(uint32_t *)dst = tswap32(*(uint32_t *)src);
break;

View File

@ -1,4 +1,4 @@
From a03418dfe9a1151a5863f84c71ea576d87136cef Mon Sep 17 00:00:00 2001
From 7315601fc9b07a4cbbf3126fb846eb6796b79f11 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Tue, 14 Apr 2009 16:23:27 +0200
Subject: [PATCH] qemu-cvs-alsa_ioctl
@ -2255,10 +2255,10 @@ index 0000000..e09a30d
+ unsigned char *code;
+};
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index f996acf..c2baa9e 100644
index 9e2b3c2..b090cdb 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -2540,6 +2540,8 @@ struct target_ucred {
@@ -2545,6 +2545,8 @@ struct target_ucred {
uint32_t gid;
};

View File

@ -1,4 +1,4 @@
From 9578bb8be38338db9e59ca5085970e23e49df081 Mon Sep 17 00:00:00 2001
From 31795a01d7db34560e09b67723f66c9b56e4bfe0 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
@ -12,10 +12,10 @@ Signed-off-by: Ulrich Hecht <uli@suse.de>
1 file changed, 14 insertions(+)
diff --git a/linux-user/mmap.c b/linux-user/mmap.c
index 7b459d5..9f164de 100644
index 3519147..671889b 100644
--- a/linux-user/mmap.c
+++ b/linux-user/mmap.c
@@ -363,6 +363,9 @@ abi_ulong mmap_find_vma(abi_ulong start, abi_ulong size)
@@ -358,6 +358,9 @@ abi_ulong mmap_find_vma(abi_ulong start, abi_ulong size)
}
}
@ -25,7 +25,7 @@ index 7b459d5..9f164de 100644
/* 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)
@@ -397,6 +400,17 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, int prot,
@@ -392,6 +395,17 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, int prot,
}
#endif

View File

@ -1,4 +1,4 @@
From 41d4cd0e804058e7cb43184144c602ac94118ac5 Mon Sep 17 00:00:00 2001
From 6851a047d5ee3598e23add8661f6a72911048279 Mon Sep 17 00:00:00 2001
From: Ulrich Hecht <uli@suse.de>
Date: Tue, 14 Apr 2009 16:25:41 +0200
Subject: [PATCH] qemu-cvs-gettimeofday
@ -9,10 +9,10 @@ No clue what this is for.
1 file changed, 2 insertions(+)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index ce8eba3..7a6bd6c 100644
index fe0dbd6..b5e6598 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -6870,6 +6870,8 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
@@ -7072,6 +7072,8 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
case TARGET_NR_gettimeofday:
{
struct timeval tv;

View File

@ -1,4 +1,4 @@
From a8de3056b883fc9a2dbade321fa56cd7053aba8e Mon Sep 17 00:00:00 2001
From eda771ddbebc65e250ea6ee55915b57f8a987a1d Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Tue, 14 Apr 2009 16:26:33 +0200
Subject: [PATCH] qemu-cvs-ioctl_debug
@ -12,10 +12,10 @@ Signed-off-by: Ulrich Hecht <uli@suse.de>
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 7a6bd6c..c744746 100644
index b5e6598..7a589cb 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -3922,7 +3922,12 @@ static abi_long do_ioctl(int fd, int cmd, abi_long arg)
@@ -4022,7 +4022,12 @@ static abi_long do_ioctl(int fd, int cmd, abi_long arg)
ie = ioctl_entries;
for(;;) {
if (ie->target_cmd == 0) {

View File

@ -1,4 +1,4 @@
From 93e7c43e8820bfcfa65fd4b2283fde1070056f55 Mon Sep 17 00:00:00 2001
From 2139ef68f00f2f273ab464aacf8108a857adea1d Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Tue, 14 Apr 2009 16:27:36 +0200
Subject: [PATCH] qemu-cvs-ioctl_nodirection
@ -15,10 +15,10 @@ Signed-off-by: Ulrich Hecht <uli@suse.de>
1 file changed, 6 insertions(+)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index c744746..6cdbd86 100644
index 7a589cb..1afd3b9 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -3955,6 +3955,11 @@ static abi_long do_ioctl(int fd, int cmd, abi_long arg)
@@ -4055,6 +4055,11 @@ static abi_long do_ioctl(int fd, int cmd, abi_long arg)
arg_type++;
target_size = thunk_type_size(arg_type, 0);
switch(ie->access) {
@ -30,7 +30,7 @@ index c744746..6cdbd86 100644
case IOC_R:
ret = get_errno(ioctl(fd, ie->host_cmd, buf_temp));
if (!is_error(ret)) {
@@ -3973,6 +3978,7 @@ static abi_long do_ioctl(int fd, int cmd, abi_long arg)
@@ -4073,6 +4078,7 @@ static abi_long do_ioctl(int fd, int cmd, abi_long arg)
unlock_user(argptr, arg, 0);
ret = get_errno(ioctl(fd, ie->host_cmd, buf_temp));
break;

View File

@ -1,4 +1,4 @@
From 0c87155ccca56143a74019bf10233837920a6467 Mon Sep 17 00:00:00 2001
From 32bb17da57ea63a355a777339b227b4da7f09825 Mon Sep 17 00:00:00 2001
From: Ulrich Hecht <uli@suse.de>
Date: Tue, 14 Apr 2009 16:37:42 +0200
Subject: [PATCH] block/vmdk: Support creation of SCSI VMDK images in qemu-img
@ -21,10 +21,10 @@ Signed-off-by: Andreas Färber <afaerber@suse.de>
4 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/block.c b/block.c
index 3a7324b..ae06afb 100644
index d36eb75..be962ec 100644
--- a/block.c
+++ b/block.c
@@ -3682,6 +3682,9 @@ void bdrv_img_create(const char *filename, const char *fmt,
@@ -3581,6 +3581,9 @@ void bdrv_img_create(const char *filename, const char *fmt,
if (!quiet) {
printf("Formatting '%s', fmt=%s ", filename, fmt);
qemu_opts_print(opts, " ");
@ -35,10 +35,10 @@ index 3a7324b..ae06afb 100644
}
diff --git a/block/vmdk.c b/block/vmdk.c
index 6f819e4..9944b17 100644
index 45f9d3c..f5c68e0 100644
--- a/block/vmdk.c
+++ b/block/vmdk.c
@@ -1852,9 +1852,12 @@ static int vmdk_create(const char *filename, QemuOpts *opts, Error **errp)
@@ -1885,9 +1885,12 @@ static int vmdk_create(const char *filename, QemuOpts *opts, Error **errp)
if (qemu_opt_get_bool_del(opts, BLOCK_OPT_ZEROED_GRAIN, false)) {
zeroed_grain = true;
}
@ -52,7 +52,7 @@ index 6f819e4..9944b17 100644
} else if (strcmp(adapter_type, "ide") &&
strcmp(adapter_type, "buslogic") &&
strcmp(adapter_type, "lsilogic") &&
@@ -2270,6 +2273,11 @@ static QemuOptsList vmdk_create_opts = {
@@ -2310,6 +2313,11 @@ static QemuOptsList vmdk_create_opts = {
.help = "Enable efficient zero writes "
"using the zeroed-grain GTE feature"
},
@ -65,7 +65,7 @@ index 6f819e4..9944b17 100644
}
};
diff --git a/include/block/block_int.h b/include/block/block_int.h
index 4012e36..5dcdca5 100644
index 10d8759..7c0b99c 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -40,10 +40,12 @@
@ -82,10 +82,10 @@ index 4012e36..5dcdca5 100644
#define BLOCK_OPT_BACKING_FMT "backing_fmt"
#define BLOCK_OPT_CLUSTER_SIZE "cluster_size"
diff --git a/qemu-img.c b/qemu-img.c
index 033011c..02e2dab 100644
index 06264d9..6ab8eaf 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -1805,6 +1805,13 @@ static int img_convert(int argc, char **argv)
@@ -2033,6 +2033,13 @@ static int img_convert(int argc, char **argv)
}
}

View File

@ -1,4 +1,4 @@
From c5622c7c69f393bc1f04f5855fa5ef79d4a2083d Mon Sep 17 00:00:00 2001
From 825a67827cc7546b538de736ccb349926803eb0a Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Fri, 30 Sep 2011 19:40:36 +0200
Subject: [PATCH] linux-user: add binfmt wrapper for argv[0] handling
@ -37,7 +37,7 @@ Signed-off-by: Andreas Färber <afaerber@suse.de>
create mode 100644 linux-user/binfmt.c
diff --git a/Makefile.target b/Makefile.target
index 962d004..46f5178 100644
index 34ddb7e..cba1078 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -36,6 +36,10 @@ endif
@ -72,7 +72,7 @@ index 962d004..46f5178 100644
all-obj-y := $(obj-y)
target-obj-y :=
@@ -196,6 +206,9 @@ ifdef CONFIG_DARWIN
@@ -198,6 +208,9 @@ ifdef CONFIG_DARWIN
$(call quiet-command,SetFile -a C $@," SETFILE $(TARGET_DIR)$@")
endif

View File

@ -1,4 +1,4 @@
From 4b4b134b43b0efae453be44dafe1459218ef176e Mon Sep 17 00:00:00 2001
From bf5f6764c515fa8bf60937ef3db0a550c4c622ba Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Fri, 6 Jan 2012 01:05:55 +0100
Subject: [PATCH] PPC: KVM: Disable mmu notifier check
@ -13,20 +13,20 @@ KVM guests work there, even if possibly racy in some odd circumstances.
1 file changed, 2 insertions(+)
diff --git a/exec.c b/exec.c
index 0bf0a6e..79c3983 100644
index f46e596..fc2073b 100644
--- a/exec.c
+++ b/exec.c
@@ -1229,11 +1229,13 @@ static void *file_ram_alloc(RAMBlock *block,
goto error;
}
@@ -1242,11 +1242,13 @@ static void *file_ram_alloc(RAMBlock *block,
int fd = -1;
int64_t page_size;
+#ifndef TARGET_PPC
if (kvm_enabled() && !kvm_has_sync_mmu()) {
error_setg(errp,
"host lacks kvm mmu notifiers, -mem-path unsupported");
goto error;
return NULL;
}
+#endif
if (!stat(path, &st) && S_ISDIR(st.st_mode)) {
/* Make name safe to use with mkstemp by replacing '/' with '_'. */
for (;;) {
fd = open(path, O_RDWR);

View File

@ -1,4 +1,4 @@
From cce489197692907986c6fec5c089daf57d46b58b Mon Sep 17 00:00:00 2001
From ea757d5a85a7e218d34f95f21923dfa979d52fa2 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Fri, 13 Jan 2012 17:05:41 +0100
Subject: [PATCH] linux-user: fix segfault deadlock
@ -26,10 +26,10 @@ Signed-off-by: Andreas Färber <afaerber@suse.de>
1 file changed, 4 insertions(+)
diff --git a/user-exec.c b/user-exec.c
index 8ad89a4..02c5c3b 100644
index d8d597b..f8b7752 100644
--- a/user-exec.c
+++ b/user-exec.c
@@ -95,6 +95,10 @@ static inline int handle_cpu_signal(uintptr_t pc, unsigned long address,
@@ -94,6 +94,10 @@ static inline int handle_cpu_signal(uintptr_t pc, unsigned long address,
printf("qemu: SIGSEGV pc=0x%08lx address=%08lx w=%d oldset=0x%08lx\n",
pc, address, is_write, *(unsigned long *)old_set);
#endif

View File

@ -1,4 +1,4 @@
From 8cb8d78c1f37f758d87e8afa64dd6884f8f4af65 Mon Sep 17 00:00:00 2001
From 113df7dc50d8b973347bf1b1c38437b455f3d431 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Thu, 2 Feb 2012 18:02:33 +0100
Subject: [PATCH] linux-user: binfmt: support host binaries
@ -12,7 +12,7 @@ Signed-off-by: Alexander Graf <agraf@suse.de>
1 file changed, 26 insertions(+)
diff --git a/linux-user/binfmt.c b/linux-user/binfmt.c
index cd1f513..c755edc 100644
index cd1f513..458f136 100644
--- a/linux-user/binfmt.c
+++ b/linux-user/binfmt.c
@@ -5,6 +5,9 @@
@ -41,7 +41,7 @@ index cd1f513..c755edc 100644
+ }
+ guestarch++;
+ r = asprintf(&hostbin, "/emul/" ARCH_NAME "-for-%s/%s", guestarch, argv[1]);
+ if (!access(hostbin, X_OK) && (r > 0)) {
+ if ((r > 0) && !access(hostbin, X_OK)) {
+ /*
+ * We found a host binary replacement for the non-host binary. Let's
+ * use that instead!

View File

@ -1,4 +1,4 @@
From c133a037638e8831f61352311a5acbd6241f184b Mon Sep 17 00:00:00 2001
From 492281e8992a45e83c58f65dc977415b547e5898 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Tue, 12 Jun 2012 04:41:10 +0200
Subject: [PATCH] linux-user: Ignore broken loop ioctl
@ -46,10 +46,10 @@ index 8974caa..810ae61 100644
#endif
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 6cdbd86..55dfcf9 100644
index 1afd3b9..32f7290 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -3899,6 +3899,13 @@ static abi_long do_ioctl_kdsigaccept(const IOCTLEntry *ie, uint8_t *buf_temp,
@@ -3999,6 +3999,13 @@ static abi_long do_ioctl_kdsigaccept(const IOCTLEntry *ie, uint8_t *buf_temp,
return get_errno(ioctl(fd, ie->host_cmd, sig));
}
@ -64,10 +64,10 @@ index 6cdbd86..55dfcf9 100644
#define IOCTL(cmd, access, ...) \
{ TARGET_ ## cmd, cmd, #cmd, access, 0, { __VA_ARGS__ } },
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index c2baa9e..4f966b4 100644
index b090cdb..f820b0b 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -1085,6 +1085,7 @@ struct target_pollfd {
@@ -1087,6 +1087,7 @@ struct target_pollfd {
#define TARGET_LOOP_SET_STATUS64 0x4C04
#define TARGET_LOOP_GET_STATUS64 0x4C05
#define TARGET_LOOP_CHANGE_FD 0x4C06

View File

@ -1,4 +1,4 @@
From 75fce0091f944eeda3edc005be834f26351cd61f Mon Sep 17 00:00:00 2001
From 35d1d48a4dd871b0c77c785f7ccb6e8c5e7f6de8 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Thu, 5 Jul 2012 17:31:39 +0200
Subject: [PATCH] linux-user: lock tcg
@ -21,10 +21,10 @@ Signed-off-by: Andreas Färber <afaerber@suse.de>
3 files changed, 39 insertions(+), 1 deletion(-)
diff --git a/linux-user/mmap.c b/linux-user/mmap.c
index 9f164de..691e63a 100644
index 671889b..b85905c 100644
--- a/linux-user/mmap.c
+++ b/linux-user/mmap.c
@@ -30,6 +30,7 @@
@@ -23,6 +23,7 @@
#include "qemu.h"
#include "qemu-common.h"
@ -32,7 +32,7 @@ index 9f164de..691e63a 100644
#include "translate-all.h"
//#define DEBUG_MMAP
@@ -41,6 +42,7 @@ void mmap_lock(void)
@@ -34,6 +35,7 @@ void mmap_lock(void)
{
if (mmap_lock_count++ == 0) {
pthread_mutex_lock(&mmap_mutex);
@ -40,7 +40,7 @@ index 9f164de..691e63a 100644
}
}
@@ -48,6 +50,7 @@ void mmap_unlock(void)
@@ -41,6 +43,7 @@ void mmap_unlock(void)
{
if (--mmap_lock_count == 0) {
pthread_mutex_unlock(&mmap_mutex);
@ -49,11 +49,11 @@ index 9f164de..691e63a 100644
}
diff --git a/tcg/tcg.c b/tcg/tcg.c
index a163541..da174b9 100644
index b46bf1a..aed34d1 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -39,6 +39,8 @@
#include "qemu-common.h"
#include "qemu/cutils.h"
#include "qemu/host-utils.h"
#include "qemu/timer.h"
+#include "config-host.h"
@ -61,7 +61,7 @@ index a163541..da174b9 100644
/* Note: the long term plan is to reduce the dependencies on the QEMU
CPU definitions. Currently they are used for qemu_ld/st
@@ -117,6 +119,29 @@ static void tcg_out_tb_finalize(TCGContext *s);
@@ -119,6 +121,29 @@ static bool tcg_out_tb_finalize(TCGContext *s);
static TCGRegSet tcg_target_available_regs[2];
static TCGRegSet tcg_target_call_clobber_regs;
@ -91,7 +91,7 @@ index a163541..da174b9 100644
#if TCG_TARGET_INSN_UNIT_SIZE == 1
static __attribute__((unused)) inline void tcg_out8(TCGContext *s, uint8_t v)
{
@@ -327,7 +352,8 @@ void tcg_context_init(TCGContext *s)
@@ -331,7 +356,8 @@ void tcg_context_init(TCGContext *s)
memset(s, 0, sizeof(*s));
s->nb_globals = 0;
@ -101,7 +101,7 @@ index a163541..da174b9 100644
/* Count total number of arguments and allocate the corresponding
space */
total_args = 0;
@@ -2345,6 +2371,7 @@ int tcg_gen_code(TCGContext *s, tcg_insn_unit *gen_code_buf)
@@ -2358,6 +2384,7 @@ int tcg_gen_code(TCGContext *s, TranslationBlock *tb)
qemu_log("\n");
}
#endif
@ -109,7 +109,7 @@ index a163541..da174b9 100644
#ifdef CONFIG_PROFILER
s->opt_time -= profile_getclock();
@@ -2448,6 +2475,7 @@ int tcg_gen_code(TCGContext *s, tcg_insn_unit *gen_code_buf)
@@ -2462,6 +2489,7 @@ int tcg_gen_code(TCGContext *s, TranslationBlock *tb)
the buffer completely. Thus we can test for overflow after
generating code without having to check during generation. */
if (unlikely((void *)s->code_ptr > s->code_gen_highwater)) {
@ -117,7 +117,7 @@ index a163541..da174b9 100644
return -1;
}
}
@@ -2459,6 +2487,7 @@ int tcg_gen_code(TCGContext *s, tcg_insn_unit *gen_code_buf)
@@ -2475,6 +2503,7 @@ int tcg_gen_code(TCGContext *s, TranslationBlock *tb)
/* flush instruction cache */
flush_icache_range((uintptr_t)s->code_buf, (uintptr_t)s->code_ptr);
@ -126,7 +126,7 @@ index a163541..da174b9 100644
return tcg_current_code_size(s);
}
diff --git a/tcg/tcg.h b/tcg/tcg.h
index a696922..da22788 100644
index 40c8fbe..6b826af2 100644
--- a/tcg/tcg.h
+++ b/tcg/tcg.h
@@ -27,6 +27,7 @@
@ -137,7 +137,7 @@ index a696922..da22788 100644
#include "tcg-target.h"
#define CPU_TEMP_BUF_NLONGS 128
@@ -581,6 +582,8 @@ struct TCGContext {
@@ -591,6 +592,8 @@ struct TCGContext {
uint16_t gen_insn_end_off[TCG_MAX_INSNS];
target_ulong gen_insn_data[TCG_MAX_INSNS][TARGET_INSN_START_WORDS];
@ -146,7 +146,7 @@ index a696922..da22788 100644
};
extern TCGContext tcg_ctx;
@@ -771,6 +774,9 @@ void tcg_gen_callN(TCGContext *s, void *func,
@@ -798,6 +801,9 @@ void tcg_gen_callN(TCGContext *s, void *func,
void tcg_op_remove(TCGContext *s, TCGOp *op);
void tcg_optimize(TCGContext *s);

View File

@ -1,4 +1,4 @@
From e5315d304cfd3d5398576a5c6f3fed541b775bc8 Mon Sep 17 00:00:00 2001
From 259ab3bbe5c7cb51258ab1a4f7d1e1a8bbd4678e Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Tue, 10 Jul 2012 20:40:55 +0200
Subject: [PATCH] linux-user: Run multi-threaded code on a single core
@ -19,10 +19,10 @@ Signed-off-by: Alexander Graf <agraf@suse.de>
1 file changed, 9 insertions(+)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 55dfcf9..aa21cb6 100644
index 32f7290..780f760 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -4604,6 +4604,15 @@ static int do_fork(CPUArchState *env, unsigned int flags, abi_ulong newsp,
@@ -4704,6 +4704,15 @@ static int do_fork(CPUArchState *env, unsigned int flags, abi_ulong newsp,
if (nptl_flags & CLONE_SETTLS)
cpu_set_tls (new_env, newtls);

View File

@ -1,4 +1,4 @@
From 0ca59d2290fa0a06cf51a159549461ab0b71bf5e Mon Sep 17 00:00:00 2001
From 88a56d7effef51c4f98fa0be1dd0f98ffe59c42f Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Wed, 11 Jul 2012 16:47:42 +0200
Subject: [PATCH] linux-user: lock tb flushing too
@ -15,10 +15,10 @@ Signed-off-by: Andreas Färber <afaerber@suse.de>
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/translate-all.c b/translate-all.c
index 042a857..8d0d1a6 100644
index b4df1ec..747ebd0 100644
--- a/translate-all.c
+++ b/translate-all.c
@@ -767,17 +767,21 @@ static TranslationBlock *tb_alloc(target_ulong pc)
@@ -761,17 +761,21 @@ static TranslationBlock *tb_alloc(target_ulong pc)
{
TranslationBlock *tb;
@ -40,7 +40,7 @@ index 042a857..8d0d1a6 100644
/* In practice this is mostly used for single use temporary TB
Ignore the hard cases and just back up if this TB happens to
be the last one generated. */
@@ -786,6 +790,7 @@ void tb_free(TranslationBlock *tb)
@@ -780,6 +784,7 @@ void tb_free(TranslationBlock *tb)
tcg_ctx.code_gen_ptr = tb->tc_ptr;
tcg_ctx.tb_ctx.nb_tbs--;
}
@ -48,7 +48,7 @@ index 042a857..8d0d1a6 100644
}
static inline void invalidate_page_bitmap(PageDesc *p)
@@ -839,6 +844,7 @@ void tb_flush(CPUState *cpu)
@@ -833,6 +838,7 @@ void tb_flush(CPUState *cpu)
((unsigned long)(tcg_ctx.code_gen_ptr - tcg_ctx.code_gen_buffer)) /
tcg_ctx.tb_ctx.nb_tbs : 0);
#endif
@ -56,7 +56,7 @@ index 042a857..8d0d1a6 100644
if ((unsigned long)(tcg_ctx.code_gen_ptr - tcg_ctx.code_gen_buffer)
> tcg_ctx.code_gen_buffer_size) {
cpu_abort(cpu, "Internal error: code buffer overflow\n");
@@ -856,6 +862,7 @@ void tb_flush(CPUState *cpu)
@@ -850,6 +856,7 @@ void tb_flush(CPUState *cpu)
/* XXX: flush processor icache at this point if cache flush is
expensive */
tcg_ctx.tb_ctx.tb_flush_count++;
@ -64,7 +64,7 @@ index 042a857..8d0d1a6 100644
}
#ifdef DEBUG_TB_CHECK
@@ -1212,8 +1219,10 @@ void tb_invalidate_phys_page_range(tb_page_addr_t start, tb_page_addr_t end,
@@ -1207,8 +1214,10 @@ void tb_invalidate_phys_page_range(tb_page_addr_t start, tb_page_addr_t end,
int current_flags = 0;
#endif /* TARGET_HAS_PRECISE_SMC */
@ -75,7 +75,7 @@ index 042a857..8d0d1a6 100644
return;
}
#if defined(TARGET_HAS_PRECISE_SMC)
@@ -1298,6 +1307,7 @@ void tb_invalidate_phys_page_range(tb_page_addr_t start, tb_page_addr_t end,
@@ -1293,6 +1302,7 @@ void tb_invalidate_phys_page_range(tb_page_addr_t start, tb_page_addr_t end,
cpu_resume_from_signal(cpu, NULL);
}
#endif
@ -83,7 +83,7 @@ index 042a857..8d0d1a6 100644
}
/* len must be <= 8 and start must be a multiple of len */
@@ -1515,13 +1525,16 @@ static TranslationBlock *tb_find_pc(uintptr_t tc_ptr)
@@ -1510,13 +1520,16 @@ static TranslationBlock *tb_find_pc(uintptr_t tc_ptr)
{
int m_min, m_max, m;
uintptr_t v;
@ -101,7 +101,7 @@ index 042a857..8d0d1a6 100644
return NULL;
}
/* binary search (cf Knuth) */
@@ -1532,6 +1545,7 @@ static TranslationBlock *tb_find_pc(uintptr_t tc_ptr)
@@ -1527,6 +1540,7 @@ static TranslationBlock *tb_find_pc(uintptr_t tc_ptr)
tb = &tcg_ctx.tb_ctx.tbs[m];
v = (uintptr_t)tb->tc_ptr;
if (v == tc_ptr) {
@ -109,7 +109,7 @@ index 042a857..8d0d1a6 100644
return tb;
} else if (tc_ptr < v) {
m_max = m - 1;
@@ -1539,7 +1553,9 @@ static TranslationBlock *tb_find_pc(uintptr_t tc_ptr)
@@ -1534,7 +1548,9 @@ static TranslationBlock *tb_find_pc(uintptr_t tc_ptr)
m_min = m + 1;
}
}

View File

@ -1,4 +1,4 @@
From 6c8981399b1933011bb178f91d0bf91907d0ab8a Mon Sep 17 00:00:00 2001
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
@ -22,10 +22,10 @@ Signed-off-by: Andreas Färber <afaerber@suse.de>
1 file changed, 20 insertions(+)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index aa21cb6..8995968 100644
index 780f760..7350980 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -5513,6 +5513,25 @@ static int open_self_stat(void *cpu_env, int fd)
@@ -5697,6 +5697,25 @@ static int open_self_stat(void *cpu_env, int fd)
return 0;
}
@ -51,7 +51,7 @@ index aa21cb6..8995968 100644
static int open_self_auxv(void *cpu_env, int fd)
{
CPUState *cpu = ENV_GET_CPU((CPUArchState *)cpu_env);
@@ -5627,6 +5646,7 @@ static int do_openat(void *cpu_env, int dirfd, const char *pathname, int flags,
@@ -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

View File

@ -1,4 +1,4 @@
From 58cee188a6c2a532d7a34494393969b364d6d3e8 Mon Sep 17 00:00:00 2001
From e5d9e56c734de021526273921f9ce7ba5b8a8b0a Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Mon, 20 Aug 2012 00:02:52 +0200
Subject: [PATCH] linux-user: implement FS_IOC_GETFLAGS ioctl
@ -28,10 +28,10 @@ index c180faf..8650a70 100644
IOCTL(SIOCATMARK, 0, TYPE_NULL)
IOCTL(SIOCGIFNAME, IOC_RW, MK_PTR(TYPE_INT))
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index 4f966b4..817defd 100644
index f820b0b..5152e89 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -2455,6 +2455,8 @@ struct target_f_owner_ex {
@@ -2457,6 +2457,8 @@ struct target_f_owner_ex {
#define TARGET_MTIOCGET TARGET_IOR('m', 2, struct mtget)
#define TARGET_MTIOCPOS TARGET_IOR('m', 3, struct mtpos)

View File

@ -1,4 +1,4 @@
From c0a3dcdbf263dc193d4337056c3f3a157f8b7d33 Mon Sep 17 00:00:00 2001
From cf06139ea39a52419e4a5c51b89b33a3d0f2036d Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Mon, 20 Aug 2012 00:07:13 +0200
Subject: [PATCH] linux-user: implement FS_IOC_SETFLAGS ioctl
@ -28,10 +28,10 @@ index 8650a70..f9f7c83 100644
IOCTL(SIOCATMARK, 0, TYPE_NULL)
IOCTL(SIOCGIFNAME, IOC_RW, MK_PTR(TYPE_INT))
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index 817defd..367eac1 100644
index 5152e89..77be181 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -2456,6 +2456,7 @@ struct target_f_owner_ex {
@@ -2458,6 +2458,7 @@ struct target_f_owner_ex {
#define TARGET_MTIOCPOS TARGET_IOR('m', 3, struct mtpos)
#define TARGET_FS_IOC_GETFLAGS TARGET_IORU('f', 1)

View File

@ -1,4 +1,4 @@
From 588f5e97ffbb3e072053fc5f39eb0411663800c6 Mon Sep 17 00:00:00 2001
From 6b90b44583771ab6822240baf3e1d3830490cbd2 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Tue, 21 Aug 2012 14:20:40 +0200
Subject: [PATCH] linux-user: XXX disable fiemap
@ -9,10 +9,10 @@ agraf: fiemap breaks in libarchive. Disable it for now.
1 file changed, 5 insertions(+)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 8995968..f7e57a6 100644
index 7350980..90b1698 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -3394,6 +3394,11 @@ static abi_long do_ioctl_fs_ioc_fiemap(const IOCTLEntry *ie, uint8_t *buf_temp,
@@ -3494,6 +3494,11 @@ static abi_long do_ioctl_fs_ioc_fiemap(const IOCTLEntry *ie, uint8_t *buf_temp,
uint32_t outbufsz;
int free_fm = 0;

View File

@ -1,4 +1,4 @@
From 0f901ac5dba327c1c988bf7eb7b30bf002446bd9 Mon Sep 17 00:00:00 2001
From 12cbdd512787707b791787b93f5c5af677d9b571 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20F=C3=A4rber?= <afaerber@suse.de>
Date: Wed, 29 Aug 2012 18:42:56 +0200
Subject: [PATCH] slirp: -nooutgoing
@ -7,15 +7,15 @@ TBD (from SUSE Studio team)
---
qemu-options.hx | 10 ++++++++++
slirp/socket.c | 8 ++++++++
slirp/tcp_subr.c | 13 +++++++++++++
slirp/tcp_subr.c | 12 ++++++++++++
vl.c | 9 +++++++++
4 files changed, 40 insertions(+)
4 files changed, 39 insertions(+)
diff --git a/qemu-options.hx b/qemu-options.hx
index 0eea4ee..32a68e4 100644
index a770086..df60351 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -2949,6 +2949,16 @@ Store the QEMU process PID in @var{file}. It is useful if you launch QEMU
@@ -3084,6 +3084,16 @@ Store the QEMU process PID in @var{file}. It is useful if you launch QEMU
from a script.
ETEXI
@ -33,10 +33,10 @@ index 0eea4ee..32a68e4 100644
"-singlestep always run in singlestep mode\n", QEMU_ARCH_ALL)
STEXI
diff --git a/slirp/socket.c b/slirp/socket.c
index 1673e3a..a177ab0 100644
index b836c42..13ec0c0 100644
--- a/slirp/socket.c
+++ b/slirp/socket.c
@@ -532,6 +532,8 @@ sorecvfrom(struct socket *so)
@@ -588,6 +588,8 @@ sorecvfrom(struct socket *so)
} /* if ping packet */
}
@ -45,34 +45,33 @@ index 1673e3a..a177ab0 100644
/*
* sendto() a socket
*/
@@ -562,6 +564,12 @@ sosendto(struct socket *so, struct mbuf *m)
DEBUG_MISC((dfd, " sendto()ing, addr.sin_port=%d, addr.sin_addr.s_addr=%.16s\n", ntohs(addr.sin_port), inet_ntoa(addr.sin_addr)));
@@ -605,6 +607,12 @@ sosendto(struct socket *so, struct mbuf *m)
DEBUG_CALL(" sendto()ing)");
sotranslate_out(so, &addr);
+ /* Only allow DNS requests */
+ if (slirp_nooutgoing && ntohs(addr.sin_port) != 53) {
+ if (slirp_nooutgoing && ntohs(((struct sockaddr_in *)&addr)->sin_port) != 53) {
+ errno = EHOSTUNREACH;
+ return -1;
+ }
+
/* Don't care what port we get */
ret = sendto(so->s, m->m_data, m->m_len, 0,
(struct sockaddr *)&addr, sizeof (struct sockaddr));
(struct sockaddr *)&addr, sizeof(addr));
diff --git a/slirp/tcp_subr.c b/slirp/tcp_subr.c
index e161ed2..d0e29e0 100644
index dbfd2c6..94126bd 100644
--- a/slirp/tcp_subr.c
+++ b/slirp/tcp_subr.c
@@ -324,6 +324,9 @@ tcp_sockclosed(struct tcpcb *tp)
@@ -388,6 +388,8 @@ tcp_sockclosed(struct tcpcb *tp)
* nonblocking. Connect returns after the SYN is sent, and does
* not wait for ACK+SYN.
*/
+
+extern int slirp_nooutgoing;
+
int tcp_fconnect(struct socket *so)
int tcp_fconnect(struct socket *so, unsigned short af)
{
Slirp *slirp = so->slirp;
@@ -332,6 +335,11 @@ int tcp_fconnect(struct socket *so)
int ret=0;
@@ -395,6 +397,11 @@ int tcp_fconnect(struct socket *so, unsigned short af)
DEBUG_CALL("tcp_fconnect");
DEBUG_ARG("so = %p", so);
@ -81,26 +80,26 @@ index e161ed2..d0e29e0 100644
+ return -1;
+ }
+
if( (ret = so->s = qemu_socket(AF_INET,SOCK_STREAM,0)) >= 0) {
ret = so->s = qemu_socket(af, SOCK_STREAM, 0);
if (ret >= 0) {
int opt, s=so->s;
struct sockaddr_in addr;
@@ -424,6 +432,11 @@ void tcp_connect(struct socket *inso)
@@ -475,6 +482,11 @@ void tcp_connect(struct socket *inso)
tcp_close(sototcpcb(so)); /* This will sofree() as well */
return;
}
+ if (slirp_nooutgoing && addr.sin_addr.s_addr != slirp_nooutgoing) {
+ if (slirp_nooutgoing && ((struct sockaddr_in *)&addr)->sin_addr.s_addr != slirp_nooutgoing) {
+ tcp_close(sototcpcb(so)); /* This will sofree() as well */
+ close(s);
+ closesocket(s);
+ return;
+ }
qemu_set_nonblock(s);
socket_set_fast_reuse(s);
opt = 1;
diff --git a/vl.c b/vl.c
index 4211ff1..d5250b6 100644
index bd81ea9..a8f1338 100644
--- a/vl.c
+++ b/vl.c
@@ -167,6 +167,7 @@ int smp_threads = 1;
@@ -162,6 +162,7 @@ int smp_threads = 1;
int acpi_enabled = 1;
int no_hpet = 0;
int fd_bootchk = 1;
@ -108,7 +107,7 @@ index 4211ff1..d5250b6 100644
static int no_reboot;
int no_shutdown = 0;
int cursor_hide = 1;
@@ -3385,6 +3386,14 @@ int main(int argc, char **argv, char **envp)
@@ -3378,6 +3379,14 @@ int main(int argc, char **argv, char **envp)
case QEMU_OPTION_singlestep:
singlestep = 1;
break;

View File

@ -1,4 +1,4 @@
From dcdb06da7c0233d7532ebb281e79d9a57231311b Mon Sep 17 00:00:00 2001
From 1c744e643260e5a557cbc9a6140f362ccdc6c6b3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20F=C3=A4rber?= <afaerber@suse.de>
Date: Wed, 29 Aug 2012 20:06:01 +0200
Subject: [PATCH] vnc: password-file= and incoming-connections=
@ -9,10 +9,10 @@ TBD (from SUSE Studio team)
1 file changed, 55 insertions(+)
diff --git a/ui/vnc.c b/ui/vnc.c
index cbe4d33..36cd143 100644
index d2ebf1f..ab65db9 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -57,6 +57,8 @@ static const struct timeval VNC_REFRESH_LOSSY = { 2, 0 };
@@ -58,6 +58,8 @@ static const struct timeval VNC_REFRESH_LOSSY = { 2, 0 };
static QTAILQ_HEAD(, VncDisplay) vnc_displays =
QTAILQ_HEAD_INITIALIZER(vnc_displays);
@ -21,7 +21,7 @@ index cbe4d33..36cd143 100644
static int vnc_cursor_define(VncState *vs);
static void vnc_release_modifiers(VncState *vs);
@@ -1223,6 +1225,7 @@ static void vnc_disconnect_start(VncState *vs)
@@ -1185,6 +1187,7 @@ static void vnc_disconnect_start(VncState *vs)
void vnc_disconnect_finish(VncState *vs)
{
int i;
@ -29,9 +29,9 @@ index cbe4d33..36cd143 100644
vnc_jobs_join(vs); /* Wait encoding jobs */
@@ -1271,6 +1274,13 @@ void vnc_disconnect_finish(VncState *vs)
}
g_free(vs->lossy_rect);
@@ -1235,6 +1238,13 @@ void vnc_disconnect_finish(VncState *vs)
object_unref(OBJECT(vs->sioc));
vs->sioc = NULL;
g_free(vs);
+
+ num_disconnects++;
@ -42,9 +42,9 @@ index cbe4d33..36cd143 100644
+ }
}
ssize_t vnc_client_io_error(VncState *vs, ssize_t ret, int last_errno)
@@ -3268,6 +3278,39 @@ char *vnc_display_local_addr(const char *id)
return vnc_socket_local_addr("%s:%s", vs->lsock);
ssize_t vnc_client_io_error(VncState *vs, ssize_t ret, Error **errp)
@@ -3200,6 +3210,39 @@ char *vnc_display_local_addr(const char *id)
return ret;
}
+static void read_file_password(const char *id, const char *filename)
@ -83,7 +83,7 @@ index cbe4d33..36cd143 100644
static QemuOptsList qemu_vnc_opts = {
.name = "vnc",
.head = QTAILQ_HEAD_INITIALIZER(qemu_vnc_opts.head),
@@ -3299,6 +3342,9 @@ static QemuOptsList qemu_vnc_opts = {
@@ -3231,6 +3274,9 @@ static QemuOptsList qemu_vnc_opts = {
.name = "connections",
.type = QEMU_OPT_NUMBER,
},{
@ -93,7 +93,7 @@ index cbe4d33..36cd143 100644
.name = "to",
.type = QEMU_OPT_NUMBER,
},{
@@ -3311,6 +3357,9 @@ static QemuOptsList qemu_vnc_opts = {
@@ -3243,6 +3289,9 @@ static QemuOptsList qemu_vnc_opts = {
.name = "password",
.type = QEMU_OPT_BOOL,
},{
@ -103,7 +103,7 @@ index cbe4d33..36cd143 100644
.name = "reverse",
.type = QEMU_OPT_BOOL,
},{
@@ -3544,6 +3593,7 @@ void vnc_display_open(const char *id, Error **errp)
@@ -3476,6 +3525,7 @@ void vnc_display_open(const char *id, Error **errp)
const char *share, *device_id;
QemuConsole *con;
bool password = false;
@ -111,7 +111,7 @@ index cbe4d33..36cd143 100644
bool reverse = false;
const char *vnc;
char *h;
@@ -3662,6 +3712,10 @@ void vnc_display_open(const char *id, Error **errp)
@@ -3601,6 +3651,10 @@ void vnc_display_open(const char *id, Error **errp)
goto fail;
}
}
@ -122,7 +122,7 @@ index cbe4d33..36cd143 100644
reverse = qemu_opt_get_bool(opts, "reverse", false);
lock_key_sync = qemu_opt_get_bool(opts, "lock-key-sync", true);
@@ -3750,6 +3804,7 @@ void vnc_display_open(const char *id, Error **errp)
@@ -3689,6 +3743,7 @@ void vnc_display_open(const char *id, Error **errp)
vs->share_policy = VNC_SHARE_POLICY_ALLOW_EXCLUSIVE;
}
vs->connections_limit = qemu_opt_get_number(opts, "connections", 32);

View File

@ -1,4 +1,4 @@
From ea1a1506d303f1ae4ad584c2dfb21c92c42970f6 Mon Sep 17 00:00:00 2001
From 2be5a4993f98e5a4af0d2c388eba6e08955d7e14 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Wed, 10 Oct 2012 10:21:20 +0200
Subject: [PATCH] linux-user: add more blk ioctls
@ -42,10 +42,10 @@ index f9f7c83..8eb4446 100644
IOCTL(BLKRASET, 0, TYPE_INT)
IOCTL(BLKRAGET, IOC_R, MK_PTR(TYPE_LONG))
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index 367eac1..ca14909 100644
index 77be181..787ba85 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -954,6 +954,12 @@ struct target_pollfd {
@@ -956,6 +956,12 @@ struct target_pollfd {
#define TARGET_BLKGETSIZE64 TARGET_IOR(0x12,114,abi_ulong)
/* return device size in bytes
(u64 *arg) */

View File

@ -1,4 +1,4 @@
From 436e643f2f17bac815c7ec7315e0758b22f10fb4 Mon Sep 17 00:00:00 2001
From 90ede05e9c7502bf620bf027d660634636723407 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Tue, 9 Oct 2012 09:06:49 +0200
Subject: [PATCH] linux-user: use target_ulong
@ -17,10 +17,10 @@ Signed-off-by: Alexander Graf <agraf@suse.de>
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/linux-user/qemu.h b/linux-user/qemu.h
index ea9c98d..a9e77d0 100644
index b55a9d2..be9c21c 100644
--- a/linux-user/qemu.h
+++ b/linux-user/qemu.h
@@ -181,10 +181,10 @@ abi_long memcpy_to_target(abi_ulong dest, const void *src,
@@ -178,10 +178,10 @@ abi_long memcpy_to_target(abi_ulong dest, const void *src,
void target_set_brk(abi_ulong new_brk);
abi_long do_brk(abi_ulong new_brk);
void syscall_init(void);
@ -36,10 +36,10 @@ index ea9c98d..a9e77d0 100644
extern THREAD CPUState *thread_cpu;
void cpu_loop(CPUArchState *env);
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index f7e57a6..2db566c 100644
index 90b1698..2048082 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -5799,10 +5799,10 @@ int syscall_restartable(int syscall_nr)
@@ -5983,10 +5983,10 @@ int syscall_restartable(int syscall_nr)
/* do_syscall() should always have a single exit point at the end so
that actions, such as logging of syscall results, can be performed.
All errnos that do_syscall() returns must be -TARGET_<errcode>. */

View File

@ -1,4 +1,4 @@
From 6d0d71e8215d2273663a3ddb44cad3e24ed3ad35 Mon Sep 17 00:00:00 2001
From 86ba74de946602754a7e624dd5f2be833abc50a4 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Wed, 5 Aug 2009 09:49:37 +0200
Subject: [PATCH] block: Add support for DictZip enabled gzip files
@ -36,30 +36,31 @@ Signed-off-by: Tim Hardeck <thardeck@suse.de>
[AF: common-obj-y -> block-obj-y, drop probe hook (bsc#945778)]
[AF: Drop bdrv_open() drv parameter for 2.5]
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
block/Makefile.objs | 1 +
block/dictzip.c | 578 ++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 579 insertions(+)
block/dictzip.c | 580 ++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 581 insertions(+)
create mode 100644 block/dictzip.c
diff --git a/block/Makefile.objs b/block/Makefile.objs
index 58ef2ef..c7b9294 100644
index 44a5416..12e0cca 100644
--- a/block/Makefile.objs
+++ b/block/Makefile.objs
@@ -20,6 +20,7 @@ block-obj-$(CONFIG_RBD) += rbd.o
block-obj-$(CONFIG_GLUSTERFS) += gluster.o
@@ -21,6 +21,7 @@ block-obj-$(CONFIG_GLUSTERFS) += gluster.o
block-obj-$(CONFIG_ARCHIPELAGO) += archipelago.o
block-obj-$(CONFIG_LIBSSH2) += ssh.o
block-obj-y += accounting.o dirty-bitmap.o
+block-obj-y += dictzip.o
block-obj-y += accounting.o
block-obj-y += write-threshold.o
block-obj-y += crypto.o
diff --git a/block/dictzip.c b/block/dictzip.c
new file mode 100644
index 0000000..728d5b4
index 0000000..717a7d3
--- /dev/null
+++ b/block/dictzip.c
@@ -0,0 +1,578 @@
@@ -0,0 +1,580 @@
+/*
+ * DictZip Block driver for dictzip enabled gzip files
+ *
@ -97,6 +98,8 @@ index 0000000..728d5b4
+ * THE SOFTWARE.
+ */
+
+#include "qemu/osdep.h"
+#include "qapi/error.h"
+#include "qemu-common.h"
+#include "block/block_int.h"
+#include <zlib.h>

View File

@ -1,4 +1,4 @@
From ba2b8bb664ae784303710caa916066c313510755 Mon Sep 17 00:00:00 2001
From 57fd47a937941ca3bd3762a68e6e3dad0d4992da Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Wed, 5 Aug 2009 17:28:38 +0200
Subject: [PATCH] block: Add tar container format
@ -37,30 +37,31 @@ Signed-off-by: Tim Hardeck <thardeck@suse.de>
[AF: common-obj-y -> block-obj-y, drop probe hook (bsc#945778)]
[AF: Drop bdrv_open() drv parameter for 2.5]
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
block/Makefile.objs | 1 +
block/tar.c | 368 ++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 369 insertions(+)
block/tar.c | 370 ++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 371 insertions(+)
create mode 100644 block/tar.c
diff --git a/block/Makefile.objs b/block/Makefile.objs
index c7b9294..0a4b697 100644
index 12e0cca..34a6fba 100644
--- a/block/Makefile.objs
+++ b/block/Makefile.objs
@@ -21,6 +21,7 @@ block-obj-$(CONFIG_GLUSTERFS) += gluster.o
block-obj-$(CONFIG_ARCHIPELAGO) += archipelago.o
@@ -22,6 +22,7 @@ block-obj-$(CONFIG_ARCHIPELAGO) += archipelago.o
block-obj-$(CONFIG_LIBSSH2) += ssh.o
block-obj-y += accounting.o dirty-bitmap.o
block-obj-y += dictzip.o
+block-obj-y += tar.o
block-obj-y += accounting.o
block-obj-y += write-threshold.o
block-obj-y += crypto.o
diff --git a/block/tar.c b/block/tar.c
new file mode 100644
index 0000000..34dc57c
index 0000000..31da8b9
--- /dev/null
+++ b/block/tar.c
@@ -0,0 +1,368 @@
@@ -0,0 +1,370 @@
+/*
+ * Tar block driver
+ *
@ -85,6 +86,8 @@ index 0000000..34dc57c
+ * THE SOFTWARE.
+ */
+
+#include "qemu/osdep.h"
+#include "qapi/error.h"
+#include "qemu-common.h"
+#include "block/block_int.h"
+

View File

@ -1,4 +1,4 @@
From fc62b8b5778e4f68993b7a1a58a555838ec57b62 Mon Sep 17 00:00:00 2001
From 767cd48b2238291256b2cdf7ae7ba1112b256071 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Wed, 12 Dec 2012 19:11:30 +0100
Subject: [PATCH] Legacy Patch kvm-qemu-preXX-dictzip3.patch
@ -8,10 +8,10 @@ Subject: [PATCH] Legacy Patch kvm-qemu-preXX-dictzip3.patch
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/block/tar.c b/block/tar.c
index 34dc57c..cade8ab 100644
index 31da8b9..41620fd 100644
--- a/block/tar.c
+++ b/block/tar.c
@@ -71,7 +71,8 @@ static int str_ends(char *str, const char *end)
@@ -73,7 +73,8 @@ static int str_ends(char *str, const char *end)
return !strncmp(str + str_len - end_len, end, end_len);
}
@ -21,7 +21,7 @@ index 34dc57c..cade8ab 100644
{
int retval = 0;
@@ -87,10 +88,17 @@ static int is_target_file(BlockDriverState *bs, char *filename)
@@ -89,10 +90,17 @@ static int is_target_file(BlockDriverState *bs, char *filename)
if (str_ends(filename, ".vmdk"))
retval = 1;
@ -39,7 +39,7 @@ index 34dc57c..cade8ab 100644
return retval;
}
@@ -217,12 +225,13 @@ static int tar_open(BlockDriverState *bs, QDict *options, int flags, Error **err
@@ -219,12 +227,13 @@ static int tar_open(BlockDriverState *bs, QDict *options, int flags, Error **err
bdrv_pread(s->hd, header_offs - s->file_len, s->longfile,
sizeof(s->longfile));
s->longfile[sizeof(s->longfile)-1] = '\0';

View File

@ -1,4 +1,4 @@
From dff9e68c25df66cf1520415ea70f51c3068dc2c2 Mon Sep 17 00:00:00 2001
From e4f5122f79d8570c5e6e42b4207ae1b761e48901 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Mon, 6 Jun 2011 06:53:52 +0200
Subject: [PATCH] console: add question-mark escape operator
@ -16,10 +16,10 @@ Signed-off-by: Alexander Graf <agraf@suse.de>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui/console.c b/ui/console.c
index 745c354..d66a9ac 100644
index 1fd4ea4..fd3254a 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -855,7 +855,7 @@ static void console_putchar(QemuConsole *s, int ch)
@@ -868,7 +868,7 @@ static void console_putchar(QemuConsole *s, int ch)
} else {
if (s->nb_esc_params < MAX_ESC_PARAMS)
s->nb_esc_params++;

View File

@ -1,4 +1,4 @@
From 199c13d0611ca730dcba1784cd4d6da9172a5413 Mon Sep 17 00:00:00 2001
From c744f774b8399d42063b206a6f52a2450f6d7ed1 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Thu, 1 Apr 2010 17:36:23 +0200
Subject: [PATCH] Make char muxer more robust wrt small FIFOs
@ -22,10 +22,10 @@ This patch fixes input when using -nographic on s390 for me.
1 file changed, 16 insertions(+)
diff --git a/qemu-char.c b/qemu-char.c
index 2969c44..9a32d09 100644
index 270819a..4a550c1 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -381,6 +381,9 @@ typedef struct {
@@ -512,6 +512,9 @@ typedef struct {
IOEventHandler *chr_event[MAX_MUX];
void *ext_opaque[MAX_MUX];
CharDriverState *drv;
@ -35,7 +35,7 @@ index 2969c44..9a32d09 100644
int focus;
int mux_cnt;
int term_got_escape;
@@ -540,6 +543,15 @@ static void mux_chr_accept_input(CharDriverState *chr)
@@ -671,6 +674,15 @@ static void mux_chr_accept_input(CharDriverState *chr)
d->chr_read[m](d->ext_opaque[m],
&d->buffer[m][d->cons[m]++ & MUX_BUFFER_MASK], 1);
}
@ -51,7 +51,7 @@ index 2969c44..9a32d09 100644
}
static int mux_chr_can_read(void *opaque)
@@ -677,6 +689,10 @@ static CharDriverState *qemu_chr_open_mux(const char *id,
@@ -812,6 +824,10 @@ static CharDriverState *qemu_chr_open_mux(const char *id,
chr->opaque = d;
d->drv = drv;
d->focus = -1;

View File

@ -1,4 +1,4 @@
From 625b8744b9365a6aec0f5197f7cd5fdec9e9dd26 Mon Sep 17 00:00:00 2001
From 559e01a1b23a661ba9bf9da313018059e06d727a Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Thu, 13 Dec 2012 14:29:22 +0100
Subject: [PATCH] linux-user: lseek: explicitly cast non-set offsets to signed
@ -16,10 +16,10 @@ Signed-off-by: Alexander Graf <agraf@suse.de>
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 2db566c..d8837a0 100644
index 2048082..00c075d 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -6127,9 +6127,14 @@ abi_long do_syscall(void *cpu_env, int num, abi_ulong arg1,
@@ -6320,9 +6320,14 @@ abi_long do_syscall(void *cpu_env, int num, abi_ulong arg1,
case TARGET_NR_oldstat:
goto unimplemented;
#endif

View File

@ -1,4 +1,4 @@
From d426e2bf712d0393687782719b6dce20d7ef0e9f Mon Sep 17 00:00:00 2001
From 9327ff8f826f2edfe6f06f710155f7ed78d0f120 Mon Sep 17 00:00:00 2001
From: Bruce Rogers <brogers@suse.com>
Date: Thu, 16 May 2013 12:39:10 +0200
Subject: [PATCH] virtfs-proxy-helper: Provide __u64 for broken
@ -12,7 +12,7 @@ Fixes the build on SLE 11 SP2.
1 file changed, 7 insertions(+)
diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c
index ad1da0d..e6cabf0 100644
index 54f7ad1..b4bf2f4 100644
--- a/fsdev/virtfs-proxy-helper.c
+++ b/fsdev/virtfs-proxy-helper.c
@@ -9,6 +9,13 @@
@ -26,6 +26,6 @@ index ad1da0d..e6cabf0 100644
+#if defined(__powerpc64__)
+#include <asm/types.h>
+#endif
#include "qemu/osdep.h"
#include <sys/resource.h>
#include <getopt.h>
#include <syslog.h>

View File

@ -1,4 +1,4 @@
From e374ba1499f38700e88f30bb0a187b9c61768cca Mon Sep 17 00:00:00 2001
From 85122b0b5a7da0999de9f49d2fbce71c53a936ab Mon Sep 17 00:00:00 2001
From: Dinar Valeev <k0da@opensuse.org>
Date: Wed, 2 Oct 2013 17:56:03 +0200
Subject: [PATCH] configure: Enable PIE for ppc and ppc64 hosts
@ -14,10 +14,10 @@ Signed-off-by: Andreas Färber <afaerber@suse.de>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure b/configure
index b9552fd..da33d72 100755
index 5db29f0..0df3fc0 100755
--- a/configure
+++ b/configure
@@ -1560,7 +1560,7 @@ fi
@@ -1536,7 +1536,7 @@ fi
if test "$pie" = ""; then
case "$cpu-$targetos" in

View File

@ -1,4 +1,4 @@
From 0501fde012f0a5881d9b916e670f3c0518de5ceb Mon Sep 17 00:00:00 2001
From 9cbbe949157593297780361313478da4690bc35d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20F=C3=A4rber?= <afaerber@suse.de>
Date: Thu, 17 Apr 2014 18:39:10 +0200
Subject: [PATCH] qtest: Increase socket timeout
@ -14,10 +14,10 @@ Signed-off-by: Andreas Färber <afaerber@suse.de>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/libqtest.c b/tests/libqtest.c
index fa314e1..a57e114 100644
index b12a9e4..8de01c0 100644
--- a/tests/libqtest.c
+++ b/tests/libqtest.c
@@ -35,7 +35,7 @@
@@ -27,7 +27,7 @@
#include "qapi/qmp/qjson.h"
#define MAX_IRQ 256

View File

@ -1,4 +1,4 @@
From 6849a7c84a7f2639b0c72ddc6581ff9d4a1c23f7 Mon Sep 17 00:00:00 2001
From f3e402fec7044aa773f5f6ced1381d6eed7ed2ca Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Wed, 14 Jan 2015 01:32:11 +0100
Subject: [PATCH] AIO: Reduce number of threads for 32bit hosts
@ -21,7 +21,7 @@ Signed-off-by: Alexander Graf <agraf@suse.de>
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/thread-pool.c b/thread-pool.c
index 402c778..3d06c69 100644
index 03ba0b0..b5b4fd3 100644
--- a/thread-pool.c
+++ b/thread-pool.c
@@ -297,7 +297,12 @@ static void thread_pool_init_one(ThreadPool *pool, AioContext *ctx)

View File

@ -1,4 +1,4 @@
From 81b2f0411ac5660260d4d1b7ba527e969d5f9064 Mon Sep 17 00:00:00 2001
From dca270d601b43fe181da48f6b38b63f485634705 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20F=C3=A4rber?= <afaerber@suse.de>
Date: Tue, 14 Apr 2015 18:42:06 +0200
Subject: [PATCH] configure: Enable libseccomp for ppc
@ -14,10 +14,10 @@ Signed-off-by: Andreas Färber <afaerber@suse.de>
1 file changed, 3 insertions(+)
diff --git a/configure b/configure
index da33d72..d140392 100755
index 0df3fc0..81caff6 100755
--- a/configure
+++ b/configure
@@ -1910,6 +1910,9 @@ if test "$seccomp" != "no" ; then
@@ -1875,6 +1875,9 @@ if test "$seccomp" != "no" ; then
arm|aarch64)
libseccomp_minver="2.2.3"
;;

View File

@ -1,4 +1,4 @@
From 131c58925741584d7c0185aeba810d7be39f354c Mon Sep 17 00:00:00 2001
From 368cb4908724b4e855cb9bda37cb04284a39b116 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Mon, 15 Jun 2015 17:36:32 +0200
Subject: [PATCH] dictzip: Fix on big endian systems
@ -20,10 +20,10 @@ Signed-off-by: Andreas Färber <afaerber@suse.de>
1 file changed, 28 insertions(+), 22 deletions(-)
diff --git a/block/dictzip.c b/block/dictzip.c
index 728d5b4..83484fd 100644
index 717a7d3..1a104ac 100644
--- a/block/dictzip.c
+++ b/block/dictzip.c
@@ -154,6 +154,7 @@ static int dictzip_open(BlockDriverState *bs, QDict *options, int flags, Error *
@@ -156,6 +156,7 @@ static int dictzip_open(BlockDriverState *bs, QDict *options, int flags, Error *
uint8_t header_flags;
uint16_t chunk_len16;
uint16_t chunk_cnt16;
@ -31,7 +31,7 @@ index 728d5b4..83484fd 100644
uint16_t header_ver;
uint16_t tmp_short;
uint64_t offset;
@@ -253,11 +254,11 @@ static int dictzip_open(BlockDriverState *bs, QDict *options, int flags, Error *
@@ -255,11 +256,11 @@ static int dictzip_open(BlockDriverState *bs, QDict *options, int flags, Error *
break;
case 99: /* Special Alex pigz version */
/* number of chunks */
@ -46,7 +46,7 @@ index 728d5b4..83484fd 100644
/* chunk count */
if (bdrv_pread(s->hd, GZ_99_CHUNKCNT, &s->chunk_cnt, 4) != 4)
@@ -265,7 +266,7 @@ static int dictzip_open(BlockDriverState *bs, QDict *options, int flags, Error *
@@ -267,7 +268,7 @@ static int dictzip_open(BlockDriverState *bs, QDict *options, int flags, Error *
s->chunk_cnt = le32_to_cpu(s->chunk_cnt);
@ -55,7 +55,7 @@ index 728d5b4..83484fd 100644
/* file size */
if (bdrv_pread(s->hd, GZ_99_FILESIZE, &s->file_len, 8) != 8)
@@ -336,14 +337,14 @@ static int dictzip_open(BlockDriverState *bs, QDict *options, int flags, Error *
@@ -338,14 +339,14 @@ static int dictzip_open(BlockDriverState *bs, QDict *options, int flags, Error *
s->offsets[i] = offset;
switch (header_ver) {
case 1:
@ -73,7 +73,7 @@ index 728d5b4..83484fd 100644
}
qemu_opts_del(opts);
@@ -377,10 +378,26 @@ static void dictzip_read_cb(void *opaque, int ret)
@@ -379,10 +380,26 @@ static void dictzip_read_cb(void *opaque, int ret)
struct BDRVDictZipState *s = acb->s;
uint8_t *buf;
DictCache *cache;
@ -101,7 +101,7 @@ index 728d5b4..83484fd 100644
/* uncompress the chunk */
acb->zStream->next_in = acb->gzipped;
acb->zStream->avail_in = acb->gz_len;
@@ -466,17 +483,6 @@ static BlockAIOCB *dictzip_aio_readv(BlockDriverState *bs,
@@ -468,17 +485,6 @@ static BlockAIOCB *dictzip_aio_readv(BlockDriverState *bs,
}
/* No cache, so let's decode */
@ -119,7 +119,7 @@ index 728d5b4..83484fd 100644
/* We need to read these chunks */
first_chunk = start / s->chunk_len;
first_offset = start - first_chunk * s->chunk_len;
@@ -486,9 +492,9 @@ static BlockAIOCB *dictzip_aio_readv(BlockDriverState *bs,
@@ -488,9 +494,9 @@ static BlockAIOCB *dictzip_aio_readv(BlockDriverState *bs,
gz_len = 0;
for (i = first_chunk; i <= last_chunk; i++) {
if (s->chunks32)
@ -131,7 +131,7 @@ index 728d5b4..83484fd 100644
}
gz_sector_num = gz_start / SECTOR_SIZE;
@@ -509,7 +515,7 @@ static BlockAIOCB *dictzip_aio_readv(BlockDriverState *bs,
@@ -511,7 +517,7 @@ static BlockAIOCB *dictzip_aio_readv(BlockDriverState *bs,
iov->iov_len = gz_nb_sectors * 512;
qemu_iovec_init_external(qiov_gz, iov, 1);

View File

@ -0,0 +1,56 @@
From 88f6de6e8b1f91c71e56fa8125cc6fae2b53e725 Mon Sep 17 00:00:00 2001
From: Olaf Hering <olaf@aepfle.de>
Date: Thu, 24 Mar 2016 14:32:39 +0100
Subject: [PATCH] block: split large discard requests from block frontend
Large discard requests lead to sign expansion errors in qemu.
Since there is no API to tell a guest about the limitations qmeu
has to split a large request itself.
[bsc#964427]
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
block/io.c | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/block/io.c b/block/io.c
index c4869b9..5b6ed58 100644
--- a/block/io.c
+++ b/block/io.c
@@ -2442,7 +2442,7 @@ static void coroutine_fn bdrv_discard_co_entry(void *opaque)
rwco->ret = bdrv_co_discard(rwco->bs, rwco->sector_num, rwco->nb_sectors);
}
-int coroutine_fn bdrv_co_discard(BlockDriverState *bs, int64_t sector_num,
+static int __bdrv_co_discard(BlockDriverState *bs, int64_t sector_num,
int nb_sectors)
{
BdrvTrackedRequest req;
@@ -2524,6 +2524,26 @@ out:
return ret;
}
+int coroutine_fn bdrv_co_discard(BlockDriverState *bs, int64_t sector_num,
+ int nb_sectors)
+{
+ int num, ret;
+ int limit = BDRV_REQUEST_MAX_SECTORS;
+ int remaining = nb_sectors;
+ int64_t sector_offset = sector_num;
+
+ do {
+ num = remaining > limit ? limit : remaining;
+ ret = __bdrv_co_discard(bs, sector_offset, num);
+ if (ret < 0)
+ break;
+ remaining -= num;
+ sector_offset += num;
+ } while (remaining > 0);
+
+ return ret;
+}
+
int bdrv_discard(BlockDriverState *bs, int64_t sector_num, int nb_sectors)
{
Coroutine *co;

View File

@ -0,0 +1,65 @@
From 60d2b636c7dda2b2161ea963836b91b4af47021a Mon Sep 17 00:00:00 2001
From: Bruce Rogers <brogers@suse.com>
Date: Wed, 9 Mar 2016 15:18:11 -0700
Subject: [PATCH] xen_disk: Add suse specific flush disable handling and map to
QEMU equiv
Add code to read the suse specific suse-diskcache-disable-flush flag out
of xenstore, and set the equivalent flag within QEMU.
Patch taken from Xen's patch queue, Olaf Hering being the original author.
[bsc#879425]
Signed-off-by: Bruce Rogers <brogers@suse.com>
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
hw/block/xen_disk.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/hw/block/xen_disk.c b/hw/block/xen_disk.c
index d4ce380..9100862 100644
--- a/hw/block/xen_disk.c
+++ b/hw/block/xen_disk.c
@@ -112,6 +112,7 @@ struct XenBlkDev {
int requests_inflight;
int requests_finished;
+ gboolean cache_unsafe;
/* Persistent grants extension */
gboolean feature_discard;
gboolean feature_persistent;
@@ -793,6 +794,16 @@ static void blk_parse_discard(struct XenBlkDev *blkdev)
}
}
+static void blk_parse_cache_unsafe(struct XenBlkDev *blkdev)
+{
+ int enable;
+
+ blkdev->cache_unsafe = false;
+
+ if (xenstore_read_be_int(&blkdev->xendev, "suse-diskcache-disable-flush", &enable) == 0)
+ blkdev->cache_unsafe = !!enable;
+}
+
static int blk_init(struct XenDevice *xendev)
{
struct XenBlkDev *blkdev = container_of(xendev, struct XenBlkDev, xendev);
@@ -864,6 +875,7 @@ static int blk_init(struct XenDevice *xendev)
xenstore_write_be_int(&blkdev->xendev, "info", info);
blk_parse_discard(blkdev);
+ blk_parse_cache_unsafe(blkdev);
g_free(directiosafe);
return 0;
@@ -906,6 +918,9 @@ static int blk_connect(struct XenDevice *xendev)
qflags |= BDRV_O_UNMAP;
}
+ if (blkdev->cache_unsafe)
+ qflags |= BDRV_O_NO_FLUSH;
+
/* init qemu block driver */
index = (blkdev->xendev.dev - 202 * 256) / 16;
blkdev->dinfo = drive_get(IF_XEN, 0, index);

View File

@ -0,0 +1,27 @@
From e226abc9168f54fb53edcc1537ce77fc92b9ff26 Mon Sep 17 00:00:00 2001
From: Bruce Rogers <brogers@suse.com>
Date: Thu, 31 Mar 2016 06:43:03 -0600
Subject: [PATCH] tests: Use correct config param for inclusion of
test-crypto-pbkdf test
It appears we have the wrong criteria for inclusion of the test-crypto-pbkdf
test. Fix to use CONFIG_NETTLE_KDF instead of CONFIG_NETTLE.
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
tests/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/Makefile b/tests/Makefile
index 45b9048..651d8b2 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -92,7 +92,7 @@ check-unit-$(CONFIG_GNUTLS) += tests/test-io-channel-tls$(EXESUF)
check-unit-y += tests/test-io-channel-command$(EXESUF)
check-unit-y += tests/test-io-channel-buffer$(EXESUF)
check-unit-y += tests/test-base64$(EXESUF)
-check-unit-$(if $(CONFIG_NETTLE),y,$(CONFIG_GCRYPT_KDF)) += tests/test-crypto-pbkdf$(EXESUF)
+check-unit-$(if $(CONFIG_NETTLE_KDF),y,$(CONFIG_GCRYPT_KDF)) += tests/test-crypto-pbkdf$(EXESUF)
check-unit-y += tests/test-crypto-ivgen$(EXESUF)
check-unit-y += tests/test-crypto-afsplit$(EXESUF)
check-unit-y += tests/test-crypto-xts$(EXESUF)

View File

@ -0,0 +1,53 @@
From 014f615b4a8e48ab8b9630b297e1e4283c9de623 Mon Sep 17 00:00:00 2001
From: Olaf Hering <olaf@aepfle.de>
Date: Fri, 1 Apr 2016 12:27:16 +0200
Subject: [PATCH] build: link with libatomic on powerpc-linux
Building on powerpc-linux fails with undefined reference to
__atomic_load_8 in icount_warp_rt(). Force linking to -latomic.
Fixes a0aa44b ("include/qemu/atomic.h: default to __atomic functions")
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
configure | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/configure b/configure
index 81caff6..2589044 100755
--- a/configure
+++ b/configure
@@ -4025,6 +4025,33 @@ if test "$usb_redir" != "no" ; then
fi
fi
+if test "$linux_user" = "no" -a "$cpu" = "ppc" -a "$targetos" = "Linux" ; then
+ # Do we need libm
+ cat > $TMPC << EOF
+ #include <unistd.h>
+ #include <stdint.h>
+ #include <qemu/atomic.h>
+ int64_t val;
+ int main(int argc, char **argv)
+ {
+ val = (int64_t)read(0, NULL, 0);
+ if (atomic_read(&val) == -1) {
+ return 0;
+ }
+ return 1;
+ }
+EOF
+ if compile_prog "-Iinclude" "" ; then
+ :
+ echo "No need to link with -latomic on powerpc-linux"
+ elif compile_prog "-Iinclude" "-latomic" ; then
+ echo "Link with -latomic on powerpc-linux"
+ libs_softmmu="$libs_softmmu -latomic"
+ else
+ error_exit "libatomic check failed"
+ fi
+fi
+
##########################################
# check if we have VSS SDK headers for win

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3443887401619fe33bfa5d900a4f2d6a79425ae2b7e43d5b8c36eb7a683772d4
size 25464996

Binary file not shown.

3
qemu-2.6.0-rc0.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9eb223cb01207e8f1130f05af627e2708311db8322fec066b97d94c749c2315c
size 25761212

BIN
qemu-2.6.0-rc0.tar.bz2.sig Normal file

Binary file not shown.

View File

@ -1,3 +1,20 @@
-------------------------------------------------------------------
Fri Apr 1 11:13:07 UTC 2016 - olaf@aepfle.de
- 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
-------------------------------------------------------------------
Fri Jan 8 14:54:26 UTC 2016 - afaerber@suse.de

View File

@ -21,9 +21,9 @@ Url: http://www.qemu.org/
Summary: Universal CPU emulator
License: BSD-3-Clause and GPL-2.0 and GPL-2.0+ and LGPL-2.1+ and MIT
Group: System/Emulators/PC
Version: 2.5.0
Version: 2.5.90
Release: 0
Source: http://wiki.qemu.org/download/qemu-2.5.0.tar.bz2
Source: http://wiki.qemu.org/download/qemu-2.6.0-rc0.tar.bz2
# This patch queue is auto-generated from https://github.com/openSUSE/qemu
Patch0001: 0001-XXX-dont-dump-core-on-sigabort.patch
Patch0002: 0002-XXX-work-around-SA_RESTART-race-wit.patch
@ -63,6 +63,10 @@ Patch0035: 0035-qtest-Increase-socket-timeout.patch
Patch0036: 0036-AIO-Reduce-number-of-threads-for-32.patch
Patch0037: 0037-configure-Enable-libseccomp-for-ppc.patch
Patch0038: 0038-dictzip-Fix-on-big-endian-systems.patch
Patch0039: 0039-block-split-large-discard-requests-.patch
Patch0040: 0040-xen_disk-Add-suse-specific-flush-di.patch
Patch0041: 0041-tests-Use-correct-config-param-for-.patch
Patch0042: 0042-build-link-with-libatomic-on-powerp.patch
# Please do not add patches manually here, run update_git.sh.
# this is to make lint happy
Source300: qemu-rpmlintrc
@ -115,7 +119,7 @@ emulations. This can be used together with the OBS build script to
run cross-architecture builds.
%prep
%setup -q -n qemu-2.5.0
%setup -q -n qemu-2.6.0-rc0
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
@ -154,6 +158,10 @@ run cross-architecture builds.
%patch0036 -p1
%patch0037 -p1
%patch0038 -p1
%patch0039 -p1
%patch0040 -p1
%patch0041 -p1
%patch0042 -p1
%build
./configure --prefix=%_prefix --sysconfdir=%_sysconfdir \

View File

@ -23,7 +23,7 @@ License: BSD-3-Clause and GPL-2.0 and GPL-2.0+ and LGPL-2.1+ and MIT
Group: System/Emulators/PC
QEMU_VERSION
Release: 0
Source: http://wiki.qemu.org/download/qemu-2.5.0.tar.bz2
Source: http://wiki.qemu.org/download/qemu-2.6.0-rc0.tar.bz2
# This patch queue is auto-generated from https://github.com/openSUSE/qemu
PATCH_FILES
# Please do not add patches manually here, run update_git.sh.
@ -78,7 +78,7 @@ emulations. This can be used together with the OBS build script to
run cross-architecture builds.
%prep
%setup -q -n qemu-2.5.0
%setup -q -n qemu-2.6.0-rc0
PATCH_EXEC
%build

View File

@ -1,3 +1,20 @@
-------------------------------------------------------------------
Fri Apr 1 11:13:07 UTC 2016 - olaf@aepfle.de
- 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
-------------------------------------------------------------------
Tue Feb 9 17:08:21 UTC 2016 - afaerber@suse.de

View File

@ -51,10 +51,10 @@ Url: http://www.qemu.org/
Summary: Universal CPU emulator
License: BSD-3-Clause and GPL-2.0 and GPL-2.0+ and LGPL-2.1+ and MIT
Group: System/Emulators/PC
Version: 2.5.0
Version: 2.5.90
Release: 0
Source: http://wiki.qemu.org/download/qemu-2.5.0.tar.bz2
Source99: http://wiki.qemu.org/download/qemu-2.5.0.tar.bz2.sig
Source: http://wiki.qemu.org/download/qemu-2.6.0-rc0.tar.bz2
Source99: http://wiki.qemu.org/download/qemu-2.6.0-rc0.tar.bz2.sig
Source1: 80-kvm.rules
Source2: qemu-ifup
Source3: kvm_stat
@ -104,6 +104,10 @@ Patch0035: 0035-qtest-Increase-socket-timeout.patch
Patch0036: 0036-AIO-Reduce-number-of-threads-for-32.patch
Patch0037: 0037-configure-Enable-libseccomp-for-ppc.patch
Patch0038: 0038-dictzip-Fix-on-big-endian-systems.patch
Patch0039: 0039-block-split-large-discard-requests-.patch
Patch0040: 0040-xen_disk-Add-suse-specific-flush-di.patch
Patch0041: 0041-tests-Use-correct-config-param-for-.patch
Patch0042: 0042-build-link-with-libatomic-on-powerp.patch
# Please do not add QEMU patches manually here.
# Run update_git.sh to regenerate this queue.
@ -111,9 +115,6 @@ Patch0038: 0038-dictzip-Fix-on-big-endian-systems.patch
%if %{build_x86_fw_from_source}
# PATCH-FIX-OPENSUSE seabios_128kb.patch brogers@suse.com -- make it fit
Patch1000: seabios_128kb.patch
# PATCH-FIX-UPSTREAM seabios_checkrom_typo.patch afaerber@suse.de -- tidy error message
Patch1001: seabios_checkrom_typo.patch
Patch1002: seabios_avoid_smbios_signature_string.patch
%endif
# this is to make lint happy
@ -279,8 +280,8 @@ Suggests: qemu-lang
Recommends: qemu-ksm = %{version}
%endif
%define built_firmware_files {acpi-dsdt.aml bios.bin bios-256k.bin \
q35-acpi-dsdt.aml sgabios.bin vgabios.bin vgabios-cirrus.bin \
%define built_firmware_files {bios.bin bios-256k.bin \
sgabios.bin vgabios.bin vgabios-cirrus.bin \
vgabios-stdvga.bin vgabios-virtio.bin vgabios-vmware.bin vgabios-qxl.bin \
optionrom/linuxboot.bin optionrom/multiboot.bin optionrom/kvmvapic.bin \
pxe-e1000.rom pxe-pcnet.rom pxe-ne2k_pci.rom pxe-rtl8139.rom pxe-eepro100.rom pxe-virtio.rom}
@ -518,7 +519,7 @@ This sub-package contains the guest agent.
%package seabios
Summary: X86 BIOS for QEMU
Group: System/Emulators/PC
Version: 1.8.2
Version: 1.9.1
Release: 0
%if 0%{?suse_version} > %{noarch_supported}
BuildArch: noarch
@ -532,7 +533,7 @@ is the default BIOS for QEMU.
%package vgabios
Summary: VGA BIOSes for QEMU
Group: System/Emulators/PC
Version: 1.8.2
Version: 1.9.1
Release: 0
%if 0%{?suse_version} > %{noarch_supported}
BuildArch: noarch
@ -589,7 +590,7 @@ This package provides a service file for starting and stopping KSM.
%endif # !qemu-testsuite
%prep
%setup -q -n qemu-2.5.0
%setup -q -n qemu-2.6.0-rc0
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
@ -628,12 +629,14 @@ This package provides a service file for starting and stopping KSM.
%patch0036 -p1
%patch0037 -p1
%patch0038 -p1
%patch0039 -p1
%patch0040 -p1
%patch0041 -p1
%patch0042 -p1
%if %{build_x86_fw_from_source}
pushd roms/seabios
%patch1000 -p1
%patch1001 -p1
%patch1002 -p1
popd
# as a safeguard, delete the firmware files that we intend to build
@ -648,12 +651,13 @@ rm -f pc-bios/slof.bin
%endif
%build
./configure --prefix=%_prefix --sysconfdir=%_sysconfdir \
./configure \
--prefix=%_prefix \
--sysconfdir=%_sysconfdir \
--libdir=%_libdir \
--libexecdir=%_libexecdir \
--localstatedir=%_localstatedir \
--extra-cflags="%{optflags}" \
--disable-strip \
--enable-system --disable-linux-user \
--enable-tools --enable-guest-agent \
--enable-modules \
@ -778,9 +782,12 @@ rm -f pc-bios/slof.bin
%ifarch x86_64
--enable-xen \
--enable-xen-pci-passthrough \
--enable-xen-pv-domain-build \
%else
--disable-xen \
%endif
\
--disable-strip
%if "%{name}" != "qemu-testsuite"
@ -788,13 +795,13 @@ make %{?_smp_mflags} V=1
# Firmware
%if %{build_x86_fw_from_source}
make -C roms bios
make -C roms seavgabios
make -C roms pxerom
make -C roms sgabios
make %{?_smp_mflags} -C roms bios
make %{?_smp_mflags} -C roms seavgabios
make %{?_smp_mflags} -C roms pxerom
make -C roms sgabios
%endif
%if %{build_slof_from_source}
make -C roms slof
make %{?_smp_mflags} -C roms slof
%endif
%ifarch s390x
cp pc-bios/s390-ccw/s390-ccw.img pc-bios/s390-ccw.img
@ -869,7 +876,7 @@ format=`qemu-img info test.tar | grep "file format:" | cut -d ':' -f 2 | tr -d '
make install DESTDIR=$RPM_BUILD_ROOT
rm -fr $RPM_BUILD_ROOT/%_datadir/doc
%if ! %{build_x86_fw_from_source}
for f in acpi-dsdt.aml q35-acpi-dsdt.aml bios-256k.bin bios.bin efi-*.rom pxe-*.rom sgabios.bin \
for f in acpi-dsdt.aml bios-256k.bin bios.bin efi-*.rom pxe-*.rom sgabios.bin \
vgabios-cirrus.bin vgabios-qxl.bin vgabios-stdvga.bin vgabios-virtio.bin vgabios-vmware.bin \
vgabios.bin; do
rm $RPM_BUILD_ROOT/%_datadir/%name/$f
@ -1026,7 +1033,6 @@ fi
%files s390
%defattr(-, root, root)
%_bindir/qemu-system-s390x
%_datadir/%name/s390-zipl.rom
%_datadir/%name/s390-ccw.img
%files arm
@ -1101,7 +1107,6 @@ fi
%_datadir/%name/bios.bin
%_datadir/%name/bios-256k.bin
%_datadir/%name/acpi-dsdt.aml
%_datadir/%name/q35-acpi-dsdt.aml
%files vgabios
%defattr(-, root, root)

View File

@ -1,3 +1,20 @@
-------------------------------------------------------------------
Fri Apr 1 11:13:07 UTC 2016 - olaf@aepfle.de
- 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
-------------------------------------------------------------------
Tue Feb 9 17:08:21 UTC 2016 - afaerber@suse.de

View File

@ -51,10 +51,10 @@ Url: http://www.qemu.org/
Summary: Universal CPU emulator
License: BSD-3-Clause and GPL-2.0 and GPL-2.0+ and LGPL-2.1+ and MIT
Group: System/Emulators/PC
Version: 2.5.0
Version: 2.5.90
Release: 0
Source: http://wiki.qemu.org/download/qemu-2.5.0.tar.bz2
Source99: http://wiki.qemu.org/download/qemu-2.5.0.tar.bz2.sig
Source: http://wiki.qemu.org/download/qemu-2.6.0-rc0.tar.bz2
Source99: http://wiki.qemu.org/download/qemu-2.6.0-rc0.tar.bz2.sig
Source1: 80-kvm.rules
Source2: qemu-ifup
Source3: kvm_stat
@ -104,6 +104,10 @@ Patch0035: 0035-qtest-Increase-socket-timeout.patch
Patch0036: 0036-AIO-Reduce-number-of-threads-for-32.patch
Patch0037: 0037-configure-Enable-libseccomp-for-ppc.patch
Patch0038: 0038-dictzip-Fix-on-big-endian-systems.patch
Patch0039: 0039-block-split-large-discard-requests-.patch
Patch0040: 0040-xen_disk-Add-suse-specific-flush-di.patch
Patch0041: 0041-tests-Use-correct-config-param-for-.patch
Patch0042: 0042-build-link-with-libatomic-on-powerp.patch
# Please do not add QEMU patches manually here.
# Run update_git.sh to regenerate this queue.
@ -111,9 +115,6 @@ Patch0038: 0038-dictzip-Fix-on-big-endian-systems.patch
%if %{build_x86_fw_from_source}
# PATCH-FIX-OPENSUSE seabios_128kb.patch brogers@suse.com -- make it fit
Patch1000: seabios_128kb.patch
# PATCH-FIX-UPSTREAM seabios_checkrom_typo.patch afaerber@suse.de -- tidy error message
Patch1001: seabios_checkrom_typo.patch
Patch1002: seabios_avoid_smbios_signature_string.patch
%endif
# this is to make lint happy
@ -279,8 +280,8 @@ Suggests: qemu-lang
Recommends: qemu-ksm = %{version}
%endif
%define built_firmware_files {acpi-dsdt.aml bios.bin bios-256k.bin \
q35-acpi-dsdt.aml sgabios.bin vgabios.bin vgabios-cirrus.bin \
%define built_firmware_files {bios.bin bios-256k.bin \
sgabios.bin vgabios.bin vgabios-cirrus.bin \
vgabios-stdvga.bin vgabios-virtio.bin vgabios-vmware.bin vgabios-qxl.bin \
optionrom/linuxboot.bin optionrom/multiboot.bin optionrom/kvmvapic.bin \
pxe-e1000.rom pxe-pcnet.rom pxe-ne2k_pci.rom pxe-rtl8139.rom pxe-eepro100.rom pxe-virtio.rom}
@ -518,7 +519,7 @@ This sub-package contains the guest agent.
%package seabios
Summary: X86 BIOS for QEMU
Group: System/Emulators/PC
Version: 1.8.2
Version: 1.9.1
Release: 0
%if 0%{?suse_version} > %{noarch_supported}
BuildArch: noarch
@ -532,7 +533,7 @@ is the default BIOS for QEMU.
%package vgabios
Summary: VGA BIOSes for QEMU
Group: System/Emulators/PC
Version: 1.8.2
Version: 1.9.1
Release: 0
%if 0%{?suse_version} > %{noarch_supported}
BuildArch: noarch
@ -589,7 +590,7 @@ This package provides a service file for starting and stopping KSM.
%endif # !qemu-testsuite
%prep
%setup -q -n qemu-2.5.0
%setup -q -n qemu-2.6.0-rc0
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
@ -628,12 +629,14 @@ This package provides a service file for starting and stopping KSM.
%patch0036 -p1
%patch0037 -p1
%patch0038 -p1
%patch0039 -p1
%patch0040 -p1
%patch0041 -p1
%patch0042 -p1
%if %{build_x86_fw_from_source}
pushd roms/seabios
%patch1000 -p1
%patch1001 -p1
%patch1002 -p1
popd
# as a safeguard, delete the firmware files that we intend to build
@ -648,12 +651,13 @@ rm -f pc-bios/slof.bin
%endif
%build
./configure --prefix=%_prefix --sysconfdir=%_sysconfdir \
./configure \
--prefix=%_prefix \
--sysconfdir=%_sysconfdir \
--libdir=%_libdir \
--libexecdir=%_libexecdir \
--localstatedir=%_localstatedir \
--extra-cflags="%{optflags}" \
--disable-strip \
--enable-system --disable-linux-user \
--enable-tools --enable-guest-agent \
--enable-modules \
@ -778,9 +782,12 @@ rm -f pc-bios/slof.bin
%ifarch x86_64
--enable-xen \
--enable-xen-pci-passthrough \
--enable-xen-pv-domain-build \
%else
--disable-xen \
%endif
\
--disable-strip
%if "%{name}" != "qemu-testsuite"
@ -788,13 +795,13 @@ make %{?_smp_mflags} V=1
# Firmware
%if %{build_x86_fw_from_source}
make -C roms bios
make -C roms seavgabios
make -C roms pxerom
make -C roms sgabios
make %{?_smp_mflags} -C roms bios
make %{?_smp_mflags} -C roms seavgabios
make %{?_smp_mflags} -C roms pxerom
make -C roms sgabios
%endif
%if %{build_slof_from_source}
make -C roms slof
make %{?_smp_mflags} -C roms slof
%endif
%ifarch s390x
cp pc-bios/s390-ccw/s390-ccw.img pc-bios/s390-ccw.img
@ -869,7 +876,7 @@ format=`qemu-img info test.tar | grep "file format:" | cut -d ':' -f 2 | tr -d '
make install DESTDIR=$RPM_BUILD_ROOT
rm -fr $RPM_BUILD_ROOT/%_datadir/doc
%if ! %{build_x86_fw_from_source}
for f in acpi-dsdt.aml q35-acpi-dsdt.aml bios-256k.bin bios.bin efi-*.rom pxe-*.rom sgabios.bin \
for f in acpi-dsdt.aml bios-256k.bin bios.bin efi-*.rom pxe-*.rom sgabios.bin \
vgabios-cirrus.bin vgabios-qxl.bin vgabios-stdvga.bin vgabios-virtio.bin vgabios-vmware.bin \
vgabios.bin; do
rm $RPM_BUILD_ROOT/%_datadir/%name/$f
@ -1026,7 +1033,6 @@ fi
%files s390
%defattr(-, root, root)
%_bindir/qemu-system-s390x
%_datadir/%name/s390-zipl.rom
%_datadir/%name/s390-ccw.img
%files arm
@ -1101,7 +1107,6 @@ fi
%_datadir/%name/bios.bin
%_datadir/%name/bios-256k.bin
%_datadir/%name/acpi-dsdt.aml
%_datadir/%name/q35-acpi-dsdt.aml
%files vgabios
%defattr(-, root, root)

View File

@ -53,8 +53,8 @@ License: BSD-3-Clause and GPL-2.0 and GPL-2.0+ and LGPL-2.1+ and MIT
Group: System/Emulators/PC
QEMU_VERSION
Release: 0
Source: http://wiki.qemu.org/download/qemu-2.5.0.tar.bz2
Source99: http://wiki.qemu.org/download/qemu-2.5.0.tar.bz2.sig
Source: http://wiki.qemu.org/download/qemu-2.6.0-rc0.tar.bz2
Source99: http://wiki.qemu.org/download/qemu-2.6.0-rc0.tar.bz2.sig
Source1: 80-kvm.rules
Source2: qemu-ifup
Source3: kvm_stat
@ -74,9 +74,6 @@ PATCH_FILES
%if %{build_x86_fw_from_source}
# PATCH-FIX-OPENSUSE seabios_128kb.patch brogers@suse.com -- make it fit
Patch1000: seabios_128kb.patch
# PATCH-FIX-UPSTREAM seabios_checkrom_typo.patch afaerber@suse.de -- tidy error message
Patch1001: seabios_checkrom_typo.patch
Patch1002: seabios_avoid_smbios_signature_string.patch
%endif
# this is to make lint happy
@ -242,8 +239,8 @@ Suggests: qemu-lang
Recommends: qemu-ksm = %{version}
%endif
%define built_firmware_files {acpi-dsdt.aml bios.bin bios-256k.bin \
q35-acpi-dsdt.aml sgabios.bin vgabios.bin vgabios-cirrus.bin \
%define built_firmware_files {bios.bin bios-256k.bin \
sgabios.bin vgabios.bin vgabios-cirrus.bin \
vgabios-stdvga.bin vgabios-virtio.bin vgabios-vmware.bin vgabios-qxl.bin \
optionrom/linuxboot.bin optionrom/multiboot.bin optionrom/kvmvapic.bin \
pxe-e1000.rom pxe-pcnet.rom pxe-ne2k_pci.rom pxe-rtl8139.rom pxe-eepro100.rom pxe-virtio.rom}
@ -552,14 +549,12 @@ This package provides a service file for starting and stopping KSM.
%endif # !qemu-testsuite
%prep
%setup -q -n qemu-2.5.0
%setup -q -n qemu-2.6.0-rc0
PATCH_EXEC
%if %{build_x86_fw_from_source}
pushd roms/seabios
%patch1000 -p1
%patch1001 -p1
%patch1002 -p1
popd
# as a safeguard, delete the firmware files that we intend to build
@ -574,12 +569,13 @@ rm -f pc-bios/slof.bin
%endif
%build
./configure --prefix=%_prefix --sysconfdir=%_sysconfdir \
./configure \
--prefix=%_prefix \
--sysconfdir=%_sysconfdir \
--libdir=%_libdir \
--libexecdir=%_libexecdir \
--localstatedir=%_localstatedir \
--extra-cflags="%{optflags}" \
--disable-strip \
--enable-system --disable-linux-user \
--enable-tools --enable-guest-agent \
--enable-modules \
@ -704,9 +700,12 @@ rm -f pc-bios/slof.bin
%ifarch x86_64
--enable-xen \
--enable-xen-pci-passthrough \
--enable-xen-pv-domain-build \
%else
--disable-xen \
%endif
\
--disable-strip
%if "%{name}" != "qemu-testsuite"
@ -714,13 +713,13 @@ make %{?_smp_mflags} V=1
# Firmware
%if %{build_x86_fw_from_source}
make -C roms bios
make -C roms seavgabios
make -C roms pxerom
make -C roms sgabios
make %{?_smp_mflags} -C roms bios
make %{?_smp_mflags} -C roms seavgabios
make %{?_smp_mflags} -C roms pxerom
make -C roms sgabios
%endif
%if %{build_slof_from_source}
make -C roms slof
make %{?_smp_mflags} -C roms slof
%endif
%ifarch s390x
cp pc-bios/s390-ccw/s390-ccw.img pc-bios/s390-ccw.img
@ -795,7 +794,7 @@ format=`qemu-img info test.tar | grep "file format:" | cut -d ':' -f 2 | tr -d '
make install DESTDIR=$RPM_BUILD_ROOT
rm -fr $RPM_BUILD_ROOT/%_datadir/doc
%if ! %{build_x86_fw_from_source}
for f in acpi-dsdt.aml q35-acpi-dsdt.aml bios-256k.bin bios.bin efi-*.rom pxe-*.rom sgabios.bin \
for f in acpi-dsdt.aml bios-256k.bin bios.bin efi-*.rom pxe-*.rom sgabios.bin \
vgabios-cirrus.bin vgabios-qxl.bin vgabios-stdvga.bin vgabios-virtio.bin vgabios-vmware.bin \
vgabios.bin; do
rm $RPM_BUILD_ROOT/%_datadir/%name/$f
@ -953,7 +952,6 @@ fi
%files s390
%defattr(-, root, root)
%_bindir/qemu-system-s390x
%_datadir/%name/s390-zipl.rom
%_datadir/%name/s390-ccw.img
%files arm
@ -1028,7 +1026,6 @@ fi
%_datadir/%name/bios.bin
%_datadir/%name/bios-256k.bin
%_datadir/%name/acpi-dsdt.aml
%_datadir/%name/q35-acpi-dsdt.aml
%files vgabios
%defattr(-, root, root)

View File

@ -1,70 +0,0 @@
From 9d3c06336ec443b6763c92f929013afcfce70c4a Mon Sep 17 00:00:00 2001
From: Kevin O'Connor <kevin@koconnor.net>
Date: Thu, 9 Apr 2015 11:57:44 -0400
Subject: [PATCH] smbios: Use integer signature instead of string signature
Change the smbios structure to use a 4 byte u32 signature field
instead of a 4 byte character string field. In practice, this allows
the compiler to place the signature in the initialize code segment and
thus makes it less likely the signature would be found in the
f-segment. (If the smbios signature is found in the f-segment it can
confuse some table scans.)
Reviewed-by: Bruce Rogers <brogers@suse.com>
Tested-by: Bruce Rogers <brogers@suse.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
src/fw/biostables.c | 2 +-
src/fw/smbios.c | 2 +-
src/std/smbios.h | 4 +++-
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/fw/biostables.c b/src/fw/biostables.c
index 50a891b..450aca2 100644
--- a/src/fw/biostables.c
+++ b/src/fw/biostables.c
@@ -271,7 +271,7 @@ copy_smbios(void *pos)
if (SMBiosAddr)
return;
struct smbios_entry_point *p = pos;
- if (memcmp(p->anchor_string, "_SM_", 4))
+ if (p->signature != SMBIOS_SIGNATURE)
return;
if (checksum(pos, 0x10) != 0)
return;
diff --git a/src/fw/smbios.c b/src/fw/smbios.c
index dba0541..f3b5ad9 100644
--- a/src/fw/smbios.c
+++ b/src/fw/smbios.c
@@ -37,7 +37,7 @@ smbios_entry_point_setup(u16 max_structure_size,
struct smbios_entry_point ep;
memset(&ep, 0, sizeof(ep));
- memcpy(ep.anchor_string, "_SM_", 4);
+ ep.signature = SMBIOS_SIGNATURE;
ep.length = 0x1f;
ep.smbios_major_version = 2;
ep.smbios_minor_version = 4;
diff --git a/src/std/smbios.h b/src/std/smbios.h
index 0513716..4ccf2ea 100644
--- a/src/std/smbios.h
+++ b/src/std/smbios.h
@@ -3,11 +3,13 @@
#include "types.h" // u32
+#define SMBIOS_SIGNATURE 0x5f4d535f // "_SM_"
+
/* SMBIOS entry point -- must be written to a 16-bit aligned address
between 0xf0000 and 0xfffff.
*/
struct smbios_entry_point {
- char anchor_string[4];
+ u32 signature;
u8 checksum;
u8 length;
u8 smbios_major_version;
--
2.1.4

View File

@ -1,32 +0,0 @@
From 6b0e2bd9d914f6421c015ec28d96cf069fb8015f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20F=C3=A4rber?= <afaerber@suse.de>
Date: Thu, 19 Mar 2015 17:13:00 +0100
Subject: [PATCH] checkrom: Fix typo in error message
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
increate -> increase
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
scripts/checkrom.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/checkrom.py b/scripts/checkrom.py
index 377277d..aced5e2 100755
--- a/scripts/checkrom.py
+++ b/scripts/checkrom.py
@@ -39,7 +39,7 @@ def main():
finalsize = 256*1024
if datasize > finalsize:
print("Error! ROM doesn't fit (%d > %d)" % (datasize, finalsize))
- print(" You have to either increate the size (CONFIG_ROM_SIZE)")
+ print(" You have to either increase the size (CONFIG_ROM_SIZE)")
print(" or turn off some features (such as hardware support not")
print(" needed) to make it fit. Trying a more recent gcc version")
print(" might work too.")
--
2.1.4

View File

@ -11,8 +11,8 @@
GIT_TREE=git://github.com/openSUSE/qemu.git
GIT_LOCAL_TREE=~/git/qemu-opensuse
GIT_BRANCH=opensuse-2.5
GIT_UPSTREAM_TAG=v2.5.0
GIT_BRANCH=opensuse-2.6
GIT_UPSTREAM_TAG=v2.6.0-rc0
GIT_DIR=/dev/shm/qemu-factory-git-dir
CMP_DIR=/dev/shm/qemu-factory-cmp-dir