qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* Plugin virtual-to-physical translation incorrect for some IO accesses
@ 2021-07-06 20:47 Aaron Lindsay
  2021-07-06 21:10 ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 6+ messages in thread
From: Aaron Lindsay @ 2021-07-06 20:47 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell, Alex Bennée; +Cc: cota, richard.henderson

Hello,

I previously supplied a patch which modified the plugin interface such
that it will return physical addresses for IO regions [0]. However, I
have now found a case where the interface does not appear to correctly
return the full physical addresses.

In particular, when in qemu_plugin_hwaddr_phys_addr() for a particular
store to IO memory (haddr->is_io==true), I find that haddr->v.io.offset
is 0x0 and mrs->mr->addr is 0x3000, meaning 0x3000 is the returned
"physical address". However, I also find that
mrs->offset_within_address_space is 0x8000007000 (and also that
0x8000007000 matches up with what an actual translation would be from
inspecting the page tables).

Would it be 'safe' to *always* begin using
mrs->offset_within_address_space as the returned physical address here
instead of `haddr->v.io.offset + mrs->mr->addr`, or is there a reason we
should not do that?

Thanks!

-Aaron

[0] https://lists.nongnu.org/archive/html/qemu-devel/2021-03/msg03137.html


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-07-07 14:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-06 20:47 Plugin virtual-to-physical translation incorrect for some IO accesses Aaron Lindsay
2021-07-06 21:10 ` Philippe Mathieu-Daudé
2021-07-06 21:56   ` Aaron Lindsay via
2021-07-07  7:53     ` Philippe Mathieu-Daudé
2021-07-07 11:35       ` Aaron Lindsay via
2021-07-07 14:05         ` Aaron Lindsay via

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).