diff options
-rw-r--r-- | arch/x86/kvm/x86.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 5916191420c7..9870ce422920 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -1495,6 +1495,7 @@ static int kvm_vm_ioctl_set_memory_alias(struct kvm *kvm, | |||
1495 | goto out; | 1495 | goto out; |
1496 | 1496 | ||
1497 | down_write(&kvm->slots_lock); | 1497 | down_write(&kvm->slots_lock); |
1498 | spin_lock(&kvm->mmu_lock); | ||
1498 | 1499 | ||
1499 | p = &kvm->arch.aliases[alias->slot]; | 1500 | p = &kvm->arch.aliases[alias->slot]; |
1500 | p->base_gfn = alias->guest_phys_addr >> PAGE_SHIFT; | 1501 | p->base_gfn = alias->guest_phys_addr >> PAGE_SHIFT; |
@@ -1506,6 +1507,7 @@ static int kvm_vm_ioctl_set_memory_alias(struct kvm *kvm, | |||
1506 | break; | 1507 | break; |
1507 | kvm->arch.naliases = n; | 1508 | kvm->arch.naliases = n; |
1508 | 1509 | ||
1510 | spin_unlock(&kvm->mmu_lock); | ||
1509 | kvm_mmu_zap_all(kvm); | 1511 | kvm_mmu_zap_all(kvm); |
1510 | 1512 | ||
1511 | up_write(&kvm->slots_lock); | 1513 | up_write(&kvm->slots_lock); |