mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -06:00
accel/tcg: Use vaddr for walk_memory_regions callback
Use vaddr instead of target_ulong. At the same time, use int instead of unsigned long for flags, to match page_set_flags(). Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
54bd0b135e
commit
e1c8eb8cfe
4 changed files with 20 additions and 22 deletions
|
@ -4059,8 +4059,7 @@ static void bswap_note(struct elf_note *en)
|
|||
/*
|
||||
* Calculate file (dump) size of given memory region.
|
||||
*/
|
||||
static size_t vma_dump_size(target_ulong start, target_ulong end,
|
||||
unsigned long flags)
|
||||
static size_t vma_dump_size(vaddr start, vaddr end, int flags)
|
||||
{
|
||||
/* The area must be readable. */
|
||||
if (!(flags & PAGE_READ)) {
|
||||
|
@ -4253,8 +4252,8 @@ static int dump_write(int fd, const void *ptr, size_t size)
|
|||
return (0);
|
||||
}
|
||||
|
||||
static int wmr_page_unprotect_regions(void *opaque, target_ulong start,
|
||||
target_ulong end, unsigned long flags)
|
||||
static int wmr_page_unprotect_regions(void *opaque, vaddr start,
|
||||
vaddr end, int flags)
|
||||
{
|
||||
if ((flags & (PAGE_WRITE | PAGE_WRITE_ORG)) == PAGE_WRITE_ORG) {
|
||||
size_t step = MAX(TARGET_PAGE_SIZE, qemu_real_host_page_size());
|
||||
|
@ -4275,8 +4274,8 @@ typedef struct {
|
|||
size_t size;
|
||||
} CountAndSizeRegions;
|
||||
|
||||
static int wmr_count_and_size_regions(void *opaque, target_ulong start,
|
||||
target_ulong end, unsigned long flags)
|
||||
static int wmr_count_and_size_regions(void *opaque, vaddr start,
|
||||
vaddr end, int flags)
|
||||
{
|
||||
CountAndSizeRegions *css = opaque;
|
||||
|
||||
|
@ -4290,8 +4289,8 @@ typedef struct {
|
|||
off_t offset;
|
||||
} FillRegionPhdr;
|
||||
|
||||
static int wmr_fill_region_phdr(void *opaque, target_ulong start,
|
||||
target_ulong end, unsigned long flags)
|
||||
static int wmr_fill_region_phdr(void *opaque, vaddr start,
|
||||
vaddr end, int flags)
|
||||
{
|
||||
FillRegionPhdr *d = opaque;
|
||||
struct elf_phdr *phdr = d->phdr;
|
||||
|
@ -4313,8 +4312,8 @@ static int wmr_fill_region_phdr(void *opaque, target_ulong start,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int wmr_write_region(void *opaque, target_ulong start,
|
||||
target_ulong end, unsigned long flags)
|
||||
static int wmr_write_region(void *opaque, vaddr start,
|
||||
vaddr end, int flags)
|
||||
{
|
||||
int fd = *(int *)opaque;
|
||||
size_t size = vma_dump_size(start, end, flags);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue