a4lg

vmmon.ko: patch to support new exception table

Aug 1st, 2012
3,311
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. diff -ru a/linux/hostif.c b/linux/hostif.c
  2. --- a/linux/hostif.c    2012-07-23 18:18:55.000000000 +0900
  3. +++ b/linux/hostif.c    2012-08-03 16:20:23.200420885 +0900
  4. @@ -48,6 +48,7 @@
  5.  #include <linux/smp_lock.h>
  6.  #endif
  7.  
  8. +#include <asm/asm.h>
  9.  #include <asm/io.h>
  10.  #include <asm/uaccess.h>
  11.  #include <linux/mc146818rtc.h>
  12. @@ -3586,31 +3587,14 @@
  13.  {
  14.     int ret;
  15.     unsigned low, high;
  16. -#if defined(VM_X86_64)
  17.     asm volatile("2: rdmsr ; xor %0,%0\n"
  18.                  "1:\n\t"
  19.                  ".section .fixup,\"ax\"\n\t"
  20.                  "3: mov %4,%0 ; jmp 1b\n\t"
  21.                  ".previous\n\t"
  22. -                ".section __ex_table,\"a\"\n\t"
  23. -                ".balign 8\n"
  24. -                ".quad 2b,3b\n"
  25. -                ".previous\n"
  26. +                _ASM_EXTABLE(2b,3b)
  27.                  : "=r"(ret), "=a"(low), "=d"(high)
  28.                  : "c"(msr), "i"(-EFAULT), "1"(0), "2"(0)); // init eax/edx to 0
  29. -#else
  30. -   asm volatile("2: rdmsr ; xor %0,%0\n"
  31. -                "1:\n\t"
  32. -                ".section .fixup,\"ax\"\n\t"
  33. -                "3: mov %4,%0 ; jmp 1b\n\t"
  34. -                ".previous\n\t"
  35. -                ".section __ex_table,\"a\"\n"
  36. -                ".balign 4\n"
  37. -                ".long 2b,3b\n"
  38. -                ".previous\n"
  39. -                : "=r"(ret), "=a"(low), "=d"(high)
  40. -                : "c"(msr), "i"(-EFAULT), "1"(0), "2"(0)); // init eax/edx to 0
  41. -#endif // VM_X86_64
  42.     *val = (low | ((u64)(high) << 32));
  43.  
  44.     return ret;
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×