From 023367e6cd41199521613674b44e9c703c8be1a1 Mon Sep 17 00:00:00 2001 From: Wolfgang Mauerer Date: Mon, 11 Jul 2011 14:57:43 +0200 Subject: [PATCH 1/6] vhost build fix for i386 vhost.c uses __sync_fetch_and_and(), which is only available for -march=i486 and above (see https://bugzilla.redhat.com/show_bug.cgi?id=624279). Signed-off-by: Wolfgang Mauerer Signed-off-by: Stefan Hajnoczi --- configure | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/configure b/configure index 38e3724f33..9bfe917c57 100755 --- a/configure +++ b/configure @@ -2509,6 +2509,29 @@ if test "$trace_backend" = "dtrace"; then fi fi +########################################## +# __sync_fetch_and_and requires at least -march=i486. Many toolchains +# use i686 as default anyway, but for those that don't, an explicit +# specification is necessary +if test $vhost_net = "yes" && test $cpu = "i386"; then + cat > $TMPC << EOF +int sfaa(unsigned *ptr) +{ + return __sync_fetch_and_and(ptr, 0); +} + +int main(int argc, char **argv) +{ + int val = 42; + sfaa(&val); + return val; +} +EOF + if ! compile_prog "" "" ; then + CFLAGS+="-march=i486" + fi +fi + ########################################## # End of CC checks # After here, no more $cc or $ld runs From 45b75ae4ee19a74c826a94e073762b5c7080a90c Mon Sep 17 00:00:00 2001 From: Alexandre Raymond Date: Wed, 20 Jul 2011 23:12:15 -0400 Subject: [PATCH 2/6] Makefile: Minor cscope fixups Create cscope symbols for assembly files in addition to .c/.h files. Create cscope database with full path instead of relative path so cscope can be used with CSCOPE_DB in any directory. Signed-off-by: Alexandre Raymond Signed-off-by: Stefan Hajnoczi --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index daa3aa09b5..eb1c788d35 100644 --- a/Makefile +++ b/Makefile @@ -291,7 +291,7 @@ TAGS: cscope: rm -f ./cscope.* - find . -name "*.[ch]" -print | sed 's,^\./,,' > ./cscope.files + find "$(SRC_PATH)" -name "*.[chsS]" -print | sed 's,^\./,,' > ./cscope.files cscope -b # documentation From cf2846b5fa5cf85685e8a238323194b2ff9b5faf Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Thu, 21 Jul 2011 21:46:45 +0200 Subject: [PATCH 3/6] slirp: Fix unusual "comments" in unused code cppcheck detected two rather strange comments which were not correctly written as C comments. They did not cause any harm because they were framed by #ifdef notdef ... #endif, so they were never compiled. Fix them nevertheless (we could also remove the unused code). Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- slirp/ip_input.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/slirp/ip_input.c b/slirp/ip_input.c index 5e67631ab4..c7b3eb4806 100644 --- a/slirp/ip_input.c +++ b/slirp/ip_input.c @@ -511,7 +511,7 @@ typedef uint32_t n_time; */ break; } - off--; / * 0 origin * / + off--; /* 0 origin */ if (off > optlen - sizeof(struct in_addr)) { /* * End of source route. Should be for us. @@ -554,7 +554,7 @@ typedef uint32_t n_time; /* * If no space remains, ignore. */ - off--; * 0 origin * + off--; /* 0 origin */ if (off > optlen - sizeof(struct in_addr)) break; bcopy((caddr_t)(&ip->ip_dst), (caddr_t)&ipaddr.sin_addr, From c20cdf8b91b45a4f60a5ceeaab31b830b02adb7a Mon Sep 17 00:00:00 2001 From: Zhi Yong Wu Date: Wed, 27 Jul 2011 14:32:56 +0800 Subject: [PATCH 4/6] qmp: fix efect -> effect typo in qmp-commands.hx Signed-off-by: Zhi Yong Wu Signed-off-by: Stefan Hajnoczi --- qmp-commands.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qmp-commands.hx b/qmp-commands.hx index 54e313ce52..03f67da198 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -42,7 +42,7 @@ and we're going to establish a deprecation policy for badly defined commands. If you're planning to adopt QMP, please observe the following: - 1. The deprecation policy will take efect and be documented soon, please + 1. The deprecation policy will take effect and be documented soon, please check the documentation of each used command as soon as a new release of QEMU is available From 016c77ad62a8ad607dd4349d8cb8ad1365bab831 Mon Sep 17 00:00:00 2001 From: Michael Roth Date: Tue, 26 Jul 2011 11:39:24 -0500 Subject: [PATCH 5/6] Makefile: add missing deps on $(GENERATED_HEADERS) This fixes a build issue with make -j6+ due to qapi-generated files being built before $(GENERATED_HEADERS) have been created. Tested-by: Stefan Berger Signed-off-by: Michael Roth Signed-off-by: Stefan Hajnoczi --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index eb1c788d35..48552512d6 100644 --- a/Makefile +++ b/Makefile @@ -192,8 +192,10 @@ test-qmp-commands.o: $(addprefix $(qapi-dir)/, test-qapi-types.c test-qapi-types test-qmp-commands: test-qmp-commands.o qfloat.o qint.o qdict.o qstring.o qlist.o qbool.o $(qapi-obj-y) error.o osdep.o qemu-malloc.o $(oslib-obj-y) qjson.o json-streamer.o json-lexer.o json-parser.o qerror.o qemu-error.o qemu-tool.o $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o $(qapi-dir)/test-qmp-marshal.o module.o QGALIB=qga/guest-agent-command-state.o qga/guest-agent-commands.o +QGALIB_GEN=$(addprefix $(qapi-dir)/, qga-qapi-types.c qga-qapi-types.h qga-qapi-visit.c qga-qmp-marshal.c) -qemu-ga.o: $(addprefix $(qapi-dir)/, qga-qapi-types.c qga-qapi-types.h qga-qapi-visit.c qga-qmp-marshal.c) $(qapi-obj-y) +$(QGALIB_GEN): $(GENERATED_HEADERS) +$(QGALIB) qemu-ga.o: $(QGALIB_GEN) $(qapi-obj-y) qemu-ga$(EXESUF): qemu-ga.o $(QGALIB) qemu-tool.o qemu-error.o error.o $(oslib-obj-y) $(trace-obj-y) $(block-obj-y) $(qobject-obj-y) $(version-obj-y) $(qapi-obj-y) qemu-timer-common.o qemu-sockets.o module.o qapi/qmp-dispatch.o qapi/qmp-registry.o $(qapi-dir)/qga-qapi-visit.o $(qapi-dir)/qga-qapi-types.o $(qapi-dir)/qga-qmp-marshal.o QEMULIBS=libhw32 libhw64 libuser libdis libdis-user From ec67464c4f137f58c040d1d351f540268e883b85 Mon Sep 17 00:00:00 2001 From: Juan Quintela Date: Mon, 11 Jul 2011 18:15:11 +0200 Subject: [PATCH 6/6] xen_mapcache: remove unused variable Signed-off-by: Juan Quintela Acked-by: Stefano Stabellini Signed-off-by: Stefan Hajnoczi --- xen-mapcache.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xen-mapcache.c b/xen-mapcache.c index 007136af26..15d12413d4 100644 --- a/xen-mapcache.c +++ b/xen-mapcache.c @@ -237,7 +237,7 @@ uint8_t *xen_map_cache(target_phys_addr_t phys_addr, target_phys_addr_t size, ram_addr_t xen_ram_addr_from_mapcache(void *ptr) { - MapCacheEntry *entry = NULL, *pentry = NULL; + MapCacheEntry *entry = NULL; MapCacheRev *reventry; target_phys_addr_t paddr_index; target_phys_addr_t size; @@ -263,7 +263,6 @@ ram_addr_t xen_ram_addr_from_mapcache(void *ptr) entry = &mapcache->entry[paddr_index % mapcache->nr_buckets]; while (entry && (entry->paddr_index != paddr_index || entry->size != size)) { - pentry = entry; entry = entry->next; } if (!entry) {