From mboxrd@z Thu Jan 1 00:00:00 1970 From: Glauber Costa Subject: Re: [PATCH 2/2] turn off kvmclock when resetting cpu Date: Wed, 5 May 2010 12:24:03 -0300 Message-ID: <20100505152402.GA3443@mothafucka.localdomain> References: <1272998128-30384-1-git-send-email-glommer@redhat.com> <1272998128-30384-2-git-send-email-glommer@redhat.com> <1272998128-30384-3-git-send-email-glommer@redhat.com> <4BE11DB3.7020901@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, zamsden@redhat.com, mtosatti@redhat.com To: Avi Kivity Return-path: Received: from mx1.redhat.com ([209.132.183.28]:43307 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753551Ab0EEPYM (ORCPT ); Wed, 5 May 2010 11:24:12 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o45FOBdS022643 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 5 May 2010 11:24:11 -0400 Content-Disposition: inline In-Reply-To: <4BE11DB3.7020901@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, May 05, 2010 at 10:26:43AM +0300, Avi Kivity wrote: > >+ msr_data.info.nmsrs = n; > >+ > >+ return kvm_vcpu_ioctl(env, KVM_SET_MSRS,&msr_data); > >+} > >+ > >+ > > How about a different approach? Query the supported MSRs > (KVM_GET_MSR_LIST or thereabout) and reset them (with special cases > for the TSC, and the old clock MSRs when the new ones are present)? I didn't went that route because I was unsure that every one of them would be resetable by writing 0 on it. And if we are going to special case the most part of it, then there is no point in doing it. If you think it is doable to special case just the tsc, then I am fine.