qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] vhost, iova, and dirty page tracking
@ 2019-09-16  1:51 Tian, Kevin
  2019-09-16  8:33 ` Jason Wang
  0 siblings, 1 reply; 40+ messages in thread
From: Tian, Kevin @ 2019-09-16  1:51 UTC (permalink / raw)
  To: Jason Wang
  Cc: Alex Williamson (alex.williamson@redhat.com), Zhao, Yan Y, qemu-devel

Hi, Jason

We had a discussion about dirty page tracking in VFIO, when vIOMMU
is enabled:

https://lists.nongnu.org/archive/html/qemu-devel/2019-09/msg02690.html

It's actually a similar model as vhost - Qemu cannot interpose the fast-path
DMAs thus relies on the kernel part to track and report dirty page information.
Currently Qemu tracks dirty pages in GFN level, thus demanding a translation
from IOVA to GPA. Then the open in our discussion is where this translation
should happen. Doing the translation in kernel implies a device iotlb flavor,
which is what vhost implements today. It requires potentially large tracking
structures in the host kernel, but leveraging the existing log_sync flow in Qemu.
On the other hand, Qemu may perform log_sync for every removal of IOVA
mapping and then do the translation itself, then avoiding the GPA awareness
in the kernel side. It needs some change to current Qemu log-sync flow, and 
may bring more overhead if IOVA is frequently unmapped.

So we'd like to hear about your opinions, especially about how you came
down to the current iotlb approach for vhost. 

p.s. Alex's comment is also copied here from original thread.

> So vhost must then be configuring a listener across system memory
> rather than only against the device AddressSpace like we do in vfio,
> such that it get's log_sync() callbacks for the actual GPA space rather
> than only the IOVA space.  OTOH, QEMU could understand that the device
> AddressSpace has a translate function and apply the IOVA dirty bits to
> the system memory AddressSpace.  Wouldn't it make more sense for
> QEMU
> to perform a log_sync() prior to removing a MemoryRegionSection within
> an AddressSpace and update the GPA rather than pushing GPA awareness
> and potentially large tracking structures into the host kernel?

Thanks
Kevin


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

end of thread, other threads:[~2019-09-25  3:47 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-16  1:51 [Qemu-devel] vhost, iova, and dirty page tracking Tian, Kevin
2019-09-16  8:33 ` Jason Wang
2019-09-17  8:48   ` Tian, Kevin
2019-09-17 10:36     ` Jason Wang
2019-09-18  1:44       ` Tian, Kevin
2019-09-18  6:10         ` Jason Wang
2019-09-18  7:41           ` Tian, Kevin
2019-09-18  8:37           ` Tian, Kevin
2019-09-19  1:05             ` Jason Wang
2019-09-19  5:28               ` Yan Zhao
2019-09-19  6:09                 ` Jason Wang
2019-09-19  6:17                   ` Yan Zhao
2019-09-19  6:32                     ` Jason Wang
2019-09-19  6:29                       ` Yan Zhao
2019-09-19  6:32                         ` Yan Zhao
2019-09-19  9:35                           ` Jason Wang
2019-09-19  9:36                             ` Yan Zhao
2019-09-19 10:08                               ` Jason Wang
2019-09-19 10:06                         ` Jason Wang
2019-09-19 10:16                           ` Yan Zhao
2019-09-19 12:14                             ` Jason Wang
2019-09-19  7:16                       ` Tian, Kevin
2019-09-19  9:37                         ` Jason Wang
2019-09-19 14:06                           ` Michael S. Tsirkin
2019-09-20  1:15                             ` Jason Wang
2019-09-20 10:02                               ` Michael S. Tsirkin
2019-09-19 11:14                         ` Paolo Bonzini
2019-09-19 12:39                           ` Jason Wang
2019-09-19 12:45                             ` Paolo Bonzini
2019-09-19 22:54                           ` Tian, Kevin
2019-09-20  1:18                             ` Jason Wang
2019-09-24  2:02                               ` Tian, Kevin
2019-09-25  3:46                                 ` Jason Wang
2019-09-17 14:54     ` Alex Williamson
2019-09-18  1:31       ` Tian, Kevin
2019-09-18  6:03         ` Jason Wang
2019-09-18  7:21           ` Tian, Kevin
2019-09-19 17:20             ` Alex Williamson
2019-09-19 22:40               ` Tian, Kevin
     [not found]       ` <AADFC41AFE54684AB9EE6CBC0274A5D19D57AFB7@SHSMSX104.ccr.corp.intel.com>
2019-09-18  2:15         ` Tian, Kevin

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