All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Paolo Bonzini <pbonzini@redhat.com>, kvm@vger.kernel.org
Subject: Re: [PATCH kvm-kmod] adjust timekeeping compatibility code
Date: Tue, 30 Sep 2014 10:48:39 +0200	[thread overview]
Message-ID: <542A6E67.3070107@siemens.com> (raw)
In-Reply-To: <542A6D2E.5090900@redhat.com>

On 2014-09-30 10:43, Paolo Bonzini wrote:
> 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);')

Ah, end=start+1, it's that easy!

> +            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).

Will check.

Thanks,
Jan

-- 
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux

  reply	other threads:[~2014-09-30  8:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-23  8:22 [PATCH kvm-kmod] adjust timekeeping compatibility code Paolo Bonzini
2014-09-30  7:54 ` Jan Kiszka
2014-09-30  8:43   ` Paolo Bonzini
2014-09-30  8:48     ` Jan Kiszka [this message]
2014-09-30 10:39       ` Paolo Bonzini
2014-10-01  7:40         ` Jan Kiszka
2014-10-02 10:12           ` Paolo Bonzini
2014-10-02 12:17             ` Jan Kiszka
2014-10-08 16:00     ` Jan Kiszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=542A6E67.3070107@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.