mirror of https://github.com/proxmox/mirror_qemu
kvm/valgrind: don't mark memory as initialized
since commitmaster7dda5dc82a
("migration: initialize RAM to zero") the guest memory is defined zero. No need to call valgrind on guest memory. This reverts commit62fe83318d
("qemu: Use valgrind annotations to mark kvm guest memory as defined") thus speeding up kvm start if <includedir>/valgrind/valgrind.h is available. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
parent
a697d240ff
commit
541be9274e
|
@ -3961,12 +3961,11 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
########################################
|
########################################
|
||||||
# check if we have valgrind/valgrind.h and valgrind/memcheck.h
|
# check if we have valgrind/valgrind.h
|
||||||
|
|
||||||
valgrind_h=no
|
valgrind_h=no
|
||||||
cat > $TMPC << EOF
|
cat > $TMPC << EOF
|
||||||
#include <valgrind/valgrind.h>
|
#include <valgrind/valgrind.h>
|
||||||
#include <valgrind/memcheck.h>
|
|
||||||
int main(void) {
|
int main(void) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,10 +44,6 @@
|
||||||
#include <sys/eventfd.h>
|
#include <sys/eventfd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_VALGRIND_H
|
|
||||||
#include <valgrind/memcheck.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* KVM uses PAGE_SIZE in its definition of COALESCED_MMIO_MAX */
|
/* KVM uses PAGE_SIZE in its definition of COALESCED_MMIO_MAX */
|
||||||
#define PAGE_SIZE TARGET_PAGE_SIZE
|
#define PAGE_SIZE TARGET_PAGE_SIZE
|
||||||
|
|
||||||
|
@ -1959,9 +1955,6 @@ int kvm_has_intx_set_mask(void)
|
||||||
|
|
||||||
void kvm_setup_guest_memory(void *start, size_t size)
|
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()) {
|
if (!kvm_has_sync_mmu()) {
|
||||||
int ret = qemu_madvise(start, size, QEMU_MADV_DONTFORK);
|
int ret = qemu_madvise(start, size, QEMU_MADV_DONTFORK);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue