Avi Kivity wrote:
> Jan Kiszka wrote:
>> Older set_debugreg macros did not allow to pass the register number as
>> constant (without additional typcasting). Catch this as the latest kvm
>> debug changes make use of this property.
>>
>> Signed-off-by: Jan Kiszka <[EMAIL PROTECTED]>
>> ---
>> kernel/external-module-compat-comm.h | 10 ++++++++++
>> 1 file changed, 10 insertions(+)
>>
>> Index: b/kernel/external-module-compat-comm.h
>> ===================================================================
>> --- a/kernel/external-module-compat-comm.h
>> +++ b/kernel/external-module-compat-comm.h
>> @@ -539,6 +539,16 @@ struct pci_dev *pci_get_bus_and_slot(uns
>>
>> #endif
>>
>> +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25) && defined(__x86_64__)
>> +
>> +#undef set_debugreg
>> +#define set_debugreg(value, register) \
>> + __asm__("movq %0,%%db" #register \
>> + : /* no output */ \
>> + :"r" ((unsigned long)value))
>> +
>> +#endif
>> +
>> #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,21)
>>
>>
>
> Should be in the x86 specific file (kernel/x86/external-module.h)
>
Indeed.
-----------
Older set_debugreg macros did not allow to pass the register number as
constant (without additional typcasting). Catch this as the latest kvm
debug changes make use of this property.
Signed-off-by: Jan Kiszka <[EMAIL PROTECTED]>
---
kernel/x86/external-module-compat.h | 10 ++++++++++
1 file changed, 10 insertions(+)
Index: b/kernel/x86/external-module-compat.h
===================================================================
--- a/kernel/x86/external-module-compat.h
+++ b/kernel/x86/external-module-compat.h
@@ -334,3 +334,13 @@ struct kvm_desc_ptr {
#define FEATURE_CONTROL_LOCKED (1<<0)
#define FEATURE_CONTROL_VMXON_ENABLED (1<<2)
#endif
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25) && defined(__x86_64__)
+
+#undef set_debugreg
+#define set_debugreg(value, register) \
+ __asm__("movq %0,%%db" #register \
+ : /* no output */ \
+ :"r" ((unsigned long)value))
+
+#endif
signature.asc
Description: OpenPGP digital signature
