From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43764) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXEOl-0004Zb-Qw for qemu-devel@nongnu.org; Thu, 25 Sep 2014 15:08:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XXEOc-0000iy-PB for qemu-devel@nongnu.org; Thu, 25 Sep 2014 15:08:15 -0400 Received: from e06smtp16.uk.ibm.com ([195.75.94.112]:38271) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXEOc-0000iN-E7 for qemu-devel@nongnu.org; Thu, 25 Sep 2014 15:08:06 -0400 Received: from /spool/local by e06smtp16.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 25 Sep 2014 20:07:59 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 08FB22190045 for ; Thu, 25 Sep 2014 20:07:36 +0100 (BST) Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id s8PJ7vQh45809668 for ; Thu, 25 Sep 2014 19:07:57 GMT Received: from d06av02.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s8PJ7uet009009 for ; Thu, 25 Sep 2014 13:07:56 -0600 From: Christian Borntraeger Date: Thu, 25 Sep 2014 21:07:54 +0200 Message-Id: <1411672074-21031-1-git-send-email-borntraeger@de.ibm.com> Subject: [Qemu-devel] [PATCH] kvm/valgrind: dont mark memory as initialized List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: pbonzini@redhat.com Cc: Christian Borntraeger , qemu-devel@nongnu.org since commit 7dda5dc82a77 ("migration: initialize RAM to zero") the guest memory is defined zero. No need to call valgrind on guest memory. This reverts commit 62fe83318d2f ("qemu: Use valgrind annotations to mark kvm guest memory as defined") thus speeding up kvm start if /valgrind/valgrind.h is available. Signed-off-by: Christian Borntraeger --- configure | 3 +-- kvm-all.c | 7 ------- 2 files changed, 1 insertions(+), 9 deletions(-) diff --git a/configure b/configure index eb9cbcd..3dfb339 100755 --- a/configure +++ b/configure @@ -3968,12 +3968,11 @@ else fi ######################################## -# check if we have valgrind/valgrind.h and valgrind/memcheck.h +# check if we have valgrind/valgrind.h valgrind_h=no cat > $TMPC << EOF #include -#include int main(void) { return 0; } diff --git a/kvm-all.c b/kvm-all.c index 8b9e66d..cf822a4 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -44,10 +44,6 @@ #include #endif -#ifdef CONFIG_VALGRIND_H -#include -#endif - /* KVM uses PAGE_SIZE in its definition of COALESCED_MMIO_MAX */ #define PAGE_SIZE TARGET_PAGE_SIZE @@ -1954,9 +1950,6 @@ int kvm_has_intx_set_mask(void) void kvm_setup_guest_memory(void *start, size_t size) { -#ifdef CONFIG_VALGRIND_H - VALGRIND_MAKE_MEM_DEFINED(start, size); -#endif if (!kvm_has_sync_mmu()) { int ret = qemu_madvise(start, size, QEMU_MADV_DONTFORK); -- 1.7.1