On 2015-02-10 14:14, Paolo Bonzini wrote:
> Signed-off-by: Paolo Bonzini <[email protected]>
> ---
>  external-module-compat-comm.h | 4 ++++
>  external-module-compat.c      | 8 ++++++++
>  2 files changed, 12 insertions(+)
> 
> diff --git a/external-module-compat-comm.h b/external-module-compat-comm.h
> index d683c30..456ebf8 100644
> --- a/external-module-compat-comm.h
> +++ b/external-module-compat-comm.h
> @@ -1453,6 +1453,10 @@ static inline void pci_set_dev_assigned(struct pci_dev 
> *pdev)
>  void *get_xsave_addr(struct xsave_struct *xsave, int feature);
>  #endif
>  
> +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0)
> +bool single_task_running(void);
> +#endif
> +
>  #if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)
>  #define trace_seq_buffer_ptr(p) ((p)->buffer + (p)->len)
>  #endif
> diff --git a/external-module-compat.c b/external-module-compat.c
> index 347d20e..1d9a742 100644
> --- a/external-module-compat.c
> +++ b/external-module-compat.c
> @@ -373,3 +373,11 @@ void *get_xsave_addr(struct xsave_struct *xsave, int 
> feature)
>       return (u8 *)xsave + offset;
>  }
>  #endif
> +
> +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0)
> +bool single_task_running(void)
> +{
> +     /* Not exactly the same... */
> +     return !need_resched();
> +}
> +#endif
> 

3.15 and earlier lacks ktime_before in addition, see e.g.
http://buildbot.kiszka.org/kvm-kmod/builders/3-next/builds/395/steps/3.15-x86-64/logs/stdio

I'm not yet sure where to cut backward support now, maybe 3.10 (LTS).
3.9 gives a strange warning in __do_insn_fetch_bytes though the involved
code should be identical to building for newer kernels:

http://buildbot.kiszka.org/kvm-kmod/builders/3-next/builds/395/steps/3.9-x86-64/logs/stdio

Jan

-- 
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to