From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vadim Rozenfeld Subject: Re: [RFC PATCH 1/2] Hyper-H reference counter Date: Fri, 17 May 2013 00:22:11 +1000 Message-ID: <1368714131.18400.11.camel@localhost> References: <1368445517-5496-1-git-send-email-vrozenfe@redhat.com> <1368445517-5496-2-git-send-email-vrozenfe@redhat.com> <20130516083450.GM26453@redhat.com> <1368695621.18400.9.camel@localhost> <20130516092128.GP26453@redhat.com> <1368696535.18400.10.camel@localhost> <5194E105.8000909@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: Gleb Natapov , kvm@vger.kernel.org, mtosatti@redhat.com, pl@dlh.net To: Paolo Bonzini Return-path: Received: from mx1.redhat.com ([209.132.183.28]:44227 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751220Ab3EPOW2 (ORCPT ); Thu, 16 May 2013 10:22:28 -0400 In-Reply-To: <5194E105.8000909@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, 2013-05-16 at 15:37 +0200, Paolo Bonzini wrote: > Il 16/05/2013 11:28, Vadim Rozenfeld ha scritto: > >>>>> > > > > + case HV_X64_MSR_REFERENCE_TSC: { > >>>>> > > > > + u64 gfn; > >>>>> > > > > + unsigned long addr; > >>>>> > > > > + u32 tsc_ref; > >>>>> > > > > + gfn = data >> HV_X64_MSR_HYPERCALL_PAGE_ADDRESS_SHIFT; > >>>> > > > Shouldn't you check HV_X64_MSR_TSC_REFERENCE_ENABLE here? > >>> > > > >>> > > Yes, I have this check added in the second patch. > >>> > > > >> > Move it here please. > > OK, will do it. > >> > > >>>> > > > > >>>>> > > > > + addr = gfn_to_hva(kvm, gfn); > >>>>> > > > > + if (kvm_is_error_hva(addr)) > >>>>> > > > > + return 1; > >>>>> > > > > + tsc_ref = 0; > > This should write 0xFFFFFFFF. This should write 0 Vadim. > > Paolo