From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Subject: [PULL 15/41] target/i386/whpx: Replace legacy cpu_physical_memory_rw() call
Date: Tue, 7 Oct 2025 03:49:57 +0200 [thread overview]
Message-ID: <20251007014958.19086-2-philmd@linaro.org> (raw)
In-Reply-To: <20251007014958.19086-1-philmd@linaro.org>
Get the vCPU address space and convert the legacy
cpu_physical_memory_rw() by address_space_rw().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251002084203.63899-10-philmd@linaro.org>
---
target/i386/whpx/whpx-all.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/target/i386/whpx/whpx-all.c b/target/i386/whpx/whpx-all.c
index 2a85168ed51..256761834c9 100644
--- a/target/i386/whpx/whpx-all.c
+++ b/target/i386/whpx/whpx-all.c
@@ -788,8 +788,11 @@ static HRESULT CALLBACK whpx_emu_mmio_callback(
void *ctx,
WHV_EMULATOR_MEMORY_ACCESS_INFO *ma)
{
- cpu_physical_memory_rw(ma->GpaAddress, ma->Data, ma->AccessSize,
- ma->Direction);
+ CPUState *cs = (CPUState *)ctx;
+ AddressSpace *as = cpu_addressspace(cs, MEMTXATTRS_UNSPECIFIED);
+
+ address_space_rw(as, ma->GpaAddress, MEMTXATTRS_UNSPECIFIED,
+ ma->Data, ma->AccessSize, ma->Direction);
return S_OK;
}
--
2.51.0
next prev parent reply other threads:[~2025-10-07 1:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-07 1:49 [PULL 00/41] Memory patches for 2025-10-07 Philippe Mathieu-Daudé
2025-10-07 1:49 ` Philippe Mathieu-Daudé [this message]
2025-10-07 1:49 ` [PULL 23/41] hw/virtio/virtio: Replace legacy cpu_physical_memory_map() call Philippe Mathieu-Daudé
2025-10-07 3:05 ` [PULL 00/41] Memory patches for 2025-10-07 Philippe Mathieu-Daudé
2025-10-07 22:58 ` Richard Henderson
-- strict thread matches above, loose matches on Subject: below --
2025-10-04 7:12 [PULL 00/41] Memory patches for 2025-10-04 Philippe Mathieu-Daudé
2025-10-04 7:12 ` [PULL 15/41] target/i386/whpx: Replace legacy cpu_physical_memory_rw() call Philippe Mathieu-Daudé
2025-10-04 17:51 ` Richard Henderson
2025-10-06 3:53 ` Philippe Mathieu-Daudé
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=20251007014958.19086-2-philmd@linaro.org \
--to=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
/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).