Commit 41cff02
vhost: modify vhost_log_write() for broader users
Currently, the only user of vhost_log_write() is vhost-net. The 'len'
argument prevents logging of pages that are not tainted by the RX path.
Adjustments are needed since more drivers (i.e. vhost-scsi) begin using
vhost_log_write(). So far vhost-net RX path may only partially use pages
shared via the last vring descriptor. Unlike vhost-net, vhost-scsi always
logs all pages shared via vring descriptors. To accommodate this,
use (len == U64_MAX) to indicate whether the driver would log all pages of
vring descriptors, or only pages that are tainted by the driver.
In addition, removes BUG().
Suggested-by: Joao Martins <[email protected]>
Signed-off-by: Dongli Zhang <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>1 parent a5806cd commit 41cff02
1 file changed
+20
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2304 | 2304 | | |
2305 | 2305 | | |
2306 | 2306 | | |
| 2307 | + | |
| 2308 | + | |
| 2309 | + | |
| 2310 | + | |
| 2311 | + | |
| 2312 | + | |
| 2313 | + | |
| 2314 | + | |
| 2315 | + | |
| 2316 | + | |
| 2317 | + | |
| 2318 | + | |
| 2319 | + | |
2307 | 2320 | | |
2308 | 2321 | | |
2309 | 2322 | | |
| |||
2327 | 2340 | | |
2328 | 2341 | | |
2329 | 2342 | | |
2330 | | - | |
2331 | | - | |
2332 | | - | |
2333 | | - | |
2334 | | - | |
2335 | | - | |
| 2343 | + | |
| 2344 | + | |
| 2345 | + | |
2336 | 2346 | | |
2337 | | - | |
2338 | | - | |
| 2347 | + | |
| 2348 | + | |
| 2349 | + | |
| 2350 | + | |
2339 | 2351 | | |
2340 | 2352 | | |
2341 | 2353 | | |
| |||
0 commit comments