From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Guthro Subject: [PATCH] Stop clobbering AMD TSC offsets Date: Thu, 12 Jul 2007 16:50:46 -0400 Message-ID: <46969426.6030600@virtualiron.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------040003000405060407050403" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------040003000405060407050403 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit This fixes a bug in which HVM VCPUs running on AMD have their TSC offset clobbered (to zero) when they switch to real mode. The consequences of this are nearly unnoticeable in most cases, but the AMD folks (Tom Woller & Travis Betak) agree this is a (minor) bug and have been waiting forever for me to port and post this so they can strike it off their TODO lists. Signed-off-by: David Lively Signed-off-by: Ben Guthro --------------040003000405060407050403 Content-Type: text/x-patch; name="amd-stop-clobbering-tsc-offset.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="amd-stop-clobbering-tsc-offset.patch" diff -r c03c4be32469 xen/arch/x86/hvm/svm/svm.c --- a/xen/arch/x86/hvm/svm/svm.c Thu Jul 12 14:31:51 2007 -0400 +++ b/xen/arch/x86/hvm/svm/svm.c Thu Jul 12 14:31:51 2007 -0400 @@ -2329,9 +2329,6 @@ static int svm_reset_to_realmode(struct /* clear the vmcb and user regs */ memset(regs, 0, sizeof(struct cpu_user_regs)); - /* VMCB Control */ - vmcb->tsc_offset = 0; - /* VMCB State */ vmcb->cr0 = X86_CR0_ET | X86_CR0_PG | X86_CR0_WP; v->arch.hvm_svm.cpu_shadow_cr0 = X86_CR0_ET; --------------040003000405060407050403 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------040003000405060407050403--