SHA256
1
0
forked from pool/qemu

Accepting request 131113 from home:a_faerber:branches:Virtualization

Update to v1.2.0-rc0

OBS-URL: https://build.opensuse.org/request/show/131113
OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=100
This commit is contained in:
Andreas Färber 2012-08-17 16:42:52 +00:00 committed by Git OBS Bridge
parent bcf501adc3
commit ab2cebff17
37 changed files with 258 additions and 388 deletions

View File

@ -1,4 +1,4 @@
From f83a3e6ff4aeb7ec2ff75afd64625e7915ef758a Mon Sep 17 00:00:00 2001
From 9763d20d318638573f7633637f1c5ff96a0e62a3 Mon Sep 17 00:00:00 2001
From: Peter Maydell <peter.maydell@linaro.org>
Date: Wed, 5 Oct 2011 10:04:02 +0100
Subject: [PATCH] Handle CPU interrupts by inline checking of a flag
@ -32,10 +32,10 @@ hit is, which I never got round to. Feel free to do some :-)
6 files changed, 60 insertions(+), 3 deletions(-)
diff --git a/cpu-exec.c b/cpu-exec.c
index 0344cd5..0547f2d 100644
index 134b3c4..e90ea29 100644
--- a/cpu-exec.c
+++ b/cpu-exec.c
@@ -563,7 +563,16 @@ int cpu_exec(CPUArchState *env)
@@ -599,7 +599,16 @@ int cpu_exec(CPUArchState *env)
tc_ptr = tb->tc_ptr;
/* execute the generated code */
next_tb = tcg_qemu_tb_exec(env, tc_ptr);
@ -54,7 +54,7 @@ index 0344cd5..0547f2d 100644
int insns_left;
tb = (TranslationBlock *)(next_tb & ~3);
diff --git a/exec.c b/exec.c
index a0494c7..21fce4e 100644
index 5834766..9cbdc35 100644
--- a/exec.c
+++ b/exec.c
@@ -130,6 +130,8 @@ DEFINE_TLS(CPUArchState *,cpu_single_env);
@ -66,7 +66,7 @@ index a0494c7..21fce4e 100644
typedef struct PageDesc {
/* list of TBs intersecting this ram page */
@@ -1755,7 +1757,13 @@ static void tcg_handle_interrupt(CPUArchState *env, int mask)
@@ -1708,7 +1710,13 @@ static void tcg_handle_interrupt(CPUArchState *env, int mask)
cpu_abort(env, "Raised interrupt while not in I/O function");
}
} else {
@ -81,7 +81,7 @@ index a0494c7..21fce4e 100644
}
}
@@ -1778,7 +1786,9 @@ void cpu_reset_interrupt(CPUArchState *env, int mask)
@@ -1731,7 +1739,9 @@ void cpu_reset_interrupt(CPUArchState *env, int mask)
void cpu_exit(CPUArchState *env)
{
env->exit_request = 1;
@ -91,7 +91,7 @@ index a0494c7..21fce4e 100644
+ }
}
const CPULogItem cpu_log_items[] = {
void cpu_abort(CPUArchState *env, const char *fmt, ...)
diff --git a/gen-icount.h b/gen-icount.h
index 430cb44..65a75d9 100644
--- a/gen-icount.h
@ -134,7 +134,7 @@ index 430cb44..65a75d9 100644
*icount_arg = num_insns;
gen_set_label(icount_label);
diff --git a/linux-user/main.c b/linux-user/main.c
index 191b750..dd340b2 100644
index 7dea084..d9814bc4 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -64,6 +64,7 @@ unsigned long reserved_va;
@ -145,7 +145,7 @@ index 191b750..dd340b2 100644
static const char *interp_prefix = CONFIG_QEMU_INTERP_PREFIX;
const char *qemu_uname_release = CONFIG_UNAME_RELEASE;
@@ -3107,6 +3108,11 @@ static void handle_arg_reserved_va(const char *arg)
@@ -3196,6 +3197,11 @@ static void handle_arg_reserved_va(const char *arg)
}
#endif
@ -157,7 +157,7 @@ index 191b750..dd340b2 100644
static void handle_arg_singlestep(const char *arg)
{
singlestep = 1;
@@ -3162,6 +3168,8 @@ struct qemu_argument arg_table[] = {
@@ -3251,6 +3257,8 @@ struct qemu_argument arg_table[] = {
"options", "activate log"},
{"D", "QEMU_LOG_FILENAME", true, handle_arg_log_filename,
"logfile", "override default logfile location"},
@ -167,10 +167,10 @@ index 191b750..dd340b2 100644
"pagesize", "set the host page size to 'pagesize'"},
{"singlestep", "QEMU_SINGLESTEP", false, handle_arg_singlestep,
diff --git a/qemu-options.hx b/qemu-options.hx
index 8b66264..6d66113 100644
index 3c411c4..af614bf 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -1176,6 +1176,15 @@ STEXI
@@ -1196,6 +1196,15 @@ STEXI
Disable HPET support.
ETEXI
@ -187,10 +187,10 @@ index 8b66264..6d66113 100644
"-acpitable [sig=str][,rev=n][,oem_id=str][,oem_table_id=str][,oem_rev=n][,asl_compiler_id=str][,asl_compiler_rev=n][,{data|file}=file1[:file2]...]\n"
" ACPI table description\n", QEMU_ARCH_I386)
diff --git a/vl.c b/vl.c
index 23ab3a3..a33c28e 100644
index 67f5813..322fea0 100644
--- a/vl.c
+++ b/vl.c
@@ -175,6 +175,8 @@ int main(int argc, char **argv)
@@ -176,6 +176,8 @@ int main(int argc, char **argv)
#define MAX_VIRTIO_CONSOLES 1
@ -199,7 +199,7 @@ index 23ab3a3..a33c28e 100644
static const char *data_dir;
const char *bios_name = NULL;
enum vga_retrace_method vga_retrace_method = VGA_RETRACE_DUMB;
@@ -2958,6 +2960,9 @@ int main(int argc, char **argv, char **envp)
@@ -3038,6 +3040,9 @@ int main(int argc, char **argv, char **envp)
qdev_prop_register_global_list(slew_lost_ticks);
break;
}

View File

@ -1,4 +1,4 @@
From 86b1e6e983680b4332de69473e46103d22bfada4 Mon Sep 17 00:00:00 2001
From a5d4463daeb0ff29a3d17cf410b1c81b6f910875 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,7 +8,7 @@ Subject: [PATCH] XXX dont dump core on sigabort
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/linux-user/signal.c b/linux-user/signal.c
index b1e139d..0d6cb7b 100644
index 7869147..0078b32 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -373,6 +373,10 @@ static void QEMU_NORETURN force_sig(int target_sig)

View File

@ -1,4 +1,4 @@
From aabcf0dc3144e713aef746e32b66dc8d13b77891 Mon Sep 17 00:00:00 2001
From 6a72014de6a88964f9d3d88ec5bf1a7fd1f44e98 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)
@ -12,10 +12,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 dd340b2..503ecfa 100644
index d9814bc4..587f421 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -848,15 +848,22 @@ void cpu_loop(CPUARMState *env)
@@ -847,15 +847,22 @@ void cpu_loop(CPUARMState *env)
break;
}
} else {
@ -48,7 +48,7 @@ index dd340b2..503ecfa 100644
} else {
goto error;
diff --git a/linux-user/qemu.h b/linux-user/qemu.h
index 7b299b7..dc12b23 100644
index 69b27d7..175d502 100644
--- a/linux-user/qemu.h
+++ b/linux-user/qemu.h
@@ -137,6 +137,8 @@ typedef struct TaskState {
@ -66,10 +66,10 @@ index 7b299b7..dc12b23 100644
void fork_end(int child);
+int syscall_restartable(int syscall_nr);
/* Return true if the proposed guest_base is suitable for the guest.
* The guest code may leave a page mapped and populate it if the
/* 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 0d6cb7b..c00cf75 100644
index 0078b32..4a637f4 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -25,6 +25,7 @@
@ -118,10 +118,10 @@ index 0d6cb7b..c00cf75 100644
ignore state to avoid getting unexpected interrupted
syscalls */
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 20d2a74..2a210e7 100644
index 41c869b..60ed4be 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -5031,6 +5031,87 @@ static int do_open(void *cpu_env, const char *pathname, int flags, mode_t mode)
@@ -5086,6 +5086,87 @@ static int do_open(void *cpu_env, const char *pathname, int flags, mode_t mode)
return get_errno(open(path(pathname), flags, mode));
}
@ -209,7 +209,7 @@ index 20d2a74..2a210e7 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>. */
@@ -5043,6 +5124,12 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
@@ -5098,6 +5179,12 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
struct stat st;
struct statfs stfs;
void *p;
@ -222,7 +222,7 @@ index 20d2a74..2a210e7 100644
#ifdef DEBUG
gemu_log("syscall %d", num);
@@ -7988,7 +8075,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
@@ -8095,7 +8182,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;
@ -231,7 +231,7 @@ index 20d2a74..2a210e7 100644
}
switch(arg2) {
@@ -8733,6 +8820,7 @@ fail:
@@ -8840,6 +8927,7 @@ fail:
#endif
if(do_strace)
print_syscall_ret(num, ret);

View File

@ -1,4 +1,4 @@
From 343ed56bc6ccd90974f43cca405e20919af04552 Mon Sep 17 00:00:00 2001
From 8ced0f08f09a6588a73b15feada94e063692ab35 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 e4b24a62433e546aa16a4e4f9018324086c264e7 Mon Sep 17 00:00:00 2001
From c48e5ad811706d9a3ffc5a80085c820c6f845377 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

View File

@ -1,4 +1,4 @@
From 137788d54993ea8543ed0b42be6a5b026e048b58 Mon Sep 17 00:00:00 2001
From fe0fcbcbec05584ff7b9dd1bdc60deedd14b70e1 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
@ -20,7 +20,7 @@ Signed-off-by: Ulrich Hecht <uli@suse.de>
create mode 100644 linux-user/syscall_types_alsa.h
diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h
index eb96a08..e8c1c69 100644
index 8a47767..6af0cb7 100644
--- a/linux-user/ioctls.h
+++ b/linux-user/ioctls.h
@@ -316,6 +316,11 @@
@ -2255,20 +2255,20 @@ index 0000000..e09a30d
+ unsigned char *code;
+};
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index a79b67d..be8760c 100644
index 2cfda5a..0af219a 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -2362,3 +2362,5 @@ struct target_ucred {
@@ -2425,3 +2425,5 @@ struct target_ucred {
uint32_t uid;
uint32_t gid;
};
+
+#include "ioctls_alsa_structs.h"
diff --git a/linux-user/syscall_types.h b/linux-user/syscall_types.h
index 601618d..ad2ee7e 100644
index 44b6a58..7897e37 100644
--- a/linux-user/syscall_types.h
+++ b/linux-user/syscall_types.h
@@ -80,6 +80,11 @@ STRUCT(count_info,
@@ -83,6 +83,11 @@ STRUCT(buffmem_desc,
STRUCT(mixer_info,
MK_ARRAY(TYPE_CHAR, 16), MK_ARRAY(TYPE_CHAR, 32), TYPE_INT, MK_ARRAY(TYPE_INT, 10))

View File

@ -1,4 +1,4 @@
From 75a2031df4adb45576126c055bccee35c0384e64 Mon Sep 17 00:00:00 2001
From 7fbdb3f4610eb31f6692e4919593ffe861d05e97 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,7 +12,7 @@ Signed-off-by: Ulrich Hecht <uli@suse.de>
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/linux-user/mmap.c b/linux-user/mmap.c
index d9468fe..3f5e1d7 100644
index b412e3f..46523de 100644
--- a/linux-user/mmap.c
+++ b/linux-user/mmap.c
@@ -377,6 +377,9 @@ abi_ulong mmap_find_vma(abi_ulong start, abi_ulong size)
@ -25,7 +25,7 @@ index d9468fe..3f5e1d7 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)
@@ -412,6 +415,17 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, int prot,
@@ -411,6 +414,17 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, int prot,
}
#endif

View File

@ -1,4 +1,4 @@
From c40b80d60882ca0a479de9dd14409fd3a2eba6bb Mon Sep 17 00:00:00 2001
From e4983bb8eb29727b89ddc5d4964c07854ecec4f3 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 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 2a210e7..13721c5 100644
index 60ed4be..a929639 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -6182,6 +6182,8 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
@@ -6237,6 +6237,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 44449256ecf57af6468a63068d72c0e3f5253718 Mon Sep 17 00:00:00 2001
From d4f7c54f0117083c74fdd25ca6efdb0f90a3223b 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 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 13721c5..c16c11a 100644
index a929639..ac387a4 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -3603,7 +3603,12 @@ static abi_long do_ioctl(int fd, abi_long cmd, abi_long arg)
@@ -3657,7 +3657,12 @@ static abi_long do_ioctl(int fd, abi_long cmd, abi_long arg)
ie = ioctl_entries;
for(;;) {
if (ie->target_cmd == 0) {

View File

@ -1,4 +1,4 @@
From 397d17731b3236cd11bd3c2191f94280c46eadef Mon Sep 17 00:00:00 2001
From 2fed0dbdfebf7cdd1a4fad426c51ae315e1e5f39 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 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index c16c11a..5c6e303 100644
index ac387a4..53feee5 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -3637,6 +3637,11 @@ static abi_long do_ioctl(int fd, abi_long cmd, abi_long arg)
@@ -3691,6 +3691,11 @@ static abi_long do_ioctl(int fd, abi_long cmd, abi_long arg)
arg_type++;
target_size = thunk_type_size(arg_type, 0);
switch(ie->access) {
@ -30,7 +30,7 @@ index c16c11a..5c6e303 100644
case IOC_R:
ret = get_errno(ioctl(fd, ie->host_cmd, buf_temp));
if (!is_error(ret)) {
@@ -3655,6 +3660,7 @@ static abi_long do_ioctl(int fd, abi_long cmd, abi_long arg)
@@ -3709,6 +3714,7 @@ static abi_long do_ioctl(int fd, abi_long cmd, abi_long arg)
unlock_user(argptr, arg, 0);
ret = get_errno(ioctl(fd, ie->host_cmd, buf_temp));
break;

View File

@ -1,11 +1,14 @@
From 24e926bb87d3199d3177358929eacb65af69418e Mon Sep 17 00:00:00 2001
From e76344b62f6365b61520345e00f89b80b6570fe0 Mon Sep 17 00:00:00 2001
From: Ulrich Hecht <uli@suse.de>
Date: Tue, 14 Apr 2009 16:37:42 +0200
Subject: [PATCH] qemu-img-vmdk-scsi
Support creation of SCSI VMDK images in qemu-img.
Subject: [PATCH] block/vmdk: Support creation of SCSI VMDK images in qemu-img
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Ulrich Hecht <uli@suse.de>
[AF: Changed BLOCK_FLAG_SCSI from 8 to 16 for v1.2]
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
block.c | 5 ++++-
block/vmdk.c | 12 ++++++++++--
@ -14,10 +17,10 @@ Signed-off-by: Ulrich Hecht <uli@suse.de>
4 files changed, 23 insertions(+), 4 deletions(-)
diff --git a/block.c b/block.c
index 7547051..6a68221 100644
index 470bdcc..b27622b 100644
--- a/block.c
+++ b/block.c
@@ -4039,7 +4039,7 @@ int bdrv_img_create(const char *filename, const char *fmt,
@@ -3902,7 +3902,7 @@ int bdrv_img_create(const char *filename, const char *fmt,
char *options, uint64_t img_size, int flags)
{
QEMUOptionParameter *param = NULL, *create_options = NULL;
@ -26,7 +29,7 @@ index 7547051..6a68221 100644
BlockDriverState *bs = NULL;
BlockDriver *drv, *proto_drv;
BlockDriver *backing_drv = NULL;
@@ -4154,6 +4154,9 @@ int bdrv_img_create(const char *filename, const char *fmt,
@@ -4017,6 +4017,9 @@ int bdrv_img_create(const char *filename, const char *fmt,
printf("Formatting '%s', fmt=%s ", filename, fmt);
print_option_parameters(param);
@ -37,10 +40,10 @@ index 7547051..6a68221 100644
ret = bdrv_create(drv, filename, param);
diff --git a/block/vmdk.c b/block/vmdk.c
index 18e9b4c..c153617 100644
index daee426..1eb3e60 100644
--- a/block/vmdk.c
+++ b/block/vmdk.c
@@ -1377,7 +1377,7 @@ static int vmdk_create(const char *filename, QEMUOptionParameter *options)
@@ -1376,7 +1376,7 @@ static int vmdk_create(const char *filename, QEMUOptionParameter *options)
"ddb.geometry.cylinders = \"%" PRId64 "\"\n"
"ddb.geometry.heads = \"16\"\n"
"ddb.geometry.sectors = \"63\"\n"
@ -49,7 +52,7 @@ index 18e9b4c..c153617 100644
if (filename_decompose(filename, path, prefix, postfix, PATH_MAX)) {
return -EINVAL;
@@ -1392,6 +1392,8 @@ static int vmdk_create(const char *filename, QEMUOptionParameter *options)
@@ -1391,6 +1391,8 @@ static int vmdk_create(const char *filename, QEMUOptionParameter *options)
flags |= options->value.n ? BLOCK_FLAG_COMPAT6 : 0;
} else if (!strcmp(options->name, BLOCK_OPT_SUBFMT)) {
fmt = options->value.s;
@ -58,7 +61,7 @@ index 18e9b4c..c153617 100644
}
options++;
}
@@ -1482,7 +1484,8 @@ static int vmdk_create(const char *filename, QEMUOptionParameter *options)
@@ -1481,7 +1483,8 @@ static int vmdk_create(const char *filename, QEMUOptionParameter *options)
parent_desc_line,
ext_desc_lines,
(flags & BLOCK_FLAG_COMPAT6 ? 6 : 4),
@ -66,9 +69,9 @@ index 18e9b4c..c153617 100644
+ total_size / (int64_t)(63 * 16 * 512),
+ flags & BLOCK_FLAG_SCSI ? "lsilogic" : "ide");
if (split || flat) {
fd = open(
filename,
@@ -1585,6 +1588,11 @@ static QEMUOptionParameter vmdk_create_options[] = {
fd = qemu_open(filename,
O_WRONLY | O_CREAT | O_TRUNC | O_BINARY | O_LARGEFILE,
@@ -1582,6 +1585,11 @@ static QEMUOptionParameter vmdk_create_options[] = {
"VMDK flat extent format, can be one of "
"{monolithicSparse (default) | monolithicFlat | twoGbMaxExtentSparse | twoGbMaxExtentFlat | streamOptimized} "
},
@ -81,18 +84,18 @@ index 18e9b4c..c153617 100644
};
diff --git a/block_int.h b/block_int.h
index 3d4abc6..3d5a855 100644
index 4452f6f..92a75c8 100644
--- a/block_int.h
+++ b/block_int.h
@@ -33,6 +33,7 @@
@@ -35,6 +35,7 @@
#define BLOCK_FLAG_ENCRYPT 1
#define BLOCK_FLAG_COMPAT6 4
+#define BLOCK_FLAG_SCSI 8
#define BLOCK_FLAG_LAZY_REFCOUNTS 8
+#define BLOCK_FLAG_SCSI 16
#define BLOCK_IO_LIMIT_READ 0
#define BLOCK_IO_LIMIT_WRITE 1
@@ -44,6 +45,7 @@
@@ -46,6 +47,7 @@
#define BLOCK_OPT_SIZE "size"
#define BLOCK_OPT_ENCRYPT "encryption"
#define BLOCK_OPT_COMPAT6 "compat6"
@ -101,10 +104,10 @@ index 3d4abc6..3d5a855 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 c8a70ff..00e3471 100644
index b41e670..e34d88a 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -636,7 +636,7 @@ static int img_convert(int argc, char **argv)
@@ -665,7 +665,7 @@ static int img_convert(int argc, char **argv)
const uint8_t *buf1;
BlockDriverInfo bdi;
QEMUOptionParameter *param = NULL, *create_options = NULL;
@ -113,7 +116,7 @@ index c8a70ff..00e3471 100644
char *options = NULL;
const char *snapshot_name = NULL;
float local_progress;
@@ -829,6 +829,12 @@ static int img_convert(int argc, char **argv)
@@ -858,6 +858,12 @@ static int img_convert(int argc, char **argv)
}
}

View File

@ -1,24 +1,29 @@
From 90f4c2f9a182626eea2d2ec962d89ada130c22f8 Mon Sep 17 00:00:00 2001
From d374dbebe347831449ecb6f16e62fe22d67a5273 Mon Sep 17 00:00:00 2001
From: Ulrich Hecht <uli@suse.de>
Date: Wed, 25 Aug 2010 14:23:43 +0200
Subject: [PATCH] configure: Enable mipsn32*-linux-user builds
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Ulrich Hecht <uli@suse.de>
[AF: Merged default-configs upstream]
[AF: Merged with new or32-linux-user for v1.2]
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
configure | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/configure b/configure
index 1f338f8..de92ac2 100755
index 60d266f..352239f 100755
--- a/configure
+++ b/configure
@@ -950,6 +950,8 @@ microblaze-linux-user \
@@ -997,6 +997,8 @@ microblaze-linux-user \
microblazeel-linux-user \
mips-linux-user \
mipsel-linux-user \
+mipsn32-linux-user \
+mipsn32el-linux-user \
or32-linux-user \
ppc-linux-user \
ppc64-linux-user \
ppc64abi32-linux-user \

View File

@ -1,7 +1,10 @@
From eaedb8d198e91c3a085df8704b513a3cb524d895 Mon Sep 17 00:00:00 2001
From 22844fc327d80f9ff4d484fd5a2af8b6a6c52200 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
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
When using qemu's linux-user binaries through binfmt, argv[0] gets lost
along the execution because qemu only gets passed in the full file name
@ -21,18 +24,21 @@ we're currently creating a new binary for each target archictecture.
CC: Reinhard Max <max@suse.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
[AF: Rebased onto new Makefile infrastructure]
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
Makefile.target | 9 +++++++++
Makefile.target | 12 ++++++++++++
linux-user/Makefile.objs | 2 ++
linux-user/binfmt.c | 42 ++++++++++++++++++++++++++++++++++++++++++
scripts/qemu-binfmt-conf.sh | 34 +++++++++++++++++-----------------
3 files changed, 68 insertions(+), 17 deletions(-)
4 files changed, 73 insertions(+), 17 deletions(-)
create mode 100644 linux-user/binfmt.c
diff --git a/Makefile.target b/Makefile.target
index 1582904..101c0d6 100644
index 7892a8d..e802f3f 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -42,6 +42,10 @@ PROGS+=$(QEMU_PROGW)
@@ -34,6 +34,10 @@ PROGS+=$(QEMU_PROGW)
endif
STPFILES=
@ -43,16 +49,26 @@ index 1582904..101c0d6 100644
ifndef CONFIG_HAIKU
LIBS+=-lm
endif
@@ -150,6 +154,8 @@ obj-y += $(addprefix ../libuser/, $(user-obj-y))
obj-y += $(addprefix ../libdis-user/, $(libdis-y))
obj-y += $(libobj-y)
@@ -98,6 +102,8 @@ QEMU_CFLAGS+=-I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR) -I$(SRC_PATH)/linux-user
obj-y += linux-user/
obj-y += gdbstub.o thunk.o user-exec.o $(oslib-obj-y)
+obj-binfmt-y += binfmt.o
+obj-binfmt-y += linux-user/
+
endif #CONFIG_LINUX_USER
#########################################################
@@ -423,6 +429,9 @@ $(QEMU_PROG): $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y)
@@ -155,6 +161,9 @@ GENERATED_HEADERS += hmp-commands.h qmp-commands-old.h
endif # CONFIG_SOFTMMU
nested-vars += obj-y
+ifdef CONFIG_LINUX_USER
+nested-vars += obj-binfmt-y
+endif
# This resolves all nested paths, so it must come last
include $(SRC_PATH)/Makefile.objs
@@ -183,6 +192,9 @@ $(QEMU_PROG): $(all-obj-y)
$(call LINK,$^)
endif
@ -62,6 +78,16 @@ index 1582904..101c0d6 100644
gdbstub-xml.c: $(TARGET_XML_FILES) $(SRC_PATH)/scripts/feature_to_c.sh
$(call quiet-command,rm -f $@ && $(SHELL) $(SRC_PATH)/scripts/feature_to_c.sh $@ $(TARGET_XML_FILES)," GEN $(TARGET_DIR)$@")
diff --git a/linux-user/Makefile.objs b/linux-user/Makefile.objs
index 5899d72..18212a2 100644
--- a/linux-user/Makefile.objs
+++ b/linux-user/Makefile.objs
@@ -5,3 +5,5 @@ obj-$(TARGET_HAS_BFLT) += flatload.o
obj-$(TARGET_I386) += vm86.o
obj-$(TARGET_ARM) += arm/nwfpe/
obj-$(TARGET_M68K) += m68k-sim.o
+
+obj-binfmt-y = binfmt.o
diff --git a/linux-user/binfmt.c b/linux-user/binfmt.c
new file mode 100644
index 0000000..cd1f513

View File

@ -1,4 +1,4 @@
From 4312a512638d2d70144dce55a63f21dabcfda0cb Mon Sep 17 00:00:00 2001
From 7fd1db51229b7b331a8acf3d6ad552d45d902676 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Sun, 11 Dec 2011 01:19:24 +0100
Subject: [PATCH] linux-user: Ignore timer_create syscall
@ -12,10 +12,10 @@ Signed-off-by: Alexander Graf <agraf@suse.de>
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 5c6e303..403f943 100644
index 53feee5..792c48e 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -8449,6 +8449,11 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
@@ -8556,6 +8556,11 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
break;
#endif

View File

@ -1,4 +1,4 @@
From 0b0a9d0508e5d4290afd272b9523c94761f11e9c Mon Sep 17 00:00:00 2001
From 3986078d311f89717c0adf04dde20daae1f3c31b Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Sun, 11 Dec 2011 01:21:51 +0100
Subject: [PATCH] linux-user: be silent about capget failures
@ -13,10 +13,10 @@ Signed-off-by: Alexander Graf <agraf@suse.de>
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 403f943..39d02f8 100644
index 792c48e..af01e15 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -7471,7 +7471,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
@@ -7537,7 +7537,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
unlock_user(p, arg1, ret);
break;
case TARGET_NR_capget:

View File

@ -1,4 +1,4 @@
From e975674515cfe9e086341f3684452520908037d9 Mon Sep 17 00:00:00 2001
From 487bbbcf091c98161aee1f0dffd2dd9f29ae6643 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,10 +13,10 @@ KVM guests work there, even if possibly racy in some odd circumstances.
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/exec.c b/exec.c
index 21fce4e..9ba4409 100644
index 9cbdc35..baa495f 100644
--- a/exec.c
+++ b/exec.c
@@ -2503,10 +2503,12 @@ static void *file_ram_alloc(RAMBlock *block,
@@ -2392,10 +2392,12 @@ static void *file_ram_alloc(RAMBlock *block,
return NULL;
}

View File

@ -1,4 +1,4 @@
From 203f51827bf2f7e34b13b0ad0b09789ec035aaa9 Mon Sep 17 00:00:00 2001
From 2232d1071fbf654bcdb04e34cdf2dbf6efd2c073 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
@ -48,10 +48,10 @@ index a72edda..e460e12 100644
+
#endif
diff --git a/user-exec.c b/user-exec.c
index d8c2ad9..36d29b4 100644
index b9ea9dd..5a04218 100644
--- a/user-exec.c
+++ b/user-exec.c
@@ -96,6 +96,10 @@ static inline int handle_cpu_signal(uintptr_t pc, unsigned long address,
@@ -102,6 +102,10 @@ static inline int handle_cpu_signal(uintptr_t pc, unsigned long address,
qemu_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 4790cf690d3015adbe6a9e768d1009535c01ffeb Mon Sep 17 00:00:00 2001
From 1af50e17428a53c3233554f1f03a3958a83f9ace 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

View File

@ -1,30 +0,0 @@
From 8cc5120497695e7ea8dde9b096eb6c8cb9b6ac35 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Tue, 29 May 2012 17:28:07 +0200
Subject: [PATCH] linux-user: ARM: Ignore immediate value for svc in thumb mode
When running in thumb mode, Linux doesn't evaluate the immediate value
of the svc instruction, but instead just always assumes the syscall number
to be in r7.
This fixes executing go_bootstrap while building go for me.
Signed-off-by: Alexander Graf <agraf@suse.de>
---
linux-user/main.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/linux-user/main.c b/linux-user/main.c
index 503ecfa..ed48276 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -823,8 +823,7 @@ void cpu_loop(CPUARMState *env)
} else if (n == ARM_NR_semihosting
|| n == ARM_NR_thumb_semihosting) {
env->regs[0] = do_arm_semihosting (env);
- } else if (n == 0 || n >= ARM_SYSCALL_BASE
- || (env->thumb && n == ARM_THUMB_SYSCALL)) {
+ } else if (n == 0 || n >= ARM_SYSCALL_BASE || env->thumb) {
/* linux syscall */
if (env->thumb || n == 0) {
n = env->regs[7];

View File

@ -1,4 +1,4 @@
From ea18c65ff19aa12001556d7f19145f6eb2e8bcdc Mon Sep 17 00:00:00 2001
From adad3a28638056a0719c1c75aa54fb76d31b7fac Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Tue, 29 May 2012 15:30:01 +0200
Subject: [PATCH] linux-user: arm: no tb_flush on reset
@ -14,10 +14,10 @@ change to at least get a working build again.
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/target-arm/cpu.c b/target-arm/cpu.c
index 7eb323a..2e90e56 100644
index b00f5fa..740dbc3 100644
--- a/target-arm/cpu.c
+++ b/target-arm/cpu.c
@@ -117,7 +117,11 @@ static void arm_cpu_reset(CPUState *s)
@@ -124,7 +124,11 @@ static void arm_cpu_reset(CPUState *s)
* bake assumptions about into translated code, so we need to
* tb_flush().
*/

View File

@ -1,4 +1,4 @@
From eb42dbe8f2c478276128622b3fe1125e4cd13759 Mon Sep 17 00:00:00 2001
From 90774301973e03fe90be092e4204e6782db7f41c Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Wed, 30 May 2012 14:40:47 +0200
Subject: [PATCH] linux-user: fix multi-threaded /proc/self/maps
@ -16,10 +16,10 @@ Signed-off-by: Alexander Graf <agraf@suse.de>
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 39d02f8..06408bd 100644
index af01e15..cda50ae 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -4920,8 +4920,8 @@ static int open_self_maps(void *cpu_env, int fd)
@@ -4975,8 +4975,8 @@ static int open_self_maps(void *cpu_env, int fd)
#if defined(TARGET_ARM) || defined(TARGET_M68K) || defined(TARGET_UNICORE32)
dprintf(fd, "%08llx-%08llx rw-p %08llx 00:00 0 [stack]\n",
(unsigned long long)ts->info->stack_limit,

View File

@ -1,9 +1,10 @@
From 57fd4d50146ef90693d569ee799f7e9e9d606e05 Mon Sep 17 00:00:00 2001
From f2fc46bfbd9a0393e29f45c7470a96074227a911 Mon Sep 17 00:00:00 2001
From: Michael Tokarev <mjt@tls.msk.ru>
Date: Thu, 7 Jun 2012 01:11:00 +0400
Subject: [PATCH] use --libexecdir instead of ignoring it first and reinventing it later
Subject: [PATCH] use --libexecdir instead of ignoring it first and
reinventing it later
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Commit 7b93fadf3a38d1ed65ea5536a52efc2772c6e3b8 "Add basic version
@ -26,10 +27,10 @@ Signed-off-by: Andreas Färber <afaerber@suse.de>
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/configure b/configure
index de92ac2..850821b 100755
index 352239f..332ff3c 100755
--- a/configure
+++ b/configure
@@ -159,6 +159,7 @@ datadir="\${prefix}/share"
@@ -183,6 +183,7 @@ datadir="\${prefix}/share"
qemu_docdir="\${prefix}/share/doc/qemu"
bindir="\${prefix}/bin"
libdir="\${prefix}/lib"
@ -37,7 +38,7 @@ index de92ac2..850821b 100755
includedir="\${prefix}/include"
sysconfdir="\${prefix}/etc"
confsuffix="/qemu"
@@ -587,6 +588,8 @@ for opt do
@@ -633,6 +634,8 @@ for opt do
;;
--libdir=*) libdir="$optarg"
;;
@ -46,7 +47,7 @@ index de92ac2..850821b 100755
--includedir=*) includedir="$optarg"
;;
--datadir=*) datadir="$optarg"
@@ -597,7 +600,7 @@ for opt do
@@ -643,7 +646,7 @@ for opt do
;;
--sysconfdir=*) sysconfdir="$optarg"
;;
@ -55,7 +56,7 @@ index de92ac2..850821b 100755
--oldincludedir=*|--datarootdir=*|--infodir=*|--localedir=*|\
--htmldir=*|--dvidir=*|--pdfdir=*|--psdir=*)
# These switches are silently ignored, for compatibility with
@@ -2945,6 +2948,7 @@ echo "Install prefix $prefix"
@@ -3082,6 +3085,7 @@ echo "Install prefix $prefix"
echo "BIOS directory `eval echo $qemu_datadir`"
echo "binary directory `eval echo $bindir`"
echo "library directory `eval echo $libdir`"
@ -63,7 +64,7 @@ index de92ac2..850821b 100755
echo "include directory `eval echo $includedir`"
echo "config directory `eval echo $sysconfdir`"
if test "$mingw32" = "no" ; then
@@ -3048,14 +3052,14 @@ echo all: >> $config_host_mak
@@ -3185,14 +3189,14 @@ echo all: >> $config_host_mak
echo "prefix=$prefix" >> $config_host_mak
echo "bindir=$bindir" >> $config_host_mak
echo "libdir=$libdir" >> $config_host_mak

View File

@ -1,4 +1,4 @@
From fa3ea9d74060806eb6fc0792483d41c3a684e2d0 Mon Sep 17 00:00:00 2001
From 9f189b36a4c3e5a53e97ef4d820c5465d1dde0a4 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
@ -18,7 +18,7 @@ Signed-off-by: Alexander Graf <agraf@suse.de>
4 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h
index e8c1c69..97c3f10 100644
index 6af0cb7..bb76c56 100644
--- a/linux-user/ioctls.h
+++ b/linux-user/ioctls.h
@@ -328,6 +328,7 @@
@ -41,10 +41,10 @@ index 8974caa..810ae61 100644
#endif
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 06408bd..46e964b 100644
index cda50ae..b73c23c 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -3580,6 +3580,13 @@ out:
@@ -3634,6 +3634,13 @@ out:
return ret;
}
@ -59,10 +59,10 @@ index 06408bd..46e964b 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 be8760c..b76f64a 100644
index 0af219a..3b7b1c3 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -968,6 +968,7 @@ struct target_pollfd {
@@ -1016,6 +1016,7 @@ struct target_pollfd {
#define TARGET_LOOP_SET_STATUS64 0x4C04
#define TARGET_LOOP_GET_STATUS64 0x4C05
#define TARGET_LOOP_CHANGE_FD 0x4C06

View File

@ -0,0 +1,41 @@
From c26be2e327b4bc628ce69ea4493d89b76e7c5161 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Mon, 25 Jun 2012 19:02:32 +0200
Subject: [PATCH] linux-user: fix segmentation fault passing with g2h(x) != x
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
When forwarding a segmentation fault into the guest process, we were passing
the host's address directly into the guest process's signal descriptor.
That obviously confused the guest process, since it didn't know what to make
of the (usually 32-bit truncated) address. Passing in g2h(address) makes the
guest process a lot happier.
This fixes java running in arm-linux-user for me.
Signed-off-by: Alexander Graf <agraf@suse.de>
[AF: Rebased onto AREG0 fix for v1.2, squashed fixup by agraf]
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
user-exec.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/user-exec.c b/user-exec.c
index 5a04218..bc3eef9 100644
--- a/user-exec.c
+++ b/user-exec.c
@@ -112,6 +112,12 @@ static inline int handle_cpu_signal(uintptr_t pc, unsigned long address,
return 1;
}
+ if (RESERVED_VA) {
+ /* Convert forcefully to guest address space, invalid addresses
+ are still valid segv ones */
+ address = address - GUEST_BASE;
+ }
+
/* see if it is an MMU fault */
ret = cpu_handle_mmu_fault(cpu_single_env, address, is_write,
MMU_USER_IDX);

View File

@ -1,56 +0,0 @@
From c42b3aca84c5b1a8be7010e518f526a1798e3790 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Mon, 25 Jun 2012 19:02:32 +0200
Subject: [PATCH] linux-user: fix segmentation fault passing with g2h(x) != x
When forwarding a segmentation fault into the guest process, we were passing
the host's address directly into the guest process's signal descriptor.
That obviously confused the guest process, since it didn't know what to make
of the (usually 32-bit truncated) address. Passing in g2h(address) makes the
guest process a lot happier.
This fixes java running in arm-linux-user for me.
Signed-off-by: Alexander Graf <agraf@suse.de>
---
user-exec.c | 25 +++++++++++++------------
1 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/user-exec.c b/user-exec.c
index 36d29b4..83d2d44 100644
--- a/user-exec.c
+++ b/user-exec.c
@@ -100,19 +100,20 @@ static inline int handle_cpu_signal(uintptr_t pc, unsigned long address,
/* Maybe we're still holding the TB fiddling lock? */
spin_unlock_safe(&tb_lock);
- /* XXX: locking issue */
- if (is_write && h2g_valid(address)
- && page_unprotect(h2g(address), pc, puc)) {
- return 1;
- }
+ if (h2g_valid(address)) {
+ /* XXX: locking issue */
+ if (is_write && page_unprotect(h2g(address), pc, puc)) {
+ return 1;
+ }
- /* see if it is an MMU fault */
- ret = cpu_handle_mmu_fault(env, address, is_write, MMU_USER_IDX);
- if (ret < 0) {
- return 0; /* not an MMU fault */
- }
- if (ret == 0) {
- return 1; /* the MMU fault was handled without causing real CPU fault */
+ /* see if it is an MMU fault */
+ ret = cpu_handle_mmu_fault(env, h2g(address), is_write, MMU_USER_IDX);
+ if (ret < 0) {
+ return 0; /* not an MMU fault */
+ }
+ if (ret == 0) {
+ return 1; /* the MMU fault was handled without causing real CPU fault */
+ }
}
/* now we have a real cpu fault */
tb = tb_find_pc(pc);

View File

@ -1,4 +1,4 @@
From 9a66bfa1a21b7429229be3d52b1d6ea08b141d36 Mon Sep 17 00:00:00 2001
From be080534c79bad7977c0ca807441bcebe34245b4 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
@ -14,7 +14,7 @@ Signed-off-by: Alexander Graf <agraf@suse.de>
3 files changed, 43 insertions(+), 2 deletions(-)
diff --git a/linux-user/mmap.c b/linux-user/mmap.c
index 3f5e1d7..83e9eda 100644
index 46523de..59718b5 100644
--- a/linux-user/mmap.c
+++ b/linux-user/mmap.c
@@ -30,6 +30,7 @@
@ -42,7 +42,7 @@ index 3f5e1d7..83e9eda 100644
}
diff --git a/tcg/tcg.c b/tcg/tcg.c
index ab589c7..4c93acb 100644
index 8386b70..b067fc1 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -40,6 +40,8 @@
@ -94,7 +94,7 @@ index ab589c7..4c93acb 100644
/* Count total number of arguments and allocate the corresponding
space */
total_args = 0;
@@ -2182,11 +2208,13 @@ int tcg_gen_code(TCGContext *s, uint8_t *gen_code_buf)
@@ -2188,11 +2214,13 @@ int tcg_gen_code(TCGContext *s, uint8_t *gen_code_buf)
}
#endif
@ -108,7 +108,7 @@ index ab589c7..4c93acb 100644
return s->code_ptr - gen_code_buf;
}
@@ -2197,7 +2225,11 @@ int tcg_gen_code(TCGContext *s, uint8_t *gen_code_buf)
@@ -2203,7 +2231,11 @@ int tcg_gen_code(TCGContext *s, uint8_t *gen_code_buf)
Return -1 if not found. */
int tcg_gen_code_search_pc(TCGContext *s, uint8_t *gen_code_buf, long offset)
{
@ -122,7 +122,7 @@ index ab589c7..4c93acb 100644
#ifdef CONFIG_PROFILER
diff --git a/tcg/tcg.h b/tcg/tcg.h
index a83bddd..e20fc82 100644
index d710694..9902ee6 100644
--- a/tcg/tcg.h
+++ b/tcg/tcg.h
@@ -46,6 +46,8 @@ typedef uint64_t tcg_target_ulong;

View File

@ -1,4 +1,4 @@
From f85c851986d24df8700ffe447301786fe83819d0 Mon Sep 17 00:00:00 2001
From e10fbcf66724e22bf4a2b6a5109538cee21e48fc 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 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 46e964b..b0566cd 100644
index b73c23c..0c3d4c5 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -4298,6 +4298,15 @@ static int do_fork(CPUArchState *env, unsigned int flags, abi_ulong newsp,
@@ -4352,6 +4352,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 777d50057b576a0d829481a0cea9cd399e7a5f65 Mon Sep 17 00:00:00 2001
From 4e526c103457a654a05730709b883c4e9eaa17b4 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
@ -9,10 +9,10 @@ Signed-off-by: Alexander Graf <agraf@suse.de>
1 files changed, 26 insertions(+), 7 deletions(-)
diff --git a/exec.c b/exec.c
index 9ba4409..6da4b38 100644
index baa495f..aae9462 100644
--- a/exec.c
+++ b/exec.c
@@ -732,17 +732,22 @@ static TranslationBlock *tb_alloc(target_ulong pc)
@@ -722,17 +722,22 @@ static TranslationBlock *tb_alloc(target_ulong pc)
{
TranslationBlock *tb;
@ -36,7 +36,7 @@ index 9ba4409..6da4b38 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. */
@@ -750,6 +755,7 @@ void tb_free(TranslationBlock *tb)
@@ -740,6 +745,7 @@ void tb_free(TranslationBlock *tb)
code_gen_ptr = tb->tc_ptr;
nb_tbs--;
}
@ -44,7 +44,7 @@ index 9ba4409..6da4b38 100644
}
static inline void invalidate_page_bitmap(PageDesc *p)
@@ -803,6 +809,7 @@ void tb_flush(CPUArchState *env1)
@@ -793,6 +799,7 @@ void tb_flush(CPUArchState *env1)
nb_tbs, nb_tbs > 0 ?
((unsigned long)(code_gen_ptr - code_gen_buffer)) / nb_tbs : 0);
#endif
@ -52,7 +52,7 @@ index 9ba4409..6da4b38 100644
if ((unsigned long)(code_gen_ptr - code_gen_buffer) > code_gen_buffer_size)
cpu_abort(env1, "Internal error: code buffer overflow\n");
@@ -819,6 +826,7 @@ void tb_flush(CPUArchState *env1)
@@ -809,6 +816,7 @@ void tb_flush(CPUArchState *env1)
/* XXX: flush processor icache at this point if cache flush is
expensive */
tb_flush_count++;
@ -60,7 +60,7 @@ index 9ba4409..6da4b38 100644
}
#ifdef DEBUG_TB_CHECK
@@ -1116,9 +1124,12 @@ void tb_invalidate_phys_page_range(tb_page_addr_t start, tb_page_addr_t end,
@@ -1108,9 +1116,12 @@ 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 */
@ -74,7 +74,7 @@ index 9ba4409..6da4b38 100644
if (!p->code_bitmap &&
++p->code_write_count >= SMC_BITMAP_USE_THRESHOLD &&
is_cpu_write_access) {
@@ -1202,6 +1213,7 @@ void tb_invalidate_phys_page_range(tb_page_addr_t start, tb_page_addr_t end,
@@ -1194,6 +1205,7 @@ void tb_invalidate_phys_page_range(tb_page_addr_t start, tb_page_addr_t end,
cpu_resume_from_signal(env, NULL);
}
#endif
@ -82,7 +82,7 @@ index 9ba4409..6da4b38 100644
}
/* len must be <= 8 and start must be a multiple of len */
@@ -1397,12 +1409,16 @@ TranslationBlock *tb_find_pc(uintptr_t tc_ptr)
@@ -1389,12 +1401,16 @@ TranslationBlock *tb_find_pc(uintptr_t tc_ptr)
{
int m_min, m_max, m;
uintptr_t v;
@ -101,7 +101,7 @@ index 9ba4409..6da4b38 100644
return NULL;
}
/* binary search (cf Knuth) */
@@ -1412,15 +1428,18 @@ TranslationBlock *tb_find_pc(uintptr_t tc_ptr)
@@ -1404,15 +1420,18 @@ TranslationBlock *tb_find_pc(uintptr_t tc_ptr)
m = (m_min + m_max) >> 1;
tb = &tbs[m];
v = (uintptr_t)tb->tc_ptr;

View File

@ -1,4 +1,4 @@
From 63697bbdfd6ccede902ce09cb0c4f860e0fdf099 Mon Sep 17 00:00:00 2001
From 4803eca554ee475b50b7a106af1d250a5b525884 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
@ -17,10 +17,10 @@ Signed-off-by: Alexander Graf <agraf@suse.de>
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index b0566cd..2efd7f4 100644
index 0c3d4c5..d19efb8 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -4980,6 +4980,25 @@ static int open_self_stat(void *cpu_env, int fd)
@@ -5035,6 +5035,25 @@ static int open_self_stat(void *cpu_env, int fd)
return 0;
}
@ -46,7 +46,7 @@ index b0566cd..2efd7f4 100644
static int open_self_auxv(void *cpu_env, int fd)
{
TaskState *ts = ((CPUArchState *)cpu_env)->opaque;
@@ -5020,6 +5039,7 @@ static int do_open(void *cpu_env, const char *pathname, int flags, mode_t mode)
@@ -5075,6 +5094,7 @@ static int do_open(void *cpu_env, const char *pathname, int flags, mode_t mode)
{ "/proc/self/maps", open_self_maps },
{ "/proc/self/stat", open_self_stat },
{ "/proc/self/auxv", open_self_auxv },

View File

@ -1,54 +0,0 @@
From a81c9410cc3538dfeb22484d1daa95e6a5bb1e79 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Wed, 11 Jul 2012 23:15:47 +0200
Subject: [PATCH] XXX merge with segmentation fault passing patch
---
user-exec.c | 32 +++++++++++++++++++-------------
1 files changed, 19 insertions(+), 13 deletions(-)
diff --git a/user-exec.c b/user-exec.c
index 83d2d44..cc57bde 100644
--- a/user-exec.c
+++ b/user-exec.c
@@ -100,21 +100,27 @@ static inline int handle_cpu_signal(uintptr_t pc, unsigned long address,
/* Maybe we're still holding the TB fiddling lock? */
spin_unlock_safe(&tb_lock);
- if (h2g_valid(address)) {
- /* XXX: locking issue */
- if (is_write && page_unprotect(h2g(address), pc, puc)) {
- return 1;
- }
+ /* XXX: locking issue */
+ if (h2g_valid(address) && is_write &&
+ page_unprotect(h2g(address), pc, puc)) {
+ return 1;
+ }
- /* see if it is an MMU fault */
- ret = cpu_handle_mmu_fault(env, h2g(address), is_write, MMU_USER_IDX);
- if (ret < 0) {
- return 0; /* not an MMU fault */
- }
- if (ret == 0) {
- return 1; /* the MMU fault was handled without causing real CPU fault */
- }
+ if (RESERVED_VA) {
+ /* Convert forcefully to guest address space, invalid addresses
+ are still valid segv ones */
+ address = address - GUEST_BASE;
}
+
+ /* see if it is an MMU fault */
+ ret = cpu_handle_mmu_fault(env, address, is_write, MMU_USER_IDX);
+ if (ret < 0) {
+ return 0; /* not an MMU fault */
+ }
+ if (ret == 0) {
+ return 1; /* the MMU fault was handled without causing real CPU fault */
+ }
+
/* now we have a real cpu fault */
tb = tb_find_pc(pc);
if (tb) {

View File

@ -1,69 +0,0 @@
From 3ff16f3f6b220d13caeb068a865c82675da802ba Mon Sep 17 00:00:00 2001
From: Richard W.M. Jones <rjones@redhat.com>
Date: Thu, 5 Jul 2012 03:32:44 +0000
Subject: [PATCH] Replace 'struct siginfo' with 'siginfo_t'.
glibc 2.16 will remove the undocumented definition of 'struct siginfo'
from <bits/siginfo.h>.
This change is already present in glibc 2.15.90, so qemu compilation
of certain targets (eg. cris-user) breaks.
This struct was always typedef'd to be the same as 'siginfo_t' which
is what POSIX documents, so use that instead.
Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
---
linux-user/signal.c | 8 ++++----
user-exec.c | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/linux-user/signal.c b/linux-user/signal.c
index c00cf75..f33ea70 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -2877,7 +2877,7 @@ static void setup_rt_frame(int sig, struct target_sigaction *ka,
* Arguments to signal handler:
*
* a0 = signal number
- * a1 = pointer to struct siginfo
+ * a1 = pointer to siginfo_t
* a2 = pointer to struct ucontext
*
* $25 and PC point to the signal handler, $29 points to the
@@ -3283,7 +3283,7 @@ struct target_signal_frame {
};
struct rt_signal_frame {
- struct siginfo info;
+ siginfo_t info;
struct ucontext uc;
uint32_t tramp[2];
};
@@ -3502,9 +3502,9 @@ struct target_signal_frame {
};
struct rt_signal_frame {
- struct siginfo *pinfo;
+ siginfo_t *pinfo;
void *puc;
- struct siginfo info;
+ siginfo_t info;
struct ucontext uc;
uint8_t retcode[8]; /* Trampoline code. */
};
diff --git a/user-exec.c b/user-exec.c
index cc57bde..2d7f6c9 100644
--- a/user-exec.c
+++ b/user-exec.c
@@ -599,7 +599,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
int cpu_signal_handler(int host_signum, void *pinfo,
void *puc)
{
- struct siginfo *info = pinfo;
+ siginfo_t *info = pinfo;
struct ucontext *uc = puc;
unsigned long pc = uc->uc_mcontext.sc_iaoq[0];
uint32_t insn = *(uint32_t *)pc;

View File

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

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

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

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Fri Aug 17 14:30:28 UTC 2012 - afaerber@suse.de
- update to v1.2.0-rc0: http://wiki.qemu.org/ChangeLog/1.2
* adapt update_git.sh script
* package new qemu-or32 executable into linux-user
-------------------------------------------------------------------
Wed Aug 15 20:50:02 UTC 2012 - dmueller@suse.com

View File

@ -21,9 +21,9 @@ Url: http://www.qemu.org/
Summary: Universal CPU emulator
License: BSD-3-Clause ; GPL-2.0+ ; LGPL-2.1+ ; MIT
Group: System/Emulators/PC
Version: 1.1.0
Version: 1.2.0rc0
Release: 0
Source: %name-%version-1.tar.bz2
Source: %name-1.2.0-rc0.tar.bz2
Patch0001: 0001-Handle-CPU-interrupts-by-inline-che.patch
Patch0002: 0002-XXX-dont-dump-core-on-sigabort.patc.patch
Patch0003: 0003-XXX-work-around-SA_RESTART-race-wit.patch
@ -34,7 +34,7 @@ Patch0007: 0007-qemu-cvs-alsa_mmap.patch.patch
Patch0008: 0008-qemu-cvs-gettimeofday.patch.patch
Patch0009: 0009-qemu-cvs-ioctl_debug.patch.patch
Patch0010: 0010-qemu-cvs-ioctl_nodirection.patch.patch
Patch0011: 0011-qemu-img-vmdk-scsi.patch.patch
Patch0011: 0011-block-vmdk-Support-creation-of-SCSI.patch
Patch0012: 0012-configure-Enable-mipsn32-linux-user.patch
Patch0013: 0013-linux-user-add-binfmt-wrapper-for-a.patch
Patch0014: 0014-linux-user-Ignore-timer_create-sysc.patch
@ -42,18 +42,15 @@ Patch0015: 0015-linux-user-be-silent-about-capget-f.patch
Patch0016: 0016-PPC-KVM-Disable-mmu-notifier-check..patch
Patch0017: 0017-linux-user-fix-segfault-deadlock.pa.patch
Patch0018: 0018-linux-user-binfmt-support-host-bina.patch
Patch0019: 0019-linux-user-ARM-Ignore-immediate-val.patch
Patch0020: 0020-linux-user-arm-no-tb_flush-on-reset.patch
Patch0021: 0021-linux-user-fix-multi-threaded-proc-.patch
Patch0022: 0022-use-libexecdir-instead-of-ignoring-.patch
Patch0023: 0023-linux-user-Ignore-broken-loop-ioctl.patch
Patch0024: 0024-linux-user-fix-segmentation-fault-p.patch
Patch0025: 0025-linux-user-lock-tcg.patch.patch
Patch0026: 0026-linux-user-Run-multi-threaded-code-.patch
Patch0027: 0027-linux-user-lock-tb-flushing-too.pat.patch
Patch0028: 0028-XXX-merge-with-segmentation-fault-p.patch
Patch0029: 0029-linux-user-Fake-proc-cpuinfo.patch.patch
Patch0030: 0030-Replace-struct-siginfo-with-siginfo.patch
Patch0019: 0019-linux-user-arm-no-tb_flush-on-reset.patch
Patch0020: 0020-linux-user-fix-multi-threaded-proc-.patch
Patch0021: 0021-use-libexecdir-instead-of-ignoring-.patch
Patch0022: 0022-linux-user-Ignore-broken-loop-ioctl.patch
Patch0023: 0023-linux-user-fix-segmentation-fault-p.patch
Patch0024: 0024-linux-user-lock-tcg.patch.patch
Patch0025: 0025-linux-user-Run-multi-threaded-code-.patch
Patch0026: 0026-linux-user-lock-tb-flushing-too.pat.patch
Patch0027: 0027-linux-user-Fake-proc-cpuinfo.patch.patch
# this is to make lint happy
Source300: rpmlintrc
Source302: bridge.conf
@ -164,7 +161,7 @@ emulations. This can be used together with the OBS build script to
run cross-architecture builds.
%prep
%setup -q
%setup -q -n qemu-1.2.0-rc0
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
@ -192,9 +189,6 @@ run cross-architecture builds.
%patch0025 -p1
%patch0026 -p1
%patch0027 -p1
%patch0028 -p1
%patch0029 -p1
%patch0030 -p1
%build
# build QEMU
@ -318,6 +312,7 @@ rm -rf ${RPM_BUILD_ROOT}
%_bindir/qemu-mipsel
%_bindir/qemu-mipsn32
%_bindir/qemu-mipsn32el
%_bindir/qemu-or32
%_bindir/qemu-ppc64abi32
%_bindir/qemu-ppc64
%_bindir/qemu-ppc

View File

@ -21,9 +21,9 @@ Url: http://www.qemu.org/
Summary: Universal CPU emulator
License: BSD-3-Clause ; GPL-2.0+ ; LGPL-2.1+ ; MIT
Group: System/Emulators/PC
Version: 1.1.0
Version: 1.2.0rc0
Release: 0
Source: %name-%version-1.tar.bz2
Source: %name-1.2.0-rc0.tar.bz2
PATCH_FILES
# this is to make lint happy
Source300: rpmlintrc
@ -135,7 +135,7 @@ emulations. This can be used together with the OBS build script to
run cross-architecture builds.
%prep
%setup -q
%setup -q -n qemu-1.2.0-rc0
PATCH_EXEC
%build
@ -260,6 +260,7 @@ rm -rf ${RPM_BUILD_ROOT}
%_bindir/qemu-mipsel
%_bindir/qemu-mipsn32
%_bindir/qemu-mipsn32el
%_bindir/qemu-or32
%_bindir/qemu-ppc64abi32
%_bindir/qemu-ppc64
%_bindir/qemu-ppc

View File

@ -12,8 +12,8 @@
GIT_TREE=git://repo.or.cz/qemu/agraf.git
GIT_LOCAL_TREE=/suse/agraf/git/qemu
GIT_BRANCH=suse-1.1
GIT_UPSTREAM_TAG=v1.1.0
GIT_BRANCH=suse-1.2
GIT_UPSTREAM_TAG=v1.2.0-rc0
QEMU_TMP=/dev/shm/qemu-tmp
# clean up