qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/2] [RFC] Make vmport report the processor spee


From: Alexander Graf
Subject: Re: [Qemu-devel] [PATCH 1/2] [RFC] Make vmport report the processor speed
Date: Wed, 7 Jan 2009 12:15:28 +0100


On 07.01.2009, at 11:23, François Revol wrote:





On 06.01.2009, at 23:33, Jamie Lokier <address@hidden> wrote:

Alexander Graf wrote:
If VMware ESX finds itself virtualized (read: inside VMware), it
reads the TSC speed from its backdoor, because measuring the TSC
inside a VM is not exact.

This patch implements a hacky way to detect the TSC speed and
passes
that through to the VM. I am open to suggestions on how to improve
the behavior.  It also adds a magic return value of 2 on the
version
return, which is required by VMware ESX.  WARNING: This
implementation breaks on non-x86 hosts!

If you run _this_ code as a guest inside itself, shouldn't it
_call_
VMPORT_CMD_GETPROCSPEED to get the value? :-)

I don't think doing vmware esx in qemu in vmware us that much of a
valid scenario right now ;).

But I agree with anthony here - not telling vmware esx that it's
running virtualized might be the best.


As I said, it would not only benefit esx.
Haiku also would likely work much better this way, and possibly BeOS
with a small driver to recalibrate it (I already rewrote such a driver
once, but it was just forcing it using a value from some settings that
were to be taken from a real machine).

If you really need to get the TSC speed, it might be best to use official MSRs for that. The Intel documentation definitely includes such an MSR.

Alex





reply via email to

[Prev in Thread] Current Thread [Next in Thread]