qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Yan-Jie Wang <ubzeme@gmail.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Roman Bolshakov <r.bolshakov@yadro.com>,
	Alexander Graf <agraf@csgraf.de>,
	Cameron Esfahani <dirty@apple.com>,
	Yan-Jie Wang <ubzeme@gmail.com>
Subject: [PATCH v2 3/9] hvf: use correct data types for addresses in memory related functions
Date: Wed,  2 Mar 2022 20:26:05 +0800	[thread overview]
Message-ID: <20220302122611.15237-4-ubzeme@gmail.com> (raw)
In-Reply-To: <20220302122611.15237-1-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 32452696b6..6b82be3220 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.32.0 (Apple Git-132)



  parent reply	other threads:[~2022-03-02 13:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-02 12:26 [PATCH v2 0/9] Many improvements to HVF memory-related codes Yan-Jie Wang
2022-03-02 12:26 ` [PATCH v2 1/9] hvf: move memory related functions from hvf-accel-ops.c to hvf-mem.c Yan-Jie Wang
2022-03-02 12:26 ` [PATCH v2 2/9] hvf: simplify data structures and codes of memory related functions Yan-Jie Wang
2022-03-02 12:26 ` Yan-Jie Wang [this message]
2022-03-02 12:26 ` [PATCH v2 4/9] hvf: rename struct hvf_slot to HVFSlot Yan-Jie Wang
2022-03-02 12:26 ` [PATCH v2 5/9] hvf: fix memory dirty-tracking Yan-Jie Wang
2022-03-02 12:26 ` [PATCH v2 6/9] hvf: add a lock for memory related functions Yan-Jie Wang
2022-03-02 12:26 ` [PATCH v2 7/9] hvf: use GTree to store memory slots instead of fixed-size array Yan-Jie Wang
2022-03-02 12:26 ` [PATCH v2 8/9] hvf: only consider directly writeable memory regions for dirty-tracking Yan-Jie Wang
2022-03-02 12:26 ` [PATCH v2 9/9] hvf: remove the need to lookup memory slots when clearing dirty-bits Yan-Jie Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220302122611.15237-4-ubzeme@gmail.com \
    --to=ubzeme@gmail.com \
    --cc=agraf@csgraf.de \
    --cc=dirty@apple.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=r.bolshakov@yadro.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).