From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mukesh Rathor Subject: [V0 PATCH 5/6] AMD-PVH: Support TSC_MODE_NEVER_EMULATE for PVH Date: Fri, 12 Dec 2014 18:58:26 -0800 Message-ID: <1418439507-16027-6-git-send-email-mukesh.rathor@oracle.com> References: <1418439507-16027-1-git-send-email-mukesh.rathor@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Xzcuw-000528-QP for xen-devel@lists.xenproject.org; Sat, 13 Dec 2014 02:58:50 +0000 Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id sBD2wj32020565 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sat, 13 Dec 2014 02:58:46 GMT Received: from userz7022.oracle.com (userz7022.oracle.com [156.151.31.86]) by ucsinet22.oracle.com (8.14.5+Sun/8.14.5) with ESMTP id sBD2wjPN021506 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 13 Dec 2014 02:58:45 GMT Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by userz7022.oracle.com (8.14.5+Sun/8.14.4) with ESMTP id sBD2wiMa021481 for ; Sat, 13 Dec 2014 02:58:44 GMT In-Reply-To: <1418439507-16027-1-git-send-email-mukesh.rathor@oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: boris.ostrovsky@oracle.com, elena.ufimtseva@oracle.com Cc: xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On AMD, MSR_AMD64_TSC_RATIO must be set for rdtsc instruction in guest to properly read the cpu tsc. To that end, set tsc_khz in struct domain. Signed-off-by: Mukesh Rathor --- xen/arch/x86/time.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c index bd89219..7512aa4 100644 --- a/xen/arch/x86/time.c +++ b/xen/arch/x86/time.c @@ -1908,6 +1908,7 @@ void tsc_set_info(struct domain *d, * but "always_emulate" does not for some reason. Figure out * why. */ + d->arch.tsc_khz = cpu_khz; switch ( tsc_mode ) { case TSC_MODE_NEVER_EMULATE: -- 1.8.3.1