[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH qemu 3/7] hvf: use correct data types for addresses in memory rel
From: |
~ubzeme |
Subject: |
[PATCH qemu 3/7] hvf: use correct data types for addresses in memory related functions |
Date: |
Mon, 28 Feb 2022 09:12:14 +0800 |
From: Yan-Jie Wang <ubzeme@gmail.com>
Follow the QEMU coding style. Use hwaddr for guest physical address.
Signed-off-by: Yan-Jie Wang <ubzeme@gmail.com>
---
accel/hvf/hvf-mem.c | 2 +-
include/sysemu/hvf_int.h | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/accel/hvf/hvf-mem.c b/accel/hvf/hvf-mem.c
index c60303c84e..e8cd6b9251 100644
--- a/accel/hvf/hvf-mem.c
+++ b/accel/hvf/hvf-mem.c
@@ -32,7 +32,7 @@
static hvf_slot memslots[HVF_NUM_SLOTS];
-hvf_slot *hvf_find_overlap_slot(uint64_t start, uint64_t size)
+hvf_slot *hvf_find_overlap_slot(hwaddr start, hwaddr size)
{
hvf_slot *slot;
int x;
diff --git a/include/sysemu/hvf_int.h b/include/sysemu/hvf_int.h
index 8ee31a16ac..2c4a97debe 100644
--- a/include/sysemu/hvf_int.h
+++ b/include/sysemu/hvf_int.h
@@ -22,9 +22,9 @@
#define HVF_SLOT_READONLY (1 << 1)
typedef struct hvf_slot {
- uint64_t start;
- uint64_t size; /* 0 if the slot is free */
- uint64_t offset; /* offset within memory region */
+ hwaddr start;
+ hwaddr size; /* 0 if the slot is free */
+ hwaddr offset; /* offset within memory region */
uint32_t flags;
MemoryRegion *region;
} hvf_slot;
@@ -58,7 +58,7 @@ int hvf_arch_init(void);
int hvf_arch_init_vcpu(CPUState *cpu);
void hvf_arch_vcpu_destroy(CPUState *cpu);
int hvf_vcpu_exec(CPUState *);
-hvf_slot *hvf_find_overlap_slot(uint64_t, uint64_t);
+hvf_slot *hvf_find_overlap_slot(hwaddr, hwaddr);
int hvf_put_registers(CPUState *);
int hvf_get_registers(CPUState *);
void hvf_kick_vcpu_thread(CPUState *cpu);
--
2.34.1
- [PATCH qemu 0/7] Many improvements to HVF memory-related codes, ~ubzeme, 2022/02/28
- [PATCH qemu 1/7] hvf: move memory related functions from hvf-accel-ops.c to hvf-mem.c, ~ubzeme, 2022/02/28
- [PATCH qemu 6/7] hvf: add a lock for memory related functions, ~ubzeme, 2022/02/28
- [PATCH qemu 2/7] hvf: simplify data structures and codes of memory related functions, ~ubzeme, 2022/02/28
- [PATCH qemu 5/7] hvf: fix memory dirty-tracking, ~ubzeme, 2022/02/28
- [PATCH qemu 4/7] hvf: rename struct hvf_slot to HVFSlot, ~ubzeme, 2022/02/28
- [PATCH qemu 3/7] hvf: use correct data types for addresses in memory related functions,
~ubzeme <=
- [PATCH qemu 7/7] hvf: use GTree to store memory slots instead of fixed-size array, ~ubzeme, 2022/02/28
- Re: [PATCH qemu 0/7] Many improvements to HVF memory-related codes, Peter Maydell, 2022/02/28