x86/msr: Set the return value to zero when native_rdmsr_safe() fails
[deliverable/linux.git] / arch / x86 / include / asm / msr.h
index 00050c034a13825bfe774204061a1def235f5755..7dc1d8fef7fdec6a633f5cd3f7ada4d2ba09e8fe 100644 (file)
@@ -101,7 +101,10 @@ static inline unsigned long long native_read_msr_safe(unsigned int msr,
        asm volatile("2: rdmsr ; xor %[err],%[err]\n"
                     "1:\n\t"
                     ".section .fixup,\"ax\"\n\t"
-                    "3:  mov %[fault],%[err] ; jmp 1b\n\t"
+                    "3: mov %[fault],%[err]\n\t"
+                    "xorl %%eax, %%eax\n\t"
+                    "xorl %%edx, %%edx\n\t"
+                    "jmp 1b\n\t"
                     ".previous\n\t"
                     _ASM_EXTABLE(2b, 3b)
                     : [err] "=r" (*err), EAX_EDX_RET(val, low, high)
This page took 0.026827 seconds and 5 git commands to generate.