linux/arch/x86/kvm
Avi Kivity 2225fd5604 KVM: VMX: Fix kvm_set_shared_msr() called in preemptible context
kvm_set_shared_msr() may not be called in preemptible context,
but vmx_set_msr() does so:

  BUG: using smp_processor_id() in preemptible [00000000] code: qemu-kvm/22713
  caller is kvm_set_shared_msr+0x32/0xa0 [kvm]
  Pid: 22713, comm: qemu-kvm Not tainted 3.4.0-rc3+ #39
  Call Trace:
   [<ffffffff8131fa82>] debug_smp_processor_id+0xe2/0x100
   [<ffffffffa0328ae2>] kvm_set_shared_msr+0x32/0xa0 [kvm]
   [<ffffffffa03a103b>] vmx_set_msr+0x28b/0x2d0 [kvm_intel]
   ...

Making kvm_set_shared_msr() work in preemptible is cleaner, but
it's used in the fast path.  Making two variants is overkill, so
this patch just disables preemption around the call.

Reported-by: Dave Jones <davej@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2012-04-18 23:42:27 -03:00
..
Kconfig KVM: Expose a version 2 architectural PMU to a guests 2011-12-27 11:24:29 +02:00
Makefile KVM: Expose a version 2 architectural PMU to a guests 2011-12-27 11:24:29 +02:00
cpuid.c KVM: SVM: Add support for AMD's OSVW feature in guests 2012-03-05 14:52:21 +02:00
cpuid.h KVM: SVM: Add support for AMD's OSVW feature in guests 2012-03-05 14:52:21 +02:00
emulate.c KVM: x86 emulator: Allow PM/VM86 switch during task switch 2012-03-08 14:10:29 +02:00
i8254.c KVM: x86: Consolidate PIT legacy test 2011-12-27 11:22:30 +02:00
i8254.h KVM: remove useless function declaration kvm_inject_pit_timer_irqs() 2011-05-11 07:57:09 -04:00
i8259.c KVM: x86: reset edge sense circuit of i8259 on init 2012-03-05 14:57:30 +02:00
irq.c KVM: fix typo in copyright notice 2010-10-24 10:53:14 +02:00
irq.h KVM: Intelligent device lookup on I/O bus 2011-09-25 19:17:59 +03:00
kvm_cache_regs.h KVM: MMU: Do not unconditionally read PDPTE from guest memory 2011-09-25 19:18:01 +03:00
kvm_timer.h KVM: emulate lapic tsc deadline timer for guest 2011-10-05 15:34:56 +02:00
lapic.c Merge branch 'kvm-updates/3.4' of git://git.kernel.org/pub/scm/virt/kvm/kvm 2012-03-28 14:35:31 -07:00
lapic.h KVM: Expose kvm_lapic_local_deliver() 2011-12-27 11:23:39 +02:00
mmu.c KVM: MMU: make use of ->root_level in reset_rsvds_bits_mask 2012-03-08 14:13:54 +02:00
mmu.h KVM: MMU: mmio page fault support 2011-07-24 11:50:40 +03:00
mmu_audit.c Merge branch 'kvm-updates/3.4' of git://git.kernel.org/pub/scm/virt/kvm/kvm 2012-03-28 14:35:31 -07:00
mmutrace.h KVM: MMU: audit: replace mmu audit tracepoint with jump-label 2011-12-27 11:22:05 +02:00
paging_tmpl.h x86: remove the second argument of k[un]map_atomic() 2012-03-20 21:48:15 +08:00
pmu.c KVM: PMU emulation: GLOBAL_CTRL MSR should be enabled on reset 2012-04-10 15:34:10 +03:00
svm.c Merge branch 'kvm-updates/3.4' of git://git.kernel.org/pub/scm/virt/kvm/kvm 2012-03-28 14:35:31 -07:00
timer.c KVM: x86: Simplify kvm timer handler 2011-12-27 11:17:05 +02:00
trace.h KVM: Use __print_symbolic() for vmexit tracepoints 2011-09-25 19:17:59 +03:00
tss.h
vmx.c KVM: VMX: Fix kvm_set_shared_msr() called in preemptible context 2012-04-18 23:42:27 -03:00
x86.c Merge branch 'kvm-updates/3.4' of git://git.kernel.org/pub/scm/virt/kvm/kvm 2012-03-28 14:35:31 -07:00
x86.h KVM: Move cpuid code to new file 2011-12-27 11:21:49 +02:00