From: Andrea Bolognani <abologna@redhat.com>
To: Wei Huang <wei@redhat.com>, qemu-arm@nongnu.org
Cc: peter.maydell@linaro.org, drjones@redhat.com,
shannon.zhao@linaro.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-arm] [PATCH V1 1/1] arm64: Add an option to turn on/off host-backed vPMU support
Date: Mon, 15 Aug 2016 19:24:38 +0200 [thread overview]
Message-ID: <1471281878.3003.13.camel@redhat.com> (raw)
In-Reply-To: <57B1EA05.2050908@redhat.com>
On Mon, 2016-08-15 at 11:12 -0500, Wei Huang wrote:
> > Did you already try driving this with libvirt? It should work
> > out of the box.
> >
> > If you haven't, I will do it :)
>
> No, I haven't. All tests were done based on command line to QEMU. :-)
Fair enough :)
I did some testing on my own using libvirt to drive a QEMU
binary that included your patch, and it looks like everything
is working as expected: if I turn PMU on using the appropriate
XML element (<pmu state='on'/>) I can access the performance
counters from inside the guest; if I disable it explicitly or
don't enable it, I can't.
The host-side testing involved making sure the 'pmu' flag
was passed, or not passed, to QEMU and the value, if any,
matched the guest XML.
The guest-side testing involved running
$ dmesg | grep -i pmu
$ perf list | grep 'Hardware event'
and making sure some output was returned in both cases, and
making sure the 'instructions' counter was not marked as '<not
supported>' in the output of
$ perf stat true
If the kind of testing I performed is not good enough, please
let me know and I'll do another round.
This was tested only with <cpu mode='host-passthrough'/> (the
libvirt equivalent of -cpu host), because the aarch64 CPU
driver in libvirt is not currently capable of handling other
CPU models for KVM guests.
I also verified that TCG guests didn't accept the 'pmu' flag.
--
Andrea Bolognani / Red Hat / Virtualization
next prev parent reply other threads:[~2016-08-15 17:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-13 5:52 [Qemu-arm] [PATCH V1 1/1] arm64: Add an option to turn on/off host-backed vPMU support Wei Huang
2016-08-15 9:31 ` Andrea Bolognani
2016-08-15 16:12 ` Wei Huang
2016-08-15 17:24 ` Andrea Bolognani [this message]
2016-08-15 10:09 ` [Qemu-arm] [Qemu-devel] " Andrew Jones
2016-08-15 16:59 ` Andrea Bolognani
2016-08-15 21:05 ` Wei Huang
2016-08-15 16:13 ` [Qemu-arm] " Peter Maydell
2016-08-15 21:15 ` [Qemu-devel] " Wei Huang
2016-08-19 17:05 ` [Qemu-arm] " Wei Huang
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=1471281878.3003.13.camel@redhat.com \
--to=abologna@redhat.com \
--cc=drjones@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=shannon.zhao@linaro.org \
--cc=wei@redhat.com \
/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).