[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] x86/hvm: Intercept RDPMC when vPMU is disabled

>>> On 25.02.19 at 15:11, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 25/02/2019 13:11, Jan Beulich wrote:
>> For Intel, afaics, we indeed produce a blank CPUID leaf in
>> all cases, so the behavior looks reasonably consistent. I would
>> question though whether a blank CPUID leaf / the absence of any
>> counters wouldn't call for #UD instead of #GP(0).
> RDPMC hasn't #UD'd in a quarter of a century, but does #GP in userspace
> outside of developer profiling scenarios.

I guess I could equally well say that RDPMC hasn't #GP'd for as long
for indexes zero and one.

>> Otherwise,
>> along the lines of AMD, aren't the first two indexes uniformly valid
>> for Intel?
> No - its model specific behaviour.  The only difference for more modern
> systems is that they have agreed on a common behaviour.
> And that is specifically why implementing 0's is a non-starter - it is
> not a remotely sensible use of time to build enough infrastructure to
> provide correct model-specific behaviour just for a corner case which
> operating systems don't encounter in practice.

No-one said you need to consider all cases. But returning zeros for
the first four (AMD) or two (Intel) counters can hardly be that big
of a problem.

Anyway - I'm not going to fight this much more, as vPMU clearly
isn't my primary area of interest. But I'll listen to further comments
from Boris, wrt giving an eventual ack.


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.