hw/virtio/vhost: re-factor vhost-section and allow DIRTY_MEMORY_CODE
The purpose of vhost_section is to identify RAM regions that need to
be made available to a vhost client. However when running under TCG
all RAM sections have DIRTY_MEMORY_CODE set which leads to problems
down the line.
Re-factor the code so:
- steps are clearer to follow
- reason for rejection is recorded in the trace point
- we allow DIRTY_MEMORY_CODE
We expand the comment to explain that kernel based vhost has specific
support for migration tracking.
Signed-off-by: Alex Bennée <[email protected]>
Tested-by: Fabiano Rosas <[email protected]>
Cc: Michael S. Tsirkin <[email protected]>
Cc: Dr. David Alan Gilbert <[email protected]>
Cc: Stefan Hajnoczi <[email protected]>
Message-Id: <
20200605154929[email protected]>