aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/surface/aggregator/ssh_parser.c
diff options
context:
space:
mode:
authorGreg Kurz <[email protected]>2020-10-03 10:02:13 +0000
committerMichael S. Tsirkin <[email protected]>2020-10-04 07:45:20 +0000
commitab5122510b0a453c0ac898ec9952d38e80243ee7 (patch)
treed645c482c4a211c0b1031c75d2590147462bd540 /drivers/platform/surface/aggregator/ssh_parser.c
parentvhost: Use vhost_get_used_size() in vhost_vring_set_addr() (diff)
downloadkernel-ab5122510b0a453c0ac898ec9952d38e80243ee7.tar.gz
kernel-ab5122510b0a453c0ac898ec9952d38e80243ee7.zip
vhost: Don't call log_access_ok() when using IOTLB
When the IOTLB device is enabled, the log_guest_addr that is passed by userspace to the VHOST_SET_VRING_ADDR ioctl, and which is then written to vq->log_addr, is a GIOVA. All writes to this address are translated by log_user() to writes to an HVA, and then ultimately logged through the corresponding GPAs in log_write_hva(). No logging will ever occur with vq->log_addr in this case. It is thus wrong to pass vq->log_addr and log_guest_addr to log_access_vq() which assumes they are actual GPAs. Introduce a new vq_log_used_access_ok() helper that only checks accesses to the log for the used structure when there isn't an IOTLB device around. Signed-off-by: Greg Kurz <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Michael S. Tsirkin <[email protected]>
Diffstat (limited to 'drivers/platform/surface/aggregator/ssh_parser.c')
0 files changed, 0 insertions, 0 deletions