From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [RFC PATCH 1/2] Hyper-H reference counter Date: Thu, 16 May 2013 15:37:09 +0200 Message-ID: <5194E105.8000909@redhat.com> 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> 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: Vadim Rozenfeld Return-path: Received: from mail-ye0-f175.google.com ([209.85.213.175]:35340 "EHLO mail-ye0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753512Ab3EPNhf (ORCPT ); Thu, 16 May 2013 09:37:35 -0400 Received: by mail-ye0-f175.google.com with SMTP id q4so605445yen.34 for ; Thu, 16 May 2013 06:37:34 -0700 (PDT) In-Reply-To: <1368696535.18400.10.camel@localhost> Sender: kvm-owner@vger.kernel.org List-ID: 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. Paolo