[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 2/9] Fix dirty logging with 32-bit qemu & 64-bit guest
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PATCH 2/9] Fix dirty logging with 32-bit qemu & 64-bit guests |
Date: |
Thu, 12 Jan 2012 16:46:21 +1100 |
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>
---
kvm-all.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/kvm-all.c b/kvm-all.c
index 3174f42..363c697 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.7.7.3
- [Qemu-ppc] [0/9] Bugfixes and pseries enhancements, David Gibson, 2012/01/12
- [Qemu-ppc] [PATCH 7/9] pseries: Use correct dispatcher for PCI config space accesses, David Gibson, 2012/01/12
- [Qemu-ppc] [PATCH 2/9] Fix dirty logging with 32-bit qemu & 64-bit guests,
David Gibson <=
- [Qemu-ppc] [PATCH 1/9] load_image_targphys() should enforce the max size, David Gibson, 2012/01/12
- [Qemu-ppc] [PATCH 6/9] pseries: Support PCI extended config space in RTAS calls, David Gibson, 2012/01/12
- [Qemu-ppc] [PATCH 5/9] Correct types in bmdma_addr_{read,write}, David Gibson, 2012/01/12
- [Qemu-ppc] [PATCH 8/9] pseries: Don't try to munmap() a malloc()ed TCE table, David Gibson, 2012/01/12
- [Qemu-ppc] [PATCH 3/9] pci: Make bounds checks on config space accesses actually work, David Gibson, 2012/01/12