On 06/02/2015 20:40, Jan Kiszka wrote:
> On 2015-02-02 10:05, Paolo Bonzini wrote:
>>
>>
>> On 02/02/2015 08:04, Jan Kiszka wrote:
>>>>> +#if X86_FEATURE_XSAVEOPT < 10 * 32
>>>>> +#undef X86_FEATURE_XSAVEOPT
>>>>> +#endif
>>>>> +#define X86_FEATURE_XSAVEOPT (10*32+0) /* XSAVEOPT instruction */
>>> This causes redefinition warnings if the condition is not met. Was the
>>> plan to put the define before the #endif?
>>
>> The plan was to match the kernel's definition, which however has a space:
>>
>> #define X86_FEATURE_XSAVEOPT (10*32+ 0)
>>
>> But putting the define before the #endif also works.
>
> Finally got my buildbot working again: There are some open issues, maybe
> you can have a look at http://buildbot.kiszka.org/kvm-kmod/waterfall,
> next branch. At least the 3.17 thing requires fixing but may require
> more than a #define.
Why is APICv crippled in kvm-kmod even for newer kernels?
If all that's needed is "make it compile with 3.9 and earlier",
you can do something like this:
diff --git a/sync b/sync
index 3086b70..36bed39 100755
--- a/sync
+++ b/sync
@@ -341,13 +341,18 @@ def hack_content(fname, data):
if line == '\tif (!cpu_has_vmx_apicv())':
w('#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)')
w(line)
+ w('#else')
+ w('if (1)')
line = '#endif'
if line == '#if IS_ENABLED(CONFIG_KVM)':
line = '#if 1'
- if line == '\t\tapic->send_IPI_mask(get_cpu_mask(vcpu->cpu),':
- line = '\t\t;'
- if line == '\t\t\t\tPOSTED_INTR_VECTOR);':
- line = ''
+ if match(r'^\t+apic->send_IPI_mask\(get_cpu_mask\(vcpu->cpu\),$'):
+ w('#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)')
+ w('\t\t;')
+ w('#else')
+ if match(r'^\t+POSTED_INTR_VECTOR\);$'):
+ w(line)
+ line = '#endif'
if line == '\tif (!static_cpu_has_bug(X86_BUG_AMD_TLB_MMATCH))':
w('#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)')
w(line)
Paolo
--
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