From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCH] KVM: vmx: restore MSR_IA32_DEBUGCTLMSR after VMEXIT Date: Sun, 12 Aug 2012 20:28:38 +0300 Message-ID: <20120812172838.GA23287@redhat.com> References: <20120812131228.GL3341@redhat.com> <5027AE33.1040408@redhat.com> <20120812132523.GM3341@redhat.com> <5027B260.5060606@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, mtosatti@redhat.com To: Avi Kivity Return-path: Received: from mx1.redhat.com ([209.132.183.28]:47636 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752014Ab2HLR2j (ORCPT ); Sun, 12 Aug 2012 13:28:39 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q7CHSdGj011688 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 12 Aug 2012 13:28:39 -0400 Content-Disposition: inline In-Reply-To: <5027B260.5060606@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Sun, Aug 12, 2012 at 04:40:48PM +0300, Avi Kivity wrote: > On 08/12/2012 04:25 PM, Gleb Natapov wrote: > > >> How expensive is this? We may want a follow-on patch to cache it in a > >> per-cpu variable. > >> > > I have patches ready. I couldn't measure any overhead of the > > rdmsr(MSR_IA32_DEBUGCTLMSR). > > > > Do you mean while running kvm? How about just running it in a loop? > No, I mean running it in a loop. Loop with or without rdmsr(MSR_IA32_DEBUGCTLMSR) takes the same time as measured by rdtsc. -- Gleb.