From: Paolo Bonzini Subject: Re: [patch 3/7] x86/kvmclock: Decrapify kvm_register_clock() Date: Fri, 6 Jul 2018 19:38:08 +0200 Message-ID: References: <20180706161307.733337643@linutronix.de> <20180706162049.482199075@linutronix.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Radim Krcmar , Peter Zijlstra , Juergen Gross , Pavel Tatashin , steven.sistare@oracle.com, daniel.m.jordan@oracle.com, x86@kernel.org, kvm@vger.kernel.org To: Thomas Gleixner , LKML Return-path: In-Reply-To: <20180706162049.482199075@linutronix.de> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org Decrapification went a bit too far... On 06/07/2018 18:13, Thomas Gleixner wrote: > - int cpu = smp_processor_id(); > - int low, high, ret; > struct pvclock_vcpu_time_info *src; > + int cpu = smp_processor_id(); > + u64 pa; > > if (!hv_clock) > - return 0; > - > - src = &hv_clock[cpu].pvti; ... the line above should not have been a "-". That, or initialize it in the declaration. Whoever applies can fix it, no need to repost. I'll test with the above fix. Paolo > - low = (int)slow_virt_to_phys(src) | 1; > - high = ((u64)slow_virt_to_phys(src) >> 32); > - ret = native_write_msr_safe(msr_kvm_system_time, low, high); > - printk(KERN_INFO "kvm-clock: cpu %d, msr %x:%x, %s\n", > - cpu, high, low, txt); > + return; > > - return ret; > + pa = slow_virt_to_phys(src) | 0x01ULL; > + wrmsrl(msr_kvm_system_time, pa); > + pr_info("kvm-clock: cpu %d, msr %llx, %s\n", cpu, pa, txt); > }