[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-4985ce15a397e9b6541548efe3b9ffac2dda9127@git.kernel.org>
Date: Wed, 13 Apr 2016 04:46:05 -0700
From: tip-bot for Andy Lutomirski <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: tglx@...utronix.de, pbonzini@...hat.com, bp@...en8.de,
torvalds@...ux-foundation.org, luto@...nel.org,
arjan@...ux.intel.com, hpa@...or.com, peterz@...radead.org,
Xen-devel@...ts.xen.org, akpm@...ux-foundation.org,
linux-kernel@...r.kernel.org, boris.ostrovsky@...cle.com,
mingo@...nel.org, kvm@...r.kernel.org
Subject: [tip:x86/asm] x86/paravirt: Make "unsafe" MSR accesses unsafe even
if PARAVIRT=y
Commit-ID: 4985ce15a397e9b6541548efe3b9ffac2dda9127
Gitweb: http://git.kernel.org/tip/4985ce15a397e9b6541548efe3b9ffac2dda9127
Author: Andy Lutomirski <luto@...nel.org>
AuthorDate: Sat, 2 Apr 2016 07:01:39 -0700
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Wed, 13 Apr 2016 11:37:46 +0200
x86/paravirt: Make "unsafe" MSR accesses unsafe even if PARAVIRT=y
Enabling CONFIG_PARAVIRT had an unintended side effect: rdmsr() turned
into rdmsr_safe() and wrmsr() turned into wrmsr_safe(), even on bare
metal. Undo that by using the new unsafe paravirt MSR callbacks.
Tested-by: Boris Ostrovsky <boris.ostrovsky@...cle.com>
Signed-off-by: Andy Lutomirski <luto@...nel.org>
Acked-by: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Arjan van de Ven <arjan@...ux.intel.com>
Cc: Borislav Petkov <bp@...en8.de>
Cc: KVM list <kvm@...r.kernel.org>
Cc: Paolo Bonzini <pbonzini@...hat.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: xen-devel <Xen-devel@...ts.xen.org>
Link: http://lkml.kernel.org/r/414fabd6d3527703077c6c2a797223d0a9c3b081.1459605520.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
arch/x86/include/asm/paravirt.h | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h
index 97839fa..3c73141 100644
--- a/arch/x86/include/asm/paravirt.h
+++ b/arch/x86/include/asm/paravirt.h
@@ -152,24 +152,21 @@ static inline int paravirt_write_msr_safe(unsigned msr,
return PVOP_CALL3(int, pv_cpu_ops.write_msr_safe, msr, low, high);
}
-/* These should all do BUG_ON(_err), but our headers are too tangled. */
#define rdmsr(msr, val1, val2) \
do { \
- int _err; \
- u64 _l = paravirt_read_msr_safe(msr, &_err); \
+ u64 _l = paravirt_read_msr(msr); \
val1 = (u32)_l; \
val2 = _l >> 32; \
} while (0)
#define wrmsr(msr, val1, val2) \
do { \
- paravirt_write_msr_safe(msr, val1, val2); \
+ paravirt_write_msr(msr, val1, val2); \
} while (0)
#define rdmsrl(msr, val) \
do { \
- int _err; \
- val = paravirt_read_msr_safe(msr, &_err); \
+ val = paravirt_read_msr(msr); \
} while (0)
static inline void wrmsrl(unsigned msr, u64 val)
Powered by blists - more mailing lists