lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110518110759.GB16556@elte.hu>
Date:	Wed, 18 May 2011 13:07:59 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Avi Kivity <avi@...hat.com>
Cc:	linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Arnaldo Carvalho de Melo <acme@...stprotocols.net>
Subject: Re: [PATCH v1 5/5] KVM: Expose a version 1 architectural PMU to
 guests


* Avi Kivity <avi@...hat.com> wrote:

> >>  - some combinations of INV and CMASK are not supported
> >
> > Could you please describe this better, where does this limit come from? If 
> > perf then this needs fixing.
> 
> perf_event_attr does not support generic INV and CMASK at all. [...]

It does through raw events - which are indeed model specific.

> [...]  I imagine you can get them through the model-specific hardware 
> configuration, but that means we have to encode model specific information 
> into kvm host code, which is (a) hard (b) counter to the spirit of perf.
> 
> (INV and CMASK allow you to increment the counter only when > N or <
> N events occur simultaneously, for example count when 2 or more
> instructions are retired in a single clock).

Peter, what do you think about adding a inv and cmask attribute that is applied 
to generic events automatically?

I *think* it should work just out of box: we recognize the fixed-purpose 
counter events based on their raw value, so if one comes in with inv and cmask 
set it will just be scheduled on a generic hw counter.

> >  - we could do things like propagate guest side traces over to the host
> 
> We support that already via 'perf kvm', no? [...]

Not without usability issues, if you remember that flamewa^W thread! :-)

> [...] This is more about the guest profiling itself without access to the 
> host (which is the more common scenario, IMO).

Correct - so there would be interactions with virtio-perf. I think the two will 
just have to be made to mix well, that's all.

> We're still missing tunnelling guest ftrace to the host, but a patch was 
> recently posted to do that.

If you tunnel guest perf events then ftrace events are included automatically.  
That's the primary/unified event transport model we are working towards.

Thanks,

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ