Re: [RFC PATCH] perf/kvm: Guest Symbol Resolution for powerpc

2015-06-16 Thread David Ahern
On 6/15/15 8:50 PM, Hemant Kumar wrote: +/* + * Get the instruction pointer from the tracepoint data + */ +u64 arch__get_ip(struct perf_evsel *evsel, struct perf_sample *data) +{ + u64 tp_ip = data-ip; + int trap; + + if (!strcmp(KVMPPC_EXIT, evsel-name)) { + trap

Re: [RFC PATCH] perf/kvm: Guest Symbol Resolution for powerpc

2015-06-16 Thread David Ahern
On 6/16/15 7:24 PM, Hemant Kumar wrote: Because, this depends on the kernel tracepoint kvm_hv:kvm_guest_exit. perf_prepare_sample() in the kernel side sets the event-header.misc field to PERF_RECORD_MISC_KERNEL through perf_misc_flags(pt_regs). In case of tracepoints which always get hit in the

Re: [PATCH/RFC] KVM: perf/stat: Properly show submicrosecond times

2014-07-31 Thread David Ahern
On 7/31/14, 5:13 AM, Christian Borntraeger wrote: For lots of exits the min time (and sometimes max) is 0 or 1. Lets increase the accurancy similar to what the average field alread does. Seems reasonable to me. Acked-by: David Ahern dsah...@gmail.com Cc: Paolo Bonzini pbonz...@redhat.com

Re: [PATCH 08/11] perf kvm: allow for variable string sizes

2014-05-05 Thread David Ahern
On 5/5/14, 4:27 AM, Christian Borntraeger wrote: diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c index 922706c..806c0e4 100644 --- a/tools/perf/builtin-kvm.c +++ b/tools/perf/builtin-kvm.c @@ -75,7 +75,7 @@ struct kvm_events_ops { bool (*is_end_event)(struct perf_evsel

Re: [PATCH/RFC 00/11] perf/s390/kvm: trace events, perf kvm stat

2014-05-02 Thread David Ahern
look good to me Review feedback is welcome. CC-ing David Ahern I don't have the original emails, but looking at https://lkml.org/lkml/2014/4/25/331 [PATCH 01/11] s390: add sie exit reasons tables [PATCH 02/11] KVM: s390: Use trace tables from sie.h [PATCH 03/11] KVM: s390: decoder of SIE

Re: [PULL 2/2] perf-kvm: fix of 'Min time' counting in report command

2014-04-09 Thread David Ahern
; + init_stats(event-total.stats); return event; } Reviewed-by: David Ahern dsah...@gmail.com -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: RFC: paravirtualizing perf_clock

2013-10-31 Thread David Ahern
On 10/31/13, 2:09 AM, Masami Hiramatsu wrote: (2013/10/30 23:03), David Ahern wrote: On 10/29/13 11:59 PM, Masami Hiramatsu wrote: (2013/10/29 11:58), David Ahern wrote: To back out a bit, my end goal is to be able to create and merge perf-events from any context on a KVM-based host -- guest

Re: RFC: paravirtualizing perf_clock

2013-10-30 Thread David Ahern
On 10/29/13 11:59 PM, Masami Hiramatsu wrote: (2013/10/29 11:58), David Ahern wrote: To back out a bit, my end goal is to be able to create and merge perf-events from any context on a KVM-based host -- guest userspace, guest kernel space, host userspace and host kernel space (userspace events

Re: RFC: paravirtualizing perf_clock

2013-10-30 Thread David Ahern
On 10/30/13 8:20 AM, Gleb Natapov wrote: So can you explain a little bit more about how this will work? You run perf on a host and get both host and guest events? How do you pass events from guest to host in this case? The intent is to allow data capture to occur in both contexts (host and

Re: RFC: paravirtualizing perf_clock

2013-10-28 Thread David Ahern
On 10/28/13 7:15 AM, Peter Zijlstra wrote: Any suggestions on how to do this and without impacting performance. I noticed the MSR path seems to take about twice as long as the current implementation (which I believe results in rdtsc in the VM for x86 with stable TSC). So assuming all the TSCs

RFC: paravirtualizing perf_clock

2013-10-27 Thread David Ahern
Often when debugging performance problems in a virtualized environment you need to correlate what is happening in the guest with what is happening in the host. To correlate events you need a common time basis (or the ability to directly correlate the two). The attached patch paravirtualizes

Re: Experiments using perf support in arm kvm guest

2013-09-23 Thread David Ahern
[Added Gleb and kvm list] On 9/23/13 9:53 AM, William Cohen wrote: Hi All, I was curious to see how well (or poorly) perf events work in a virtualizated environment. As a little experiment I have tried building papi from the git repo in a fedora rawhide guest vm running on an Intel ivy

Re: BUG: perf kvm top --callgraph not showing callgraph

2013-06-14 Thread David Ahern
[added kvm devel list and Xiao who implemented the original perf-kvm as I recall] On 6/14/13 5:11 PM, Cody P Schafer wrote: I am under the impression the limitations are these 2 snippets in arch/x86/kernel/cpu/perf_event.c: Yep, that's disabling the in-kernel callchain generation (the in-perf

Fwd: [PATCH 00/16] perf: kvm live mode

2013-05-25 Thread David Ahern
forgot to add kvm list to the cc list. Original Message Subject: [PATCH 00/16] perf: kvm live mode Date: Sat, 25 May 2013 18:24:40 -0600 From: David Ahern dsah...@gmail.com To: linux-ker...@vger.kernel.org CC: a...@ghostprotocols.net, mi...@kernel.org, fweis...@gmail.com, pet

Re: Tracing kvm: kvm_entry and kvm_exit

2013-03-05 Thread David Ahern
On 3/3/13 11:15 PM, Mohamad Gebai wrote: host kernel version? 3.8 compiled from perf-kvm-live-3.8 I made no changes to the kernel side so essentially you are running v3.8 unmodified. guest kernel? 3.8.1 qemu-kvm command line? (leave out the disk and network arguments -- just the rest)

Re: Tracing kvm: kvm_entry and kvm_exit

2013-03-03 Thread David Ahern
On 3/3/13 10:36 PM, Mohamad Gebai wrote: Thank you for this, I have been testing it for the last couple of days, I can see that perf kvm is getting more stable. Though I just realized that if you launch perf kvm as soon as you start a VM, the VM fails to boot. Any idea why this happens? no,

Re: Tracing kvm: kvm_entry and kvm_exit

2013-02-27 Thread David Ahern
On 2/27/13 9:39 AM, David Ahern wrote: I have been playing with the live mode a bit lately. I'll add a debug to note 2 consecutive entry events without an exit -- see if it sheds some light on it. If you feel game take this for a spin: https://github.com/dsahern/linux/commits/perf-kvm-live

Re: [PATCH RFC 1/2] kvm: Handle undercommitted guest case in PLE handler

2012-10-10 Thread David Ahern
On 10/10/12 11:54 AM, Raghavendra K T wrote: No, I did something like this perf kvm --guestvmlinux ./vmlinux.guest top -g -U -d 3. Yes that is a good idea. (I am getting some segfaults with perf top, I think it is already fixed but yet to see the patch that fixes) What version of perf:

Re: [PATCH v8 3/3] KVM: perf: kvm events analysis tool

2012-09-20 Thread David Ahern
/header.c | 59 +++- tools/perf/util/header.h |1 + tools/perf/util/thread.h |2 + 6 files changed, 929 insertions(+), 6 deletions(-) Acked-by: David Ahern dsah...@gmail.com -- To unsubscribe from this list: send the line unsubscribe kvm

Re: [PATCH v8 2/3] perf: move stat related code to util/stat.c

2012-09-18 Thread David Ahern
On 9/17/12 2:31 AM, Dong Hao wrote: From: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com Then, the code can be shared between kvm events and perf stat [ Dong Hao haod...@linux.vnet.ibm.com: rebase it on acme's git tree ] Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com

Re: [PATCH v8 2/3] perf: move stat related code to util/stat.c

2012-09-18 Thread David Ahern
On 9/17/12 2:31 AM, Dong Hao wrote: From: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com Then, the code can be shared between kvm events and perf stat [ Dong Hao haod...@linux.vnet.ibm.com: rebase it on acme's git tree ] Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com

Re: [PATCH v8 2/3] perf: move stat related code to util/stat.c

2012-09-18 Thread David Ahern
On 9/18/12 7:53 PM, Xiao Guangrong wrote: Does not apply to Arnaldo's latest perf/core branch. The patch has already been applied to this branch: http://git.kernel.org/?p=linux/kernel/git/acme/linux.git;a=commit;h=0007eceaceb11520071d053acfe06ee3326b1d13 Did not expect that. ok. I'll try

Re: [PATCH v7 3/3] KVM: perf: kvm events analysis tool

2012-09-14 Thread David Ahern
On 9/13/12 8:56 PM, Xiao Guangrong wrote: We'd better keep the record/report function, sometimes, we can only get perf.data from the customers whose machine can not be reached for us. Especially, other tracepoints are also interesting for us when the customers encounter the performance issue,

Re: [PATCH v7 3/3] KVM: perf: kvm events analysis tool

2012-09-13 Thread David Ahern
On 9/13/12 7:45 AM, Arnaldo Carvalho de Melo wrote: Em Wed, Sep 12, 2012 at 10:56:44PM -0600, David Ahern escreveu: static const char * const kvm_usage[] = { +perf kvm [options] {top|record|report|diff|buildid-list|stat}, The usage for the report/record sub commands of stat is never

Re: [PATCH v7 3/3] KVM: perf: kvm events analysis tool

2012-09-12 Thread David Ahern
static const char * const kvm_usage[] = { -perf kvm [options] {top|record|report|diff|buildid-list}, +perf kvm [options] {top|record|report|diff|buildid-list|stat}, NULL }; The usage for the report/record sub commands of stat is never shown. e.g., $ perf kvm stat -- shows

Re: [PATCH v7 3/3] KVM: perf: kvm events analysis tool

2012-09-03 Thread David Ahern
On 9/3/12 2:48 AM, don wrote: 于 2012年08月31日 02:29, David Ahern 写道: In addition to Andrew's comment about making the stats struct and functions generic... Yes. :-) On 8/27/12 3:51 AM, Dong Hao wrote: ---8--- +static void exit_event_decode_key(struct event_key *key, char decode[20

Re: [PATCH v7 3/3] KVM: perf: kvm events analysis tool

2012-08-30 Thread David Ahern
In addition to Andrew's comment about making the stats struct and functions generic... On 8/27/12 3:51 AM, Dong Hao wrote: ---8--- +static void exit_event_decode_key(struct event_key *key, char decode[20]) +{ + const char *exit_reason = get_exit_reason(key-key); + +

Re: [PATCH v7 3/3] KVM: perf: kvm events analysis tool

2012-08-28 Thread David Ahern
On 8/28/12 12:35 AM, Andrew Jones wrote: This is the second user. As I said, move the stats code from builtin-stat.c. Or are you suggesting to duplicate the code once, and then refactor the second (really the third) time it's needed? gah, I misunderstood your comment. I see your point now.

Re: [PATCH v7 0/3] KVM: perf: kvm events analysis tool

2012-08-27 Thread David Ahern
On 8/27/12 3:59 AM, Xiao Guangrong wrote: CC David. Hi David, I should apologize to you that Dong forgot to post the patchset to you. Could you pick these up from the mail list? Yes, I do catch all perf related emails to LKML. I'll take a look at the patches today or tomorrow. David --

Re: setting time in guest with ntpdate results in VM hang

2012-08-27 Thread David Ahern
On 8/27/12 10:58 AM, Dale Swanston wrote: Good idea. I'll try that. But are there any tools available to determine what the VM is doing when it appears hung? I've looked but haven't found much on debug or diagnostics on a running VM. Any links? If you have the vmlinux, enable the gdbserver

Re: [PATCH v7 3/3] KVM: perf: kvm events analysis tool

2012-08-27 Thread David Ahern
On 8/27/12 9:53 AM, Andrew Jones wrote: On Mon, Aug 27, 2012 at 05:51:46PM +0800, Dong Hao wrote: snip +struct event_stats { + u64 count; + u64 time; + + /* used to calculate stddev. */ + double mean; + double M2; +}; How about moving the stats functions from

Re: [PATCH v7 3/3] KVM: perf: kvm events analysis tool

2012-08-24 Thread David Ahern
This one does not apply to Arnaldo's current perf/core branch. Please rebase. David On 8/23/12 7:15 PM, Dong Hao wrote: From: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com Add 'perf kvm stat' support to analyze kvm vmexit/mmio/ioport smartly Usage: - kvm stat run a command and gather

Re: perf uncore lkvm woes

2012-08-16 Thread David Ahern
On 8/16/12 5:17 AM, Peter Zijlstra wrote: If you don't mind printing a warning every time a Linux guest boots ;-) That feature already exists today for perf related probing. e.g., [585929.678746] kvm [10752]: vcpu0 unhandled rdmsr: 0x345 [585929.709870] kvm_set_msr_common: 54 callbacks

Re: [PATCH v6 3/3] KVM: perf kvm events analysis tool

2012-08-10 Thread David Ahern
Thanks for resubmitting this; it was on my to-do list as well. On 8/9/12 9:19 PM, Dong Hao wrote: +static bool kvm_events_exist(const char *event) +{ + char evt_path[MAXPATHLEN]; + int fd; + + snprintf(evt_path, MAXPATHLEN, %s/kvm/%s/id, tracing_events_path, +

Re: hang on reboot with 3.6-rc1

2012-08-09 Thread David Ahern
On 8/9/12 3:42 AM, Avi Kivity wrote: On 08/08/2012 07:27 PM, David Ahern wrote: Not sure if KVM is the culprit, but it is the last line shown on the console. I have to power cycle the server to reboot. Have you tried rmmoding the kvm modules before reboot? Were any guests running during

Re: hang on reboot with 3.6-rc1

2012-08-09 Thread David Ahern
On 8/9/12 11:26 AM, Alex Williamson wrote: On Thu, 2012-08-09 at 11:10 -0600, David Ahern wrote: On 8/9/12 3:42 AM, Avi Kivity wrote: On 08/08/2012 07:27 PM, David Ahern wrote: Not sure if KVM is the culprit, but it is the last line shown on the console. I have to power cycle the server

Re: hang on reboot with 3.6-rc1

2012-08-09 Thread David Ahern
On 8/9/12 1:03 PM, Alex Williamson wrote: I think you should be ok with just what is in Linus' tree now. The change in pci_acs_path_enabled is the same kind of bug, but I don't think you'll hit it with the fixed iommu code. Please let me know if that's not the case. Thanks, Indeed, latest

hang on reboot with 3.6-rc1

2012-08-08 Thread David Ahern
Not sure if KVM is the culprit, but it is the last line shown on the console. I have to power cycle the server to reboot. David attachment: kvm-3.6-rc1.png

Re: KVM entry failed, hardware error

2012-06-05 Thread David Ahern
On 6/4/12 12:28 PM, Johannes Bauer wrote: On 04.06.2012 10:53, Gleb Natapov wrote: On Sun, Jun 03, 2012 at 06:25:33PM +0200, Johannes Bauer wrote: Therefore, I've uploaded the compressed trace.dat file, so you can maybe have a look why the report tool barfs and interpret it correctly. I can't

Re: [RFC PATCH 1/1] NUMA aware scheduling per cpu vhost thread

2012-03-23 Thread David Ahern
On 3/23/12 12:32 PM, Thomas Lendacky wrote: Quick description of the tests: TCP_RR and UDP_RR using 256 byte request/response size in 1, 10, 30 and 60 instances TCP_STREAM and TCP_MAERTS using 256, 1K, 4K and 16K message sizes and 1 and 4 instances Remote host to VM using 1, 4,

Re: [PATCH] perf/x86: Fix HO/GO counting with SVM disabled

2012-02-28 Thread David Ahern
On 2/28/12 10:24 AM, Avi Kivity wrote: On 02/28/2012 05:55 PM, Joerg Roedel wrote: __init int amd_pmu_init(void) diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 5fa553b..773fee2 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -29,6 +29,7 @@

Re: [PATCH 3/3] KVM: perf: kvm events analysis tool

2012-02-20 Thread David Ahern
Finally got back to this. Overall nicely written command. Few comments and one for Arnaldo at the bottom. On 2/9/12 2:09 AM, Xiao Guangrong wrote: Add 'perf kvm-events' support to analyze kvm vmexit/mmio/ioport smartly Usage: - trace kvm events: perf kvm-events record, or, if other

Re: [PATCH 3/3] KVM: perf: kvm events analysis tool

2012-02-20 Thread David Ahern
On 2/20/12 8:52 PM, Xiao Guangrong wrote: +/* Both begin and end events did not get the key. */ +if (!event key-key == INVALID_KEY) +return; + Should not be able to get here with event unset, so the next 2 lines should not be needed. ie., you only want to process events where

Re: [PATCH 3/3] KVM: perf: kvm events analysis tool

2012-02-15 Thread David Ahern
On 2/15/12 9:59 PM, Xiao Guangrong wrote: Okay, i will post the next version after collecting your new comments! Thanks for your time, David! :) I had more comments, but got sidetracked and forgot to come back to this. I still haven't looked at the code yet, but some comments from

Re: [PATCH 3/3] KVM: perf: kvm events analysis tool

2012-02-13 Thread David Ahern
On 02/13/2012 03:06 AM, Xiao Guangrong wrote: On 02/13/2012 01:32 PM, David Ahern wrote: [sorry for the top post - you would think Android would have a better mail client] If the first patch is needed then kvm-events will not work with older, unpatched kernels. That's a big limitation

Re: [PATCH 3/3] KVM: perf: kvm events analysis tool

2012-02-12 Thread David Ahern
Compile fails on Fedora 16, x86_64 with latest tip-perf-core branch: In file included from builtin-kvm-events.c:19:0: ../../arch/x86/include/asm/svm.h:133:1: error: packed attribute is unnecessary for ‘vmcb_seg’ [-Werror=packed] ../../arch/x86/include/asm/svm.h:178:1: error: packed attribute is

Re: [PATCH 3/3] KVM: perf: kvm events analysis tool

2012-02-12 Thread David Ahern
...@linux.vnet.ibm.com wrote: On 02/13/2012 11:04 AM, David Ahern wrote: Compile fails on Fedora 16, x86_64 with latest tip-perf-core branch: In file included from builtin-kvm-events.c:19:0: ../../arch/x86/include/asm/svm.h:133:1: error: packed attribute is unnecessary for ‘vmcb_seg’ [-Werror=packed

Re: [PATCH v3 3/3] KVM: perf: kvm events analysis tool

2012-02-08 Thread David Ahern
On 02/07/2012 11:14 PM, Xiao Guangrong wrote: On 02/08/2012 01:55 AM, David Ahern wrote: On 02/07/2012 06:08 AM, Xiao Guangrong wrote: Add 'perf kvm-events' support to analyze kvm vmexit/mmio/ioport smartly example output? You can find a example output at this website: http

Re: [PATCH v3 3/3] KVM: perf: kvm events analysis tool

2012-02-08 Thread David Ahern
On 02/08/2012 08:07 PM, Xiao Guangrong wrote: Thanks for your review and explanation! The code of commit_pager_choice(): static void commit_pager_choice(void) { switch (use_pager) { case 0: setenv(PERF_PAGER, cat, 1); break; case 1:

Re: [PATCH v3 3/3] KVM: perf: kvm events analysis tool

2012-02-07 Thread David Ahern
On 02/07/2012 06:08 AM, Xiao Guangrong wrote: Add 'perf kvm-events' support to analyze kvm vmexit/mmio/ioport smartly example output? Usage: - trace kvm events: perf kvm-events record, or, if other tracepoints are also interesting, we can append the events like this:

Re: [PATCH 2/3] KVM: improve trace events of vmexit/mmio/ioport

2012-01-17 Thread David Ahern
On 01/17/2012 04:55 AM, Marcelo Tosatti wrote: On Tue, Jan 17, 2012 at 10:28:11AM +0800, Xiao Guangrong wrote: On 01/16/2012 05:38 PM, Avi Kivity wrote: On 01/16/2012 11:32 AM, Xiao Guangrong wrote: - trace vcpu_id for these events We can infer the vcpu id from the kvm_entry tracepoints,

Re: [PATCH 2/3] KVM: improve trace events of vmexit/mmio/ioport

2012-01-17 Thread David Ahern
On 01/17/2012 07:32 PM, Xiao Guangrong wrote: There is an ongoing 'discussion' about modifying existing tracepoints which your proposed patch violates. This is the start of it: Hmm, i think we can still add completed tracepoints in the new version kernel, if old version kernel is used, we

Re: [RFC][PATCH] KVM: perf: a smart tool to analyse kvm events

2012-01-16 Thread David Ahern
On 01/16/2012 02:30 AM, Xiao Guangrong wrote: This tool is very like xenoprof(if i remember correctly), and traces kvm events smartly. currently, it supports vmexit/mmio/ioport events. Usage: - to trace kvm events: # ./perf kvm-events record - show the result # ./perf kvm-events

Re: [RFC][PATCH] KVM: perf: a smart tool to analyse kvm events

2012-01-16 Thread David Ahern
On 01/16/2012 07:41 PM, Xiao Guangrong wrote: Have you thought about dumping a time history -- something similar to what perf-script can do with dumping events but adding in kvm-specific analysis like what you are doing in these examples? I will look into it and put it to my todo list if

Re: use of PMU in guest generates messages in host

2012-01-12 Thread David Ahern
On 01/11/2012 11:26 PM, Gleb Natapov wrote: On Wed, Jan 11, 2012 at 01:47:55PM -0700, David Ahern wrote: Using latest kernel tree (e343a895a9f342f239c5e3c5ffc6c0b1707e6244) which has KVM bits for using PMU in the guest. Host and guest are both running Fedora 16, 64-bit, with this kernel

Re: use of PMU in guest generates messages in host

2012-01-12 Thread David Ahern
On 01/12/2012 07:14 AM, Gleb Natapov wrote: This is MSR_OFFCORE_RSP_0 MSR which is not (yet?) supported. What is your host cpu and qemu command line? Host CPU: Intel(R) Xeon(R) CPU E5540 @ 2.53GHz and '-cpu host' is used on the qemu command line. Use -cpu host,model=29 should

use of PMU in guest generates messages in host

2012-01-11 Thread David Ahern
Using latest kernel tree (e343a895a9f342f239c5e3c5ffc6c0b1707e6244) which has KVM bits for using PMU in the guest. Host and guest are both running Fedora 16, 64-bit, with this kernel. Running this command in the guest: perf stat -ddd -- openssl speed aes Generates this in the host:

Re: [PATCH 6/9] perf: expose perf capability to other modules.

2011-11-01 Thread David Ahern
On 10/30/2011 10:53 AM, Gleb Natapov wrote: KVM needs to know perf capability to decide which PMU it can expose to a guest. Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/include/asm/perf_event.h | 11 +++ arch/x86/kernel/cpu/perf_event.c | 11 +++

Re: [PATCH 7/9] KVM: Expose the architectural performance monitoring CPUID leaf

2011-11-01 Thread David Ahern
On 10/30/2011 10:53 AM, Gleb Natapov wrote: From: Avi Kivity a...@redhat.com Provide a CPUID leaf that describes the emulated PMU. Signed-off-by: Avi Kivity a...@redhat.com Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/kvm/x86.c | 23 ++- 1 files

Re: [PATCH 6/9] perf: expose perf capability to other modules.

2011-11-01 Thread David Ahern
On 11/01/2011 10:13 AM, Gleb Natapov wrote: On Tue, Nov 01, 2011 at 09:49:19AM -0600, David Ahern wrote: On 10/30/2011 10:53 AM, Gleb Natapov wrote: KVM needs to know perf capability to decide which PMU it can expose to a guest. Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86

Re: [PATCH 7/9] KVM: Expose the architectural performance monitoring CPUID leaf

2011-11-01 Thread David Ahern
On 11/01/2011 10:18 AM, Gleb Natapov wrote: On Tue, Nov 01, 2011 at 09:49:27AM -0600, David Ahern wrote: On 10/30/2011 10:53 AM, Gleb Natapov wrote: From: Avi Kivity a...@redhat.com Provide a CPUID leaf that describes the emulated PMU. Signed-off-by: Avi Kivity a...@redhat.com Signed-off

Re: [PATCH 7/9] KVM: Expose the architectural performance monitoring CPUID leaf

2011-11-01 Thread David Ahern
On 11/01/2011 10:40 AM, Gleb Natapov wrote: If PERF_EVENTS is disabled in the host kernel will KVM return the right thing for the guest that might have PERF_EVENTS enabled? With correct implementation of perf_get_x86_pmu_capability() it should. PERF_EVENTS disable version should set

Re: Running KVM inside a chroot

2011-10-19 Thread David Ahern
On 10/18/2011 04:29 AM, Avi Kivity wrote: Almost all the exits show [FAILED TO PARSE], would this be a problem? Did you 'make install' trace-cmd? run it from outside the chroot. You need to install the plugins: make install_plugins David -- To unsubscribe from this list: send the line

Re: Perf for only one VM?

2011-10-05 Thread David Ahern
On 10/05/2011 01:54 PM, Robin Lee Powell wrote: Is it possible to get perf kvm record to record only what's going on on a single VM? The options seem to be --host (all host data) and --guest (all VM data). -p pid argument after the record. David -- To unsubscribe from this list: send the

Re: help? need to enable VT-d for 2.6.27

2011-08-30 Thread David Ahern
On 08/30/2011 10:29 AM, Chris Friesen wrote: I'm in a bit of an odd situation. We run an embedded version of linux on many different boards with different vendor agreements so it's painful to upgrade kernel versions. I've been asked to provide VT-d support for KVM on our kernel (primarily

Re: help? need to enable VT-d for 2.6.27

2011-08-30 Thread David Ahern
On 08/30/2011 12:11 PM, Chris Friesen wrote: On 08/30/2011 11:55 AM, David Ahern wrote: On 08/30/2011 10:29 AM, Chris Friesen wrote: I'm in a bit of an odd situation. We run an embedded version of linux on many different boards with different vendor agreements so it's painful to upgrade

Re: help? need to enable VT-d for 2.6.27

2011-08-30 Thread David Ahern
On 08/30/2011 01:39 PM, Chris Friesen wrote: On 08/30/2011 12:31 PM, David Ahern wrote: In my case I am setting the MAC address for the VFs in the host at boot; they are getting reset on passthrough so the VM driver creates a random one. A backport of commit a6b5ea3 fixes one aspect. Looking

[no subject]

2011-08-29 Thread David Ahern
subscribe -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: qemu-kvm aborts - vhost_dev_unassign_memory: Assertion `to = 0' failed.

2011-08-04 Thread David Ahern
On 08/03/2011 09:00 AM, Michael S. Tsirkin wrote: On Wed, Aug 03, 2011 at 07:55:47AM -0600, David Ahern wrote: Tested-by: David Ahern daah...@cisco.com David Applied, thanks very much. I assume this will make 0.15 since it is a regression? haven't seen the patch applied to that branch

Re: qemu-kvm aborts - vhost_dev_unassign_memory: Assertion `to = 0' failed.

2011-08-04 Thread David Ahern
On 08/04/2011 01:17 PM, Michael S. Tsirkin wrote: On Thu, Aug 04, 2011 at 12:48:49PM -0600, David Ahern wrote: On 08/03/2011 09:00 AM, Michael S. Tsirkin wrote: On Wed, Aug 03, 2011 at 07:55:47AM -0600, David Ahern wrote: Tested-by: David Ahern daah...@cisco.com David Applied, thanks

Re: qemu-kvm aborts - vhost_dev_unassign_memory: Assertion `to = 0' failed.

2011-08-03 Thread David Ahern
On 08/03/2011 06:24 AM, Michael S. Tsirkin wrote: On Wed, Aug 03, 2011 at 02:48:05PM +0300, Avi Kivity wrote: On 08/01/2011 08:44 PM, David Ahern wrote: qemu-kvm.git as of: commit dacdc4b10bafbb21120e1c24a9665444768ef999 Merge: 7b69d4f 0af4922 Author: Avi Kivitya...@redhat.com Date: Sun

qemu-kvm aborts - vhost_dev_unassign_memory: Assertion `to = 0' failed.

2011-08-01 Thread David Ahern
qemu-kvm.git as of: commit dacdc4b10bafbb21120e1c24a9665444768ef999 Merge: 7b69d4f 0af4922 Author: Avi Kivity a...@redhat.com Date: Sun Jul 31 11:42:26 2011 +0300 Merge branch 'upstream-merge' into next is aborting with the error: qemu-kvm: qemu-kvm.git/hw/vhost.c:123:

Re: qemu-kvm aborts - vhost_dev_unassign_memory: Assertion `to = 0' failed.

2011-08-01 Thread David Ahern
On 08/01/2011 11:44 AM, David Ahern wrote: qemu-kvm.git as of: commit dacdc4b10bafbb21120e1c24a9665444768ef999 Merge: 7b69d4f 0af4922 Author: Avi Kivity a...@redhat.com Date: Sun Jul 31 11:42:26 2011 +0300 Merge branch 'upstream-merge' into next is aborting with the error

Re: SR-IOV and KVM?

2011-06-27 Thread David Ahern
On 06/27/2011 02:18 AM, Troels Arvin wrote: David Ahern wrote: 82576EB and a Dell R410 are working fine for me, but my host OS is Fedora 14, not RHEL6. 82576EB is a dual-port embedded NIC? I have a quad-port PCIe card. (The 82576 which is in my R710 is a quad-port PCIe card.) Does

Re: SR-IOV and KVM?

2011-06-27 Thread David Ahern
On 06/27/2011 08:40 AM, Avi Kivity wrote: On 06/27/2011 05:15 PM, Chris Friesen wrote: Maybe it's just a documentation thing. I'm just getting into KVM and trying to figure everything out, and I don't see a step-by-step guide to configuring a host/guest system with either SR-IOV or Intel's

Re: SR-IOV and KVM?

2011-06-26 Thread David Ahern
On 06/25/2011 02:53 AM, Troels Arvin wrote: Hello, Chris Friesen wrote: Is anyone working on SR-IOV for KVM, specifically for networking? KVM is one of the few virtualization systems which supports SR-IOV. 82576EB and a Dell R410 are working fine for me, but my host OS is Fedora 14, not

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-16 Thread David Ahern
On 06/16/2011 07:53 AM, Avi Kivity wrote: On 06/15/2011 07:51 PM, David Ahern wrote: The qemu-kvm change is setting the pmu version to 1, and your patchset introduces v1 event constraints. So based on intel_pmu_init model=0 is an appropriate model - and a required parameter (-cpu host,model

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-16 Thread David Ahern
On 06/16/2011 08:08 AM, David Ahern wrote: Command: perf stat -e instructions openssl speed aes Hmm.. this might be the wrong benchmark for this. I thought openssl-speed was a purely CPU intensive benchmark which should have fairly similar performance numbers in both host and guest. I seem

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-16 Thread David Ahern
On 06/16/2011 08:20 AM, Avi Kivity wrote: On 06/16/2011 05:19 PM, David Ahern wrote: On 06/16/2011 08:08 AM, David Ahern wrote: Command: perf stat -e instructions openssl speed aes Hmm.. this might be the wrong benchmark for this. I thought openssl-speed was a purely CPU intensive

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-16 Thread David Ahern
On 06/16/2011 08:36 AM, Avi Kivity wrote: On 06/16/2011 05:32 PM, David Ahern wrote: Seems to be a side effect of running perf-stat in the guest. Running just 'openssl speed aes' in both host and guest shows very similar numbers (for the first 3 columns). Adding the 'perf stat

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-16 Thread David Ahern
On 06/16/2011 09:08 AM, Peter Zijlstra wrote: On Thu, 2011-06-16 at 08:08 -0600, David Ahern wrote: Command: perf stat -e instructions openssl speed aes Guest: 135,522,189,056 instructions #0.00 insns per cycle Host: 346,082,922,185 instructions

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-16 Thread David Ahern
On 06/16/2011 09:08 AM, Peter Zijlstra wrote: On Thu, 2011-06-16 at 08:08 -0600, David Ahern wrote: Command: perf stat -e instructions openssl speed aes Guest: 135,522,189,056 instructions #0.00 insns per cycle Host: 346,082,922,185 instructions

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-16 Thread David Ahern
On 06/16/2011 09:27 AM, Peter Zijlstra wrote: Sure, I've got a couple of those things lying around: # perf stat -e instructions:u ./loop_1b_instructions-4x Performance counter stats for './loop_1b_instructions-4x': 4,000,085,344 instructions:u#0.00 insns per cycle

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-16 Thread David Ahern
On 06/16/2011 09:59 AM, Avi Kivity wrote: On 06/16/2011 06:34 PM, David Ahern wrote: main () { int i; fork(); fork(); What happens without the two forks? you have a 1-billion instruction benchmark since there is only 1 process. David -- To unsubscribe from

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-16 Thread David Ahern
On 06/16/2011 10:31 AM, Avi Kivity wrote: On 06/16/2011 07:04 PM, David Ahern wrote: On 06/16/2011 09:59 AM, Avi Kivity wrote: On 06/16/2011 06:34 PM, David Ahern wrote: main () { int i; fork(); fork(); What happens without the two

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-15 Thread David Ahern
On 06/15/2011 02:57 AM, Avi Kivity wrote: Okay. If you do anything interesting with it, please let us know. I only tested the watchdog, 'perf top', and 'perf stat'. For the following I was using the userspace command from latest perf-core branch. cycles H/W event is not working for me, so

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-15 Thread David Ahern
On 06/15/2011 07:22 AM, Avi Kivity wrote: On 06/15/2011 03:40 PM, David Ahern wrote: On 06/15/2011 02:57 AM, Avi Kivity wrote: Okay. If you do anything interesting with it, please let us know. I only tested the watchdog, 'perf top', and 'perf stat'. For the following I was using

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-15 Thread David Ahern
On 06/15/2011 10:27 AM, Avi Kivity wrote: On 06/15/2011 07:08 PM, David Ahern wrote: What does dmesg say about Perf? [0.050995] Performance Events: Nehalem events, core PMU driver. [0.051466] ... version:1 [0.052998] ... bit width: 40

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-14 Thread David Ahern
On 06/14/2011 02:36 AM, Avi Kivity wrote: On 06/13/2011 10:55 PM, David Ahern wrote: On 06/13/2011 07:34 AM, Avi Kivity wrote: This patchset exposes an emulated version 1 architectural performance monitoring unit to KVM guests. The PMU is emulated using perf_events, so the host kernel

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-14 Thread David Ahern
On 06/14/2011 11:24 AM, Jan Kiszka wrote: On 2011-06-14 19:15, David Ahern wrote: On 06/14/2011 02:36 AM, Avi Kivity wrote: On 06/13/2011 10:55 PM, David Ahern wrote: On 06/13/2011 07:34 AM, Avi Kivity wrote: This patchset exposes an emulated version 1 architectural performance

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-14 Thread David Ahern
On 06/14/2011 11:33 AM, David Ahern wrote: Avi: still no luck: [0.047996] Performance Events: unsupported p6 CPU model 0 no PMU driver, software events only. qemu-kvm next branch, ce5f0a588b740e8f28f46a6009e12cfa72edc51f with your perfmon cpuid change. Host and guest are both running

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-14 Thread David Ahern
On 06/14/2011 11:48 AM, David Ahern wrote: On 06/14/2011 11:33 AM, David Ahern wrote: Avi: still no luck: [0.047996] Performance Events: unsupported p6 CPU model 0 no PMU driver, software events only. qemu-kvm next branch, ce5f0a588b740e8f28f46a6009e12cfa72edc51f with your perfmon

Re: [PATCH v2 08/11] KVM: VMX: Intercept RDPMC

2011-06-13 Thread David Ahern
On 06/13/2011 07:35 AM, Avi Kivity wrote: Intercept RDPMC and forward it to the PMU emulation code. Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/vmx.c | 15 ++- 1 files changed, 14 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/vmx.c

Re: [PATCH v2 08/11] KVM: VMX: Intercept RDPMC

2011-06-13 Thread David Ahern
On 06/13/2011 10:29 AM, Avi Kivity wrote: On 06/13/2011 07:17 PM, David Ahern wrote: On 06/13/2011 07:35 AM, Avi Kivity wrote: Intercept RDPMC and forward it to the PMU emulation code. Signed-off-by: Avi Kivitya...@redhat.com --- arch/x86/kvm/vmx.c | 15 ++- 1

Re: [PATCH v2 05/11] KVM: Expose a version 1 architectural PMU to guests

2011-06-13 Thread David Ahern
On 06/13/2011 07:35 AM, Avi Kivity wrote: diff --git a/arch/x86/kvm/pmu.c b/arch/x86/kvm/pmu.c new file mode 100644 index 000..763e763 --- /dev/null +++ b/arch/x86/kvm/pmu.c @@ -0,0 +1,255 @@ +/* + * Kernel-based Virtual Machine -- Performane Monitoring Unit support + * + * Copyright

Re: [PATCH v2 08/11] KVM: VMX: Intercept RDPMC

2011-06-13 Thread David Ahern
On 06/13/2011 11:38 AM, Ingo Molnar wrote: I should have known that. Is there some git magic I can use to avoid cloning yet another tree (I already have Ingo's tree for perf-core and perf-urgent along with Linus' tree)? You can use 'git remote add kvm ...' and then 'git remote update'.

Re: [PATCH v2 00/11] KVM in-guest performance monitoring

2011-06-13 Thread David Ahern
On 06/13/2011 07:34 AM, Avi Kivity wrote: This patchset exposes an emulated version 1 architectural performance monitoring unit to KVM guests. The PMU is emulated using perf_events, so the host kernel can multiplex host-wide, host-user, and the guest on available resources. Any particular

Re: USB EHCI patch for 0.14.0?

2011-06-06 Thread David Ahern
On 06/06/2011 05:33 AM, André Weidemann wrote: I also wanted to give EHCI support a try. Unfortunately your patch does not apply to current qemu-kvm git clone. Changes in hw/pc_piix.c and usb-linux.c make the patch fail. I was able to fix most rejects by hand, but the last reject in

Re: bridge with a bonded device - slow rate in the guest machine

2011-05-20 Thread David Ahern
On 05/20/11 03:12, Алексей Кашин wrote: Hi. Server with two gigabit NIC's. I'm trying to setup a bridge with a bonded device (2 links,balance-rr). host# cat /etc/network/interfaces auto lo iface lo inet loopback auto bond0 iface bond0 inet manual slaves eth0 eth1

Re: [PATCH] kvm tools: Default guest cpu count to host cpu count

2011-05-19 Thread David Ahern
On 05/18/11 13:56, Sasha Levin wrote: If user haven't specified cpu count for the guest, use the amount of online cpus on the host. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/kvm-run.c |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git

  1   2   >