From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Desfossez Subject: Accessing host TSC from a guest kernel Date: Thu, 23 Sep 2010 22:49:43 -0400 Message-ID: <4C9C11C7.70202@klipix.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit To: kvm@vger.kernel.org Return-path: Received: from debowa.klipix.org ([88.191.83.101]:33622 "EHLO debowa.klipix.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752858Ab0IXDRm (ORCPT ); Thu, 23 Sep 2010 23:17:42 -0400 Received: from [128.0.0.32] (dsl-69-171-152-153.acanac.net [69.171.152.153]) by debowa.klipix.org (Postfix) with ESMTP id 21F681E251A for ; Fri, 24 Sep 2010 04:49:47 +0200 (CEST) Sender: kvm-owner@vger.kernel.org List-ID: Hello, I'd like to access the host TSC from the inside of a guest kernel and I don't really know if it's possible. I'm working with kvm_clock and I have been playing with the pvclock_vcpu_time_info structure, but I'm not sure if I'm in the right direction. So could you tell me if there is an efficient way to access to access the host TSC (or at least the TSC_OFFSET) from a module inside a guest kernel ? I did it with an hypercall, but it's for tracing purpose and doing an hypercall every time I want to record an event, is way too costly. Thanks, Julien