From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH kvm-kmod] adjust timekeeping compatibility code Date: Tue, 30 Sep 2014 10:43:26 +0200 Message-ID: <542A6D2E.5090900@redhat.com> References: <1411460559-8160-1-git-send-email-pbonzini@redhat.com> <542A61AA.4030908@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit To: Jan Kiszka , kvm@vger.kernel.org Return-path: Received: from mail-we0-f171.google.com ([74.125.82.171]:58682 "EHLO mail-we0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750780AbaI3Inb (ORCPT ); Tue, 30 Sep 2014 04:43:31 -0400 Received: by mail-we0-f171.google.com with SMTP id w61so1806429wes.16 for ; Tue, 30 Sep 2014 01:43:29 -0700 (PDT) In-Reply-To: <542A61AA.4030908@siemens.com> Sender: kvm-owner@vger.kernel.org List-ID: Il 30/09/2014 09:54, Jan Kiszka ha scritto: >> > kvm_get_xtime_nsec could overflow. If we make kvm_get_boot_base_ns >> > compute the equivalent of 3.17's base_mono+offs_boot formula (instead of >> > just offs_boot), we can avoid that and drop kvm_get_xtime_nsec altogether. > Applied, thanks. > > Any suggestions how to deal with "kvm: Fix page ageing bugs"? If you mean the new MMU notifier API, probably something like this: diff --git a/sync b/sync index 8b63ca7..fff85f3 100755 --- a/sync +++ b/sync @@ -310,6 +310,22 @@ def hack_content(fname, data): else: w(sub(r'tkr\.', '', line)) line = '#endif' + if match_block_end('^static int kvm_mmu_notifier_clear_flush_young', '^}'): + w(line) + w('#if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0)') + w('static int kvm_mmu_notifier_clear_flush_young(struct mmu_notifier *mn,') + w(' struct mm_struct *mm,') + w(' unsigned long hva)') + w('{') + w('\treturn __kvm_mmu_notifier_clear_flush_young(mn, mm, hva, hva+1);') + w('}') + line = '#endif' + if match(r'^static int kvm_mmu_notifier_clear_flush_young'): + w('#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0)') + w(line) + w('#else') + w(sub('kvm_', '__kvm_', line)) + line = '#endif' if line == '#ifdef CONFIG_KEXEC': line = '#if defined(CONFIG_KEXEC) && LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)' if line == '\tif (!cpu_has_vmx_apicv())': (Not tested beyond compilation). Paolo