qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Stefan Weil <sw@weilnetz.de>
Cc: qemu-devel@nongnu.org, Avi Kivity <avi@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] Support running QEMU on Valgrind
Date: Mon, 31 Oct 2011 18:22:48 +0000	[thread overview]
Message-ID: <20111031182248.GJ27570@redhat.com> (raw)
In-Reply-To: <1319976446-12602-1-git-send-email-sw@weilnetz.de>

On Sun, Oct 30, 2011 at 01:07:26PM +0100, Stefan Weil wrote:
> Valgrind is a tool which can automatically detect many kinds of bugs.
> 
> Running QEMU on Valgrind with x86_64 hosts was not possible because
> Valgrind aborts when memalign is called with an alignment larger than
> 1 MiB. QEMU normally uses 2 MiB on Linux x86_64.
> 
> Now the alignment is reduced to the page size when QEMU is running on
> Valgrind.
> 
> valgrind.h is a copy from Valgrind svn trunk r12226 with trailing
> whitespace stripped but otherwise unmodified, so it still raises lots
> of errors when checked with scripts/checkpatch.pl.
> 
> It is included here to avoid a dependency on Valgrind.

In libvirt we do the following fun hack to avoid a build dep on valgrind:

    const char *ld = getenv("LD_PRELOAD");
    if (ld && strstr(ld, "vgpreload")) {
        fprintf(stderr, "Running under valgrind, disabling driver\n");
        return 0;
    }

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

  parent reply	other threads:[~2011-10-31 18:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-30 12:07 [Qemu-devel] [PATCH] Support running QEMU on Valgrind Stefan Weil
2011-10-30 13:41 ` Alexander Graf
2011-10-30 14:30   ` Stefan Weil
2011-10-30 14:45     ` Alexander Graf
2011-10-31  6:44       ` Markus Armbruster
2011-10-31  6:38   ` Markus Armbruster
2011-10-31 17:09     ` Stefan Weil
2011-10-31 18:30       ` Markus Armbruster
2011-10-31 19:01         ` Stefan Weil
2011-10-31 18:13 ` Anthony Liguori
2011-10-31 19:03   ` Stefan Weil
2011-10-31 19:19     ` Anthony Liguori
2011-10-31 18:22 ` Daniel P. Berrange [this message]
2011-10-31 18:51   ` Stefan Weil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111031182248.GJ27570@redhat.com \
    --to=berrange@redhat.com \
    --cc=avi@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=sw@weilnetz.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).