All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] x86/paravirt: Fix baremetal paravirt MSR ops
@ 2015-09-16 23:33 Andy Lutomirski
  2015-09-16 23:33 ` [PATCH 1/3] x86/paravirt: Add _safe to the read_msr and write_msr PV hooks Andy Lutomirski
                   ` (11 more replies)
  0 siblings, 12 replies; 54+ messages in thread
From: Andy Lutomirski @ 2015-09-16 23:33 UTC (permalink / raw)
  To: x86
  Cc: Paolo Bonzini, Peter Zijlstra, KVM list, Arjan van de Ven,
	xen-devel, linux-kernel, Andy Lutomirski

Setting CONFIG_PARAVIRT=y has an unintended side effect: it silently
turns all rdmsr and wrmsr operations into the safe variants without
any checks that the operations actually succeed.

This is IMO awful: it papers over bugs.  In particular, KVM gueests
might be unwittingly depending on this behavior because
CONFIG_KVM_GUEST currently depends on CONFIG_PARAVIRT.  I'm not
aware of any such problems, but applying this series would be a good
way to shake them out.

Fix it so that the MSR operations work the same on CONFIG_PARAVIRT=n
and CONFIG_PARAVIRT=y as long as Xen isn't being used.  The Xen
maintainers are welcome to make a similar change on top of this.

Since there's plenty of time before the next merge window, I think
we should apply and fix anything that breaks.

Doing this is probably a prerequisite to sanely decoupling
CONFIG_KVM_GUEST and CONFIG_PARAVIRT, which would probably make
Arjan and the rest of the Clear Containers people happy :)

Andy Lutomirski (3):
  x86/paravirt: Add _safe to the read_msr and write_msr PV hooks
  x86/paravirt: Add paravirt_{read,write}_msr
  x86/paravirt: Make "unsafe" MSR accesses unsafe even if PARAVIRT=y

 arch/x86/include/asm/paravirt.h       | 45 +++++++++++++++++++++--------------
 arch/x86/include/asm/paravirt_types.h | 12 +++++++---
 arch/x86/kernel/paravirt.c            |  6 +++--
 arch/x86/xen/enlighten.c              | 27 +++++++++++++++++++--
 4 files changed, 65 insertions(+), 25 deletions(-)

-- 
2.4.3

^ permalink raw reply	[flat|nested] 54+ messages in thread
* [PATCH 0/3] x86/paravirt: Fix baremetal paravirt MSR ops
@ 2015-09-16 23:33 Andy Lutomirski
  0 siblings, 0 replies; 54+ messages in thread
From: Andy Lutomirski @ 2015-09-16 23:33 UTC (permalink / raw)
  To: x86
  Cc: KVM list, Peter Zijlstra, linux-kernel, xen-devel,
	Andy Lutomirski, Paolo Bonzini, Arjan van de Ven

Setting CONFIG_PARAVIRT=y has an unintended side effect: it silently
turns all rdmsr and wrmsr operations into the safe variants without
any checks that the operations actually succeed.

This is IMO awful: it papers over bugs.  In particular, KVM gueests
might be unwittingly depending on this behavior because
CONFIG_KVM_GUEST currently depends on CONFIG_PARAVIRT.  I'm not
aware of any such problems, but applying this series would be a good
way to shake them out.

Fix it so that the MSR operations work the same on CONFIG_PARAVIRT=n
and CONFIG_PARAVIRT=y as long as Xen isn't being used.  The Xen
maintainers are welcome to make a similar change on top of this.

Since there's plenty of time before the next merge window, I think
we should apply and fix anything that breaks.

Doing this is probably a prerequisite to sanely decoupling
CONFIG_KVM_GUEST and CONFIG_PARAVIRT, which would probably make
Arjan and the rest of the Clear Containers people happy :)

Andy Lutomirski (3):
  x86/paravirt: Add _safe to the read_msr and write_msr PV hooks
  x86/paravirt: Add paravirt_{read,write}_msr
  x86/paravirt: Make "unsafe" MSR accesses unsafe even if PARAVIRT=y

 arch/x86/include/asm/paravirt.h       | 45 +++++++++++++++++++++--------------
 arch/x86/include/asm/paravirt_types.h | 12 +++++++---
 arch/x86/kernel/paravirt.c            |  6 +++--
 arch/x86/xen/enlighten.c              | 27 +++++++++++++++++++--
 4 files changed, 65 insertions(+), 25 deletions(-)

-- 
2.4.3

^ permalink raw reply	[flat|nested] 54+ messages in thread

end of thread, other threads:[~2015-09-17 18:51 UTC | newest]

Thread overview: 54+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-16 23:33 [PATCH 0/3] x86/paravirt: Fix baremetal paravirt MSR ops Andy Lutomirski
2015-09-16 23:33 ` [PATCH 1/3] x86/paravirt: Add _safe to the read_msr and write_msr PV hooks Andy Lutomirski
2015-09-16 23:33 ` Andy Lutomirski
2015-09-16 23:33 ` [PATCH 2/3] x86/paravirt: Add paravirt_{read, write}_msr Andy Lutomirski
2015-09-16 23:33 ` [PATCH 2/3] x86/paravirt: Add paravirt_{read,write}_msr Andy Lutomirski
2015-09-16 23:33 ` [PATCH 3/3] x86/paravirt: Make "unsafe" MSR accesses unsafe even if PARAVIRT=y Andy Lutomirski
2015-09-16 23:33 ` Andy Lutomirski
2015-09-17  7:19 ` [PATCH 0/3] x86/paravirt: Fix baremetal paravirt MSR ops Ingo Molnar
2015-09-17  9:31   ` Borislav Petkov
2015-09-17  9:31   ` Borislav Petkov
2015-09-17 11:22     ` H. Peter Anvin
2015-09-17 11:22     ` H. Peter Anvin
2015-09-17 11:39     ` Paolo Bonzini
2015-09-17 11:39     ` Paolo Bonzini
2015-09-17 15:27       ` Borislav Petkov
2015-09-17 15:32         ` [Xen-devel] " Andrew Cooper
2015-09-17 15:37           ` Borislav Petkov
2015-09-17 15:37           ` [Xen-devel] " Borislav Petkov
2015-09-17 15:32         ` Andrew Cooper
2015-09-17 15:27       ` Borislav Petkov
2015-09-17 15:23   ` Andy Lutomirski
2015-09-17 15:23   ` Andy Lutomirski
2015-09-17 15:27     ` Arjan van de Ven
2015-09-17 15:27     ` Arjan van de Ven
2015-09-17 15:29       ` Paolo Bonzini
2015-09-17 15:31         ` Arjan van de Ven
2015-09-17 15:33           ` Paolo Bonzini
2015-09-17 15:33           ` Paolo Bonzini
2015-09-17 15:31         ` Arjan van de Ven
2015-09-17 15:29       ` Paolo Bonzini
2015-09-17 17:30     ` Ingo Molnar
2015-09-17 17:30     ` Ingo Molnar
2015-09-17 18:51       ` Andy Lutomirski
2015-09-17 18:51       ` Andy Lutomirski
2015-09-17  7:19 ` Ingo Molnar
2015-09-17  8:58 ` Peter Zijlstra
2015-09-17  8:58 ` Peter Zijlstra
2015-09-17 11:40   ` Paolo Bonzini
2015-09-17 12:27     ` Peter Zijlstra
2015-09-17 15:17       ` Andy Lutomirski
2015-09-17 15:17         ` Peter Zijlstra
2015-09-17 15:26           ` Andy Lutomirski
2015-09-17 15:26           ` Andy Lutomirski
2015-09-17 15:29             ` Paolo Bonzini
2015-09-17 15:29             ` Paolo Bonzini
2015-09-17 15:17         ` Peter Zijlstra
2015-09-17 15:17       ` Andy Lutomirski
2015-09-17 12:27     ` Peter Zijlstra
2015-09-17 11:40   ` Paolo Bonzini
2015-09-17  9:10 ` Andrew Cooper
2015-09-17  9:10 ` [Xen-devel] " Andrew Cooper
2015-09-17 15:11   ` Boris Ostrovsky
2015-09-17 15:11   ` [Xen-devel] " Boris Ostrovsky
  -- strict thread matches above, loose matches on Subject: below --
2015-09-16 23:33 Andy Lutomirski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.