ram_addr.h (c760cb77e511eb05094df67c1b30029a952efa35) | ram_addr.h (038adc2f5850e32019bda06c559d0301be436eae) |
---|---|
1/* 2 * Declarations for cpu physical memory functions 3 * 4 * Copyright 2011 Red Hat, Inc. and/or its affiliates 5 * 6 * Authors: 7 * Avi Kivity <avi@redhat.com> 8 * --- 359 unchanged lines hidden (view full) --- 368 ram_addr_t start, 369 ram_addr_t pages) 370{ 371 unsigned long i, j; 372 unsigned long page_number, c; 373 hwaddr addr; 374 ram_addr_t ram_addr; 375 unsigned long len = (pages + HOST_LONG_BITS - 1) / HOST_LONG_BITS; | 1/* 2 * Declarations for cpu physical memory functions 3 * 4 * Copyright 2011 Red Hat, Inc. and/or its affiliates 5 * 6 * Authors: 7 * Avi Kivity <avi@redhat.com> 8 * --- 359 unchanged lines hidden (view full) --- 368 ram_addr_t start, 369 ram_addr_t pages) 370{ 371 unsigned long i, j; 372 unsigned long page_number, c; 373 hwaddr addr; 374 ram_addr_t ram_addr; 375 unsigned long len = (pages + HOST_LONG_BITS - 1) / HOST_LONG_BITS; |
376 unsigned long hpratio = getpagesize() / TARGET_PAGE_SIZE; | 376 unsigned long hpratio = qemu_real_host_page_size / TARGET_PAGE_SIZE; |
377 unsigned long page = BIT_WORD(start >> TARGET_PAGE_BITS); 378 379 /* start address is aligned at the start of a word? */ 380 if ((((page * BITS_PER_LONG) << TARGET_PAGE_BITS) == start) && 381 (hpratio == 1)) { 382 unsigned long **blocks[DIRTY_MEMORY_NUM]; 383 unsigned long idx; 384 unsigned long offset; --- 163 unchanged lines hidden --- | 377 unsigned long page = BIT_WORD(start >> TARGET_PAGE_BITS); 378 379 /* start address is aligned at the start of a word? */ 380 if ((((page * BITS_PER_LONG) << TARGET_PAGE_BITS) == start) && 381 (hpratio == 1)) { 382 unsigned long **blocks[DIRTY_MEMORY_NUM]; 383 unsigned long idx; 384 unsigned long offset; --- 163 unchanged lines hidden --- |