On Mon, 2016-08-01 at 14:32 +0100, Peter Maydell wrote:
> > Wouldn't that mean that you'd be unable to use
> > 
> >   -cpu foo,pmu=off
> > 
> > if CPU model 'foo' doesn't support a PMU? I'd expect that
> > to work.
> 
> The current precedent (has_el3) doesn't work like that: if
> foo isn't a CPU which can support EL3 then the property doesn't
> exist, and it's an error to try to set it.

Doesn't look like the pmu option works like that on x86,
though, unless I'm missing something.

I have a guest running with

  -cpu pentium,pmu=on

and I can't see hardware perf events from inside the guest,
eg. dmesg reports

  Performance Events: no PMU driver, software events only.

and perf tells me

  <not supported> instructions
  <not supported> branches
  ...

I'm not sure whether that's because the PMU is being
emulated but the kernel doesn't have a driver for it, or
whether it's not being emulated at all. Any way to find
out?

-- 
Andrea Bolognani / Red Hat / Virtualization

Reply via email to