diff options
author | Tejun Heo <tj@kernel.org> | 2009-07-03 18:13:18 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2009-07-03 18:13:18 -0400 |
commit | c43768cbb7655ea5ff782ae250f6e2ef4297cf98 (patch) | |
tree | 3982e41dde3eecaa3739a5d1a8ed18d04bd74f01 /virt | |
parent | 1a8dd307cc0a2119be4e578c517795464e6dabba (diff) | |
parent | 746a99a5af60ee676afa2ba469ccd1373493c7e7 (diff) |
Merge branch 'master' into for-next
Pull linus#master to merge PER_CPU_DEF_ATTRIBUTES and alpha build fix
changes. As alpha in percpu tree uses 'weak' attribute instead of
inline assembly, there's no need for __used attribute.
Conflicts:
arch/alpha/include/asm/percpu.h
arch/mn10300/kernel/vmlinux.lds.S
include/linux/percpu-defs.h
Diffstat (limited to 'virt')
-rw-r--r-- | virt/kvm/kvm_main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 764554350ed8..2884baf1d5f9 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c | |||
@@ -746,6 +746,7 @@ static bool make_all_cpus_request(struct kvm *kvm, unsigned int req) | |||
746 | cpumask_clear(cpus); | 746 | cpumask_clear(cpus); |
747 | 747 | ||
748 | me = get_cpu(); | 748 | me = get_cpu(); |
749 | spin_lock(&kvm->requests_lock); | ||
749 | for (i = 0; i < KVM_MAX_VCPUS; ++i) { | 750 | for (i = 0; i < KVM_MAX_VCPUS; ++i) { |
750 | vcpu = kvm->vcpus[i]; | 751 | vcpu = kvm->vcpus[i]; |
751 | if (!vcpu) | 752 | if (!vcpu) |
@@ -762,6 +763,7 @@ static bool make_all_cpus_request(struct kvm *kvm, unsigned int req) | |||
762 | smp_call_function_many(cpus, ack_flush, NULL, 1); | 763 | smp_call_function_many(cpus, ack_flush, NULL, 1); |
763 | else | 764 | else |
764 | called = false; | 765 | called = false; |
766 | spin_unlock(&kvm->requests_lock); | ||
765 | put_cpu(); | 767 | put_cpu(); |
766 | free_cpumask_var(cpus); | 768 | free_cpumask_var(cpus); |
767 | return called; | 769 | return called; |
@@ -982,6 +984,7 @@ static struct kvm *kvm_create_vm(void) | |||
982 | kvm->mm = current->mm; | 984 | kvm->mm = current->mm; |
983 | atomic_inc(&kvm->mm->mm_count); | 985 | atomic_inc(&kvm->mm->mm_count); |
984 | spin_lock_init(&kvm->mmu_lock); | 986 | spin_lock_init(&kvm->mmu_lock); |
987 | spin_lock_init(&kvm->requests_lock); | ||
985 | kvm_io_bus_init(&kvm->pio_bus); | 988 | kvm_io_bus_init(&kvm->pio_bus); |
986 | mutex_init(&kvm->lock); | 989 | mutex_init(&kvm->lock); |
987 | kvm_io_bus_init(&kvm->mmio_bus); | 990 | kvm_io_bus_init(&kvm->mmio_bus); |
@@ -1194,6 +1197,8 @@ int __kvm_set_memory_region(struct kvm *kvm, | |||
1194 | if (!new.dirty_bitmap) | 1197 | if (!new.dirty_bitmap) |
1195 | goto out_free; | 1198 | goto out_free; |
1196 | memset(new.dirty_bitmap, 0, dirty_bytes); | 1199 | memset(new.dirty_bitmap, 0, dirty_bytes); |
1200 | if (old.npages) | ||
1201 | kvm_arch_flush_shadow(kvm); | ||
1197 | } | 1202 | } |
1198 | #endif /* not defined CONFIG_S390 */ | 1203 | #endif /* not defined CONFIG_S390 */ |
1199 | 1204 | ||