diff options
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r-- | arch/x86/kvm/x86.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 8f94a0b89dff..cf5308148689 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -1739,7 +1739,7 @@ static int emulator_cmpxchg_emulated(unsigned long addr, | |||
1739 | if (bytes == 8) { | 1739 | if (bytes == 8) { |
1740 | gpa_t gpa; | 1740 | gpa_t gpa; |
1741 | struct page *page; | 1741 | struct page *page; |
1742 | char *addr; | 1742 | char *kaddr; |
1743 | u64 val; | 1743 | u64 val; |
1744 | 1744 | ||
1745 | down_read(¤t->mm->mmap_sem); | 1745 | down_read(¤t->mm->mmap_sem); |
@@ -1754,9 +1754,9 @@ static int emulator_cmpxchg_emulated(unsigned long addr, | |||
1754 | 1754 | ||
1755 | val = *(u64 *)new; | 1755 | val = *(u64 *)new; |
1756 | page = gfn_to_page(vcpu->kvm, gpa >> PAGE_SHIFT); | 1756 | page = gfn_to_page(vcpu->kvm, gpa >> PAGE_SHIFT); |
1757 | addr = kmap_atomic(page, KM_USER0); | 1757 | kaddr = kmap_atomic(page, KM_USER0); |
1758 | set_64bit((u64 *)(addr + offset_in_page(gpa)), val); | 1758 | set_64bit((u64 *)(kaddr + offset_in_page(gpa)), val); |
1759 | kunmap_atomic(addr, KM_USER0); | 1759 | kunmap_atomic(kaddr, KM_USER0); |
1760 | kvm_release_page_dirty(page); | 1760 | kvm_release_page_dirty(page); |
1761 | emul_write: | 1761 | emul_write: |
1762 | up_read(¤t->mm->mmap_sem); | 1762 | up_read(¤t->mm->mmap_sem); |