hw/hyperv: Replace legacy ld_phys() -> address_space_ld()
Prefer the address_space_ld/st API over the legacy ld/st_phys() because it allow checking for bus access fault, which shouldn't happen here. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Acked-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com> Message-ID: <20260319082954.65069-1-philmd@linaro.org>
Philippe Mathieu-Daudé committed
Mar 19, 2026 at 09:02 UTC
b9ef483245e63ba846c3c70728a06deafd7bb68a
1 file changed
+4
-1
hw/hyperv/hyperv.c
+4
-1
@@ -709,13 +709,16 @@ uint16_t hyperv_hcall_signal_event(uint64_t param, bool fast)
709
EventFlagHandler *handler;
710
711
if (unlikely(!fast)) {
712
+ MemTxResult result;
713
hwaddr addr = param;
714
715
if (addr & (__alignof__(addr) - 1)) {
716
return HV_STATUS_INVALID_ALIGNMENT;
717
}
718
718
- param = ldq_phys(&address_space_memory, addr);
719
+ param = address_space_ldq_le(&address_space_memory, addr,
720
+ MEMTXATTRS_UNSPECIFIED, &result);
721
+ assert(result == MEMTX_OK);
722
}
723
724
/*