Merge remote-tracking branch 'stefanha/trivial-patches' into staging

This commit is contained in:
Anthony Liguori 2011-12-19 09:10:49 -06:00
commit 3cfdd0da7e
7 changed files with 58 additions and 34 deletions

View File

@ -92,12 +92,6 @@ tci-dis.o: QEMU_CFLAGS += -I$(SRC_PATH)/tcg -I$(SRC_PATH)/tcg/tci
$(libobj-y): $(GENERATED_HEADERS)
translate.o: translate.c cpu.h
translate-all.o: translate-all.c cpu.h
tcg/tcg.o: cpu.h
# HELPER_CFLAGS is used for all the code compiled with static register
# variables
op_helper.o ldst_helper.o user-exec.o: QEMU_CFLAGS += $(HELPER_CFLAGS)

71
configure vendored
View File

@ -1082,7 +1082,7 @@ fi
# check that the C compiler works.
cat > $TMPC <<EOF
int main(void) {}
int main(void) { return 0; }
EOF
if compile_object ; then
@ -1274,11 +1274,11 @@ if test "$nptl" != "no" ; then
cat > $TMPC <<EOF
#include <sched.h>
#include <linux/futex.h>
void foo()
{
int main(void) {
#if !defined(CLONE_SETTLS) || !defined(FUTEX_WAIT)
#error bork
#endif
return 0;
}
EOF
@ -1317,10 +1317,30 @@ fi
if test "$xen" != "no" ; then
xen_libs="-lxenstore -lxenctrl -lxenguest"
# Xen unstable
# First we test whether Xen headers and libraries are available.
# If no, we are done and there is no Xen support.
# If yes, more tests are run to detect the Xen version.
# Xen (any)
cat > $TMPC <<EOF
#include <xenctrl.h>
#include <xs.h>
int main(void) {
return 0;
}
EOF
if ! compile_prog "" "$xen_libs" ; then
# Xen not found
if test "$xen" = "yes" ; then
feature_not_found "xen"
fi
xen=no
# Xen unstable
elif (
cat > $TMPC <<EOF
#include <xenctrl.h>
#include <xs.h>
#include <stdint.h>
#include <xen/hvm/hvm_info_table.h>
#if !defined(HVM_MAX_VCPUS)
@ -1336,7 +1356,8 @@ int main(void) {
return 0;
}
EOF
if compile_prog "" "$xen_libs" ; then
compile_prog "" "$xen_libs"
) ; then
xen_ctrl_version=410
xen=yes
@ -1407,10 +1428,10 @@ EOF
xen_ctrl_version=330
xen=yes
# Xen not found or unsupported
# Xen version unsupported
else
if test "$xen" = "yes" ; then
feature_not_found "xen"
feature_not_found "xen (unsupported version)"
fi
xen=no
fi
@ -1670,6 +1691,7 @@ fi
# xfsctl() probe, used for raw-posix
if test "$xfs" != "no" ; then
cat > $TMPC << EOF
#include <stddef.h> /* NULL */
#include <xfs/xfs.h>
int main(void)
{
@ -1841,7 +1863,11 @@ if test "$curses" != "no" ; then
#ifdef __OpenBSD__
#define resize_term resizeterm
#endif
int main(void) { resize_term(0, 0); return curses_version(); }
int main(void) {
const char *s = curses_version();
resize_term(0, 0);
return s != 0;
}
EOF
for curses_lib in $curses_list; do
if compile_prog "" "$curses_lib" ; then
@ -1947,7 +1973,12 @@ PTHREADLIBS_LIST="-pthread -lpthread -lpthreadGC2"
pthread=no
cat > $TMPC << EOF
#include <pthread.h>
int main(void) { pthread_create(0,0,0,0); return 0; }
static void *f(void *p) { return NULL; }
int main(void) {
pthread_t thread;
pthread_create(&thread, 0, f, 0);
return 0;
}
EOF
if compile_prog "" "" ; then
pthread=yes
@ -2051,7 +2082,7 @@ cat > $TMPC <<EOF
#include <sys/types.h>
#include <sys/uio.h>
#include <unistd.h>
int main(void) { struct iovec iov; return 0; }
int main(void) { return sizeof(struct iovec); }
EOF
iovec=no
if compile_prog "" "" ; then
@ -2064,7 +2095,7 @@ cat > $TMPC <<EOF
#include <sys/types.h>
#include <sys/uio.h>
#include <unistd.h>
int main(void) { preadv; }
int main(void) { return preadv == preadv; }
EOF
preadv=no
if compile_prog "" "" ; then
@ -2097,7 +2128,7 @@ if test "$opengl" != "no" ; then
#include <X11/Xlib.h>
#include <GL/gl.h>
#include <GL/glx.h>
int main(void) { GL_VERSION; return 0; }
int main(void) { return GL_VERSION != 0; }
EOF
if compile_prog "" "-lGL" ; then
opengl=yes
@ -2228,7 +2259,7 @@ cat > $TMPC << EOF
int main(void)
{
int len, fd;
int len, fd = 0;
len = tee(STDIN_FILENO, STDOUT_FILENO, INT_MAX, SPLICE_F_NONBLOCK);
splice(STDIN_FILENO, NULL, fd, NULL, len, SPLICE_F_MOVE);
return 0;
@ -2242,7 +2273,6 @@ fi
# signalfd probe
signalfd="no"
cat > $TMPC << EOF
#define _GNU_SOURCE
#include <unistd.h>
#include <sys/syscall.h>
#include <signal.h>
@ -2260,8 +2290,7 @@ cat > $TMPC << EOF
int main(void)
{
int efd = eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC);
return 0;
return eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC);
}
EOF
if compile_prog "" "" ; then
@ -2361,8 +2390,7 @@ int main(void)
* warning but not an error, and will proceed to fail the
* qemu compile where we compile with -Werror.)
*/
epoll_create1;
return 0;
return epoll_create1 == epoll_create1;
}
EOF
if compile_prog "$ARCH_CFLAGS" "" ; then
@ -2441,7 +2469,7 @@ fi
cat > $TMPC <<EOF
#include <signal.h>
#include <time.h>
int main(void) { clockid_t id; return clock_gettime(id, NULL); }
int main(void) { return clock_gettime(CLOCK_REALTIME, NULL); }
EOF
if compile_prog "" "" ; then
@ -2651,7 +2679,7 @@ ucontext_coroutine=no
if test "$darwin" != "yes"; then
cat > $TMPC << EOF
#include <ucontext.h>
int main(void) { makecontext(0, 0, 0); }
int main(void) { makecontext(0, 0, 0); return 0; }
EOF
if compile_prog "" "" ; then
ucontext_coroutine=yes
@ -2664,7 +2692,7 @@ fi
open_by_hande_at=no
cat > $TMPC << EOF
#include <fcntl.h>
int main(void) { struct file_handle fh; open_by_handle_at(0, &fh, 0); }
int main(void) { struct file_handle fh; return open_by_handle_at(0, &fh, 0); }
EOF
if compile_prog "" "" ; then
open_by_handle_at=yes
@ -2677,6 +2705,7 @@ linux_magic_h=no
cat > $TMPC << EOF
#include <linux/magic.h>
int main(void) {
return 0;
}
EOF
if compile_prog "" "" ; then

View File

@ -493,7 +493,7 @@ void ide_sector_read(IDEState *s)
}
}
static void dma_buf_commit(IDEState *s, int is_write)
static void dma_buf_commit(IDEState *s)
{
qemu_sglist_destroy(&s->sg);
}
@ -532,7 +532,7 @@ static int ide_handle_rw_error(IDEState *s, int error, int op)
bdrv_iostatus_set_err(s->bs, error);
} else {
if (op & BM_STATUS_DMA_RETRY) {
dma_buf_commit(s, 0);
dma_buf_commit(s);
ide_dma_error(s);
} else {
ide_rw_error(s);
@ -565,7 +565,7 @@ void ide_dma_cb(void *opaque, int ret)
n = s->io_buffer_size >> 9;
sector_num = ide_get_sector(s);
if (n > 0) {
dma_buf_commit(s, ide_cmd_is_read(s));
dma_buf_commit(s);
sector_num += n;
ide_set_sector(s, sector_num);
s->nsector -= n;

View File

@ -324,9 +324,8 @@ static PCIBus *i440fx_common_init(const char *device_name,
pci_create_simple_multifunction(b, -1, true, "PIIX3"));
pci_bus_irqs(b, piix3_set_irq, pci_slot_get_pirq, piix3,
PIIX_NUM_PIRQS);
qdev_property_add_child(dev, "piix3", &piix3->dev.qdev, NULL);
}
qdev_property_add_child(dev, "piix3", &piix3->dev.qdev, NULL);
piix3->pic = pic;
(*pi440fx_state)->piix3 = piix3;

View File

@ -621,6 +621,7 @@ static void ssys_reset(void *opaque)
s->rcgc[0] = 1;
s->scgc[0] = 1;
s->dcgc[0] = 1;
ssys_calculate_system_clock(s);
}
static int stellaris_sys_post_load(void *opaque, int version_id)

View File

@ -977,7 +977,8 @@ int kvm_cpu_exec(CPUState *env)
ret = EXCP_INTERRUPT;
break;
}
DPRINTF("kvm run failed %s\n", strerror(-run_ret));
fprintf(stderr, "error: kvm run failed %s\n",
strerror(-run_ret));
abort();
}

View File

@ -351,7 +351,7 @@ void net_slirp_hostfwd_remove(Monitor *mon, const QDict *qdict)
host_addr, host_port);
monitor_printf(mon, "host forwarding rule for %s %s\n", src_str,
err ? "removed" : "not found");
err ? "not found" : "removed");
return;
fail_syntax: