aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorChristian Borntraeger <borntraeger@de.ibm.com>2012-08-10 15:11:45 +0200
committerMichael Roth <mdroth@linux.vnet.ibm.com>2012-10-09 01:58:30 -0500
commit7566759fd5896456fd6fa6d94ed388c11158dcef (patch)
tree154f0b198be4ec77b01b608aca274313c09d6f29 /configure
parent47b11da1e94aa17109522f97a6188f5ecd75c25e (diff)
qemu: Use valgrind annotations to mark kvm guest memory as defined
valgrind with kvm produces a big amount of false positives regarding "Conditional jump or move depends on uninitialised value(s)". This happens because the guest memory is allocated with qemu_vmalloc which boils down posix_memalign etc. This function is (correctly) considered by valgrind as returning undefined memory. Since valgrind is based on jitting code, it will not be able to see changes made by the guest to guest memory if this is done by KVM_RUN, thus keeping most of the guest memory undefined. Now lots of places in qemu will then use guest memory to change behaviour. To avoid the flood of these messages, lets declare the whole guest memory as defined. This will reduce the noise and allows us to see real problems. In the future we might want to make this conditional, since there is actually something that we can use those false positives for: These messages will point to code that depends on guest memory, so we can use these backtraces to actually make an audit that is focussed only at those code places. For normal development we dont want to see those messages, though. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com> (cherry picked from commit 62fe83318d2fc5b31f473d66326910d94c1c4907) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure3
1 files changed, 2 insertions, 1 deletions
diff --git a/configure b/configure
index 8f501b0292..bd5f811789 100755
--- a/configure
+++ b/configure
@@ -2927,11 +2927,12 @@ if compile_prog "-Werror" "" ; then
fi
########################################
-# check if we have valgrind/valgrind.h
+# check if we have valgrind/valgrind.h and valgrind/memcheck.h
valgrind_h=no
cat > $TMPC << EOF
#include <valgrind/valgrind.h>
+#include <valgrind/memcheck.h>
int main(void) {
return 0;
}