Revision a8170e5e kvm-all.c
b/kvm-all.c | ||
---|---|---|
60 | 60 |
|
61 | 61 |
typedef struct KVMSlot |
62 | 62 |
{ |
63 |
target_phys_addr_t start_addr;
|
|
63 |
hwaddr start_addr;
|
|
64 | 64 |
ram_addr_t memory_size; |
65 | 65 |
void *ram; |
66 | 66 |
int slot; |
... | ... | |
131 | 131 |
} |
132 | 132 |
|
133 | 133 |
static KVMSlot *kvm_lookup_matching_slot(KVMState *s, |
134 |
target_phys_addr_t start_addr,
|
|
135 |
target_phys_addr_t end_addr)
|
|
134 |
hwaddr start_addr,
|
|
135 |
hwaddr end_addr)
|
|
136 | 136 |
{ |
137 | 137 |
int i; |
138 | 138 |
|
... | ... | |
152 | 152 |
* Find overlapping slot with lowest start address |
153 | 153 |
*/ |
154 | 154 |
static KVMSlot *kvm_lookup_overlapping_slot(KVMState *s, |
155 |
target_phys_addr_t start_addr,
|
|
156 |
target_phys_addr_t end_addr)
|
|
155 |
hwaddr start_addr,
|
|
156 |
hwaddr end_addr)
|
|
157 | 157 |
{ |
158 | 158 |
KVMSlot *found = NULL; |
159 | 159 |
int i; |
... | ... | |
176 | 176 |
} |
177 | 177 |
|
178 | 178 |
int kvm_physical_memory_addr_from_host(KVMState *s, void *ram, |
179 |
target_phys_addr_t *phys_addr)
|
|
179 |
hwaddr *phys_addr)
|
|
180 | 180 |
{ |
181 | 181 |
int i; |
182 | 182 |
|
... | ... | |
293 | 293 |
return kvm_set_user_memory_region(s, mem); |
294 | 294 |
} |
295 | 295 |
|
296 |
static int kvm_dirty_pages_log_change(target_phys_addr_t phys_addr,
|
|
296 |
static int kvm_dirty_pages_log_change(hwaddr phys_addr,
|
|
297 | 297 |
ram_addr_t size, bool log_dirty) |
298 | 298 |
{ |
299 | 299 |
KVMState *s = kvm_state; |
... | ... | |
302 | 302 |
if (mem == NULL) { |
303 | 303 |
fprintf(stderr, "BUG: %s: invalid parameters " TARGET_FMT_plx "-" |
304 | 304 |
TARGET_FMT_plx "\n", __func__, phys_addr, |
305 |
(target_phys_addr_t)(phys_addr + size - 1));
|
|
305 |
(hwaddr)(phys_addr + size - 1));
|
|
306 | 306 |
return -EINVAL; |
307 | 307 |
} |
308 | 308 |
return kvm_slot_dirty_pages_log_change(mem, log_dirty); |
... | ... | |
363 | 363 |
{ |
364 | 364 |
unsigned int i, j; |
365 | 365 |
unsigned long page_number, c; |
366 |
target_phys_addr_t addr, addr1;
|
|
366 |
hwaddr addr, addr1;
|
|
367 | 367 |
unsigned int len = ((section->size / TARGET_PAGE_SIZE) + HOST_LONG_BITS - 1) / HOST_LONG_BITS; |
368 | 368 |
unsigned long hpratio = getpagesize() / TARGET_PAGE_SIZE; |
369 | 369 |
|
... | ... | |
406 | 406 |
KVMDirtyLog d; |
407 | 407 |
KVMSlot *mem; |
408 | 408 |
int ret = 0; |
409 |
target_phys_addr_t start_addr = section->offset_within_address_space;
|
|
410 |
target_phys_addr_t end_addr = start_addr + section->size;
|
|
409 |
hwaddr start_addr = section->offset_within_address_space;
|
|
410 |
hwaddr end_addr = start_addr + section->size;
|
|
411 | 411 |
|
412 | 412 |
d.dirty_bitmap = NULL; |
413 | 413 |
while (start_addr < end_addr) { |
... | ... | |
456 | 456 |
|
457 | 457 |
static void kvm_coalesce_mmio_region(MemoryListener *listener, |
458 | 458 |
MemoryRegionSection *secion, |
459 |
target_phys_addr_t start, target_phys_addr_t size)
|
|
459 |
hwaddr start, hwaddr size)
|
|
460 | 460 |
{ |
461 | 461 |
KVMState *s = kvm_state; |
462 | 462 |
|
... | ... | |
473 | 473 |
|
474 | 474 |
static void kvm_uncoalesce_mmio_region(MemoryListener *listener, |
475 | 475 |
MemoryRegionSection *secion, |
476 |
target_phys_addr_t start, target_phys_addr_t size)
|
|
476 |
hwaddr start, hwaddr size)
|
|
477 | 477 |
{ |
478 | 478 |
KVMState *s = kvm_state; |
479 | 479 |
|
... | ... | |
556 | 556 |
int err; |
557 | 557 |
MemoryRegion *mr = section->mr; |
558 | 558 |
bool log_dirty = memory_region_is_logging(mr); |
559 |
target_phys_addr_t start_addr = section->offset_within_address_space;
|
|
559 |
hwaddr start_addr = section->offset_within_address_space;
|
|
560 | 560 |
ram_addr_t size = section->size; |
561 | 561 |
void *ram = NULL; |
562 | 562 |
unsigned delta; |
Also available in: Unified diff