Re: [PATCH] External module compatibility for hrtimer_expires_remaining

Alexander Graf
2009-02-04T16:17:08Z

Avi Kivity wrote:
> Alexander Graf wrote:
>> Alexander Graf wrote:
>>> Due to Marcelo's APIC fix we now depend on hrtimer_expires_remaining,
>>> which is not available on my 2.6.27 kernel.
>>>
>>> This patch adds a backwards compatibility layer for it.
>>>
>>> Signed-off-by: Alexander Graf <agraf@suse.de>
>>
>> I just saw that you did one yourself that doesn't work for me. Is the
>> #define reversed?
>
> See also my change to hack-module.awk. Did you 'make sync' again?

On a freshly git pull'ed checkout with a 2.6.27 host kernel:

/dev/shm/x/kvm-userspace/kernel/x86/lapic.c: In function ‘apic_get_tmcct’:
/dev/shm/x/kvm-userspace/kernel/x86/lapic.c:570: error: implicit
declaration of function ‘hrtimer_expires_remaining’
/dev/shm/x/kvm-userspace/kernel/x86/lapic.c:570: error: incompatible
types in assignment

I'd say the problem is the

#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)

which should be 2.6.28, right?

Alex