aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2008-02-05 01:27:18 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-05 12:44:06 -0500
commitc0b49b0d164c4902e53c17d90e2c5e5a2ac9e132 (patch)
treed5190139428140b83934f29bb851d087fd86d415 /arch/x86/kvm
parent9ef9dc69d4167276c04590d67ee55de8380bc1ad (diff)
kvm: i386 fix
arch/x86/kvm/x86.c: In function 'emulator_cmpxchg_emulated': arch/x86/kvm/x86.c:1746: warning: passing argument 2 of 'vcpu->arch.mmu.gva_to_gpa' makes integer from pointer without a cast arch/x86/kvm/x86.c:1746: warning: 'addr' is used uninitialized in this function Is true. Local variable `addr' shadows incoming arg `addr'. Avi is on vacation for a while, so... Cc: Avi Kivity <avi@qumranet.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r--arch/x86/kvm/x86.c8
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(&current->mm->mmap_sem); 1745 down_read(&current->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(&current->mm->mmap_sem); 1762 up_read(&current->mm->mmap_sem);