On 08.06.21 03:00, Jason Wang wrote: Hi folks,
Just to make sure we are in the same page. What I meant is, if the DMA behavior like (no-snoop) is device specific. There's no need to mandate a virtio general attributes. We can describe it per device. The devices implemented in the current spec does not use non-coherent DMA doesn't mean any future devices won't do that. The driver could choose to use transport (e.g PCI), platform (ACPI) or device specific (general virtio command) way to detect and flush cache when necessary.
Maybe I've totally misunderstood the whole issue, but what I've learned to far: * it's a performance improvement for certain scenarios * whether it can be used depends on the devices as well as the underlying transport (combination of both) * whether it should be used (when possible) can only be decided by the driver Correct ? I tend to believe that's something that virtio infrastructure should handle in a generic way. Maybe the device as well as the transport could announce their capability (which IMHO should go via the virtio protocol), and if both are capable, the (guest's) virtio subsys tells the driver whether it's usable for a specific device. Perhaps we should also have a mechanism to tell the device that it's actually used. Sorry, if i'm completely on the wrong page and just talking junk here :o --mtx -- --- Hinweis: unverschlüsselte E-Mails können leicht abgehört und manipuliert werden ! Für eine vertrauliche Kommunikation senden Sie bitte ihren GPG/PGP-Schlüssel zu. --- Enrico Weigelt, metux IT consult Free software and Linux embedded engineering info@xxxxxxxxx -- +49-151-27565287