[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 16/26] Fix dirty logging with 32-bit qemu & 64-bit gue
From: |
Alexander Graf |
Subject: |
[Qemu-ppc] [PATCH 16/26] Fix dirty logging with 32-bit qemu & 64-bit guests |
Date: |
Sat, 21 Jan 2012 05:19:01 +0100 |
From: Benjamin Herrenschmidt <address@hidden>
The kvm_get_dirty_pages_log_range() function uses two address
variables to step through the monitored memory region to update the
dirty log. However, these variables have type unsigned long, which
can overflow if running a 64-bit guest with a 32-bit qemu binary.
This patch changes these to target_phys_addr_t which will have the
correct size.
Signed-off-by: Benjamin Herrenschmidt <address@hidden>
Signed-off-by: David Gibson <address@hidden>
Signed-off-by: Alexander Graf <address@hidden>
---
kvm-all.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/kvm-all.c b/kvm-all.c
index 2cc4562..9e84d35 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -344,7 +344,8 @@ static int
kvm_get_dirty_pages_log_range(MemoryRegionSection *section,
unsigned long *bitmap)
{
unsigned int i, j;
- unsigned long page_number, addr, addr1, c;
+ unsigned long page_number, c;
+ target_phys_addr_t addr, addr1;
unsigned int len = ((section->size / TARGET_PAGE_SIZE) + HOST_LONG_BITS -
1) / HOST_LONG_BITS;
/*
--
1.6.0.2
- [Qemu-ppc] [PULL 00/26] ppc patch queue 2012-01-21, Alexander Graf, 2012/01/20
- [Qemu-ppc] [PATCH 06/26] PPC: 440: Default to 440EP CPU, Alexander Graf, 2012/01/20
- [Qemu-ppc] [PATCH 12/26] PPC: Bamboo: Integrate SoC instatiation, use qdev for PCI, Alexander Graf, 2012/01/20
- [Qemu-ppc] [PATCH 07/26] PPC: Enable 440EP CPU target, Alexander Graf, 2012/01/20
- [Qemu-ppc] [PATCH 16/26] Fix dirty logging with 32-bit qemu & 64-bit guests,
Alexander Graf <=
- [Qemu-ppc] [PATCH 14/26] virtio: change memcpy to guest reads, Alexander Graf, 2012/01/20
- [Qemu-ppc] [PATCH 02/26] PPC: Bamboo: Register CPU reset, Alexander Graf, 2012/01/20
- [Qemu-ppc] [PATCH 26/26] grackle_pci: Clean up qdev names, Alexander Graf, 2012/01/20
- [Qemu-ppc] [PATCH 11/26] PPC: Bamboo: fold ppc440.c and ppc440_bamboo.c into a single file, Alexander Graf, 2012/01/20
- [Qemu-ppc] [PATCH 09/26] PPC: bamboo: fix whitespace, Alexander Graf, 2012/01/20
- [Qemu-ppc] [PATCH 13/26] virtio-pci: Fix endianness of virtio config, Alexander Graf, 2012/01/20
- [Qemu-ppc] [PATCH 05/26] PPC: Bamboo: recompile device tree, Alexander Graf, 2012/01/20
- [Qemu-ppc] [PATCH 04/26] PPC: 440: Ignore invalid PCI IRQs, Alexander Graf, 2012/01/20
- [Qemu-ppc] [PATCH 01/26] PPC: 440EP: Initialize timer, Alexander Graf, 2012/01/20
- [Qemu-ppc] [PATCH 18/26] Correct types in bmdma_addr_{read,write}, Alexander Graf, 2012/01/20