All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: akataria@vmware.com
Cc: Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
	the arch/x86 maintainers <x86@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Daniel Hecht <dhecht@vmware.com>
Subject: Re: [PATCH 2/3] x86: Get TSC frequency from VMware hypervisor.
Date: Tue, 21 Oct 2008 09:17:45 -0700	[thread overview]
Message-ID: <48FE00A9.6010400@zytor.com> (raw)
In-Reply-To: <1224605779.6161.9.camel@alok-dev1>

Alok Kataria wrote:
> 
> Hi hpa,
> 
> Do you mean we should have a x86_hyper_vendor field in cpuinfo_x86 ? 
> Even with that, i think we will have to differentiate between each of
> the hypervisors, as each of the hypervisor implementation differs in how
> they provide the TSC frequency. 
> 
> So we would end up with code like,
> 	if (boot_cpu.x86_hyper_vendor == VMWARE)
> 		get_frequency_vmware_way();
> 	if (boot_cpu.x86_hyper_vendor == XXX)
> 		get_frequency_XXX_way();
> 
> I agree that having a field in the cpu structure will make sure that we
> don't end up calling vmware_platform multiple times, but does it help in
> this particular situation ?
> 
> Let me know if you meant something else.
> 

That's exactly what I mean.  I want the detection centralized, and no, 
with only one user it doesn't make much difference, but there won't be 
just one user.

	-hpa

  reply	other threads:[~2008-10-21 16:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-21  1:35 [PATCH 2/3] x86: Get TSC frequency from VMware hypervisor Alok Kataria
2008-10-21  1:52 ` H. Peter Anvin
2008-10-21 16:16   ` Alok Kataria
2008-10-21 16:17     ` H. Peter Anvin [this message]
2008-10-22 19:22       ` Alok Kataria

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48FE00A9.6010400@zytor.com \
    --to=hpa@zytor.com \
    --cc=akataria@vmware.com \
    --cc=dhecht@vmware.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.