search for: log_addr

Displaying 20 results from an estimated 169 matches for "log_addr".

2018 Dec 12
2
[PATCH net V2 4/4] vhost: log dirty page correctly
...error fd: VHOST_SET_VRING_ERR, need to wake it up. > + return 0; > +} > + > +static void log_used(struct vhost_virtqueue *vq, u64 used_offset, u64 len) > +{ > + struct iovec iov[64]; > + int i, ret; > + > + if (!vq->iotlb) { > + log_write(vq->log_base, vq->log_addr + used_offset, len); > + return; > + } This change seems questionable. used ring writes use their own machinery it does not go through iotlb. Same should apply to log I think. > + > + ret = translate_desc(vq, (u64)(uintptr_t)vq->used + used_offset, > + len, iov, 64, VHO...
2018 Dec 12
2
[PATCH net V2 4/4] vhost: log dirty page correctly
...error fd: VHOST_SET_VRING_ERR, need to wake it up. > + return 0; > +} > + > +static void log_used(struct vhost_virtqueue *vq, u64 used_offset, u64 len) > +{ > + struct iovec iov[64]; > + int i, ret; > + > + if (!vq->iotlb) { > + log_write(vq->log_base, vq->log_addr + used_offset, len); > + return; > + } This change seems questionable. used ring writes use their own machinery it does not go through iotlb. Same should apply to log I think. > + > + ret = translate_desc(vq, (u64)(uintptr_t)vq->used + used_offset, > + len, iov, 64, VHO...
2018 Dec 10
0
[PATCH net 4/4] vhost: log dirty page correctly
...+ return r; + hit = true; + } + } + + /* No reverse mapping, should be a bug */ + WARN_ON(!hit); + return 0; +} + +static void log_used(struct vhost_virtqueue *vq, u64 used_offset, u64 len) +{ + struct iovec iov[64]; + int i, ret; + + if (!vq->iotlb) { + log_write(vq->log_base, vq->log_addr + used_offset, len); + return; + } + + ret = translate_desc(vq, (u64)vq->used + used_offset, len, iov, 64, + VHOST_ACCESS_WO); + WARN_ON(ret < 0); + + for (i = 0; i < ret; i++) { + ret = log_write_hva(vq, (u64)iov[i].iov_base, iov[i].iov_len); + WARN_ON(ret); + } +} + int vhost_...
2018 Dec 12
0
[PATCH net V2 4/4] vhost: log dirty page correctly
...+ return r; + hit = true; + } + } + + /* No reverse mapping, should be a bug */ + WARN_ON(!hit); + return 0; +} + +static void log_used(struct vhost_virtqueue *vq, u64 used_offset, u64 len) +{ + struct iovec iov[64]; + int i, ret; + + if (!vq->iotlb) { + log_write(vq->log_base, vq->log_addr + used_offset, len); + return; + } + + ret = translate_desc(vq, (u64)(uintptr_t)vq->used + used_offset, + len, iov, 64, VHOST_ACCESS_WO); + WARN_ON(ret < 0); + + for (i = 0; i < ret; i++) { + ret = log_write_hva(vq, (u64)(uintptr_t)iov[i].iov_base, + iov[i].iov_len); + WAR...
2010 Feb 23
3
[PATCH 0/3] vhost: logging fixes
The following patches on top of net-next fix issues related to write logging in vhost. This fixes all known to me logging issues, migration now works for me while under stress in both TX and RX directions. Rusty's going on vacation, I am guessing he won't have time to review this: Gleb, Juan, Herbert, could one of you review this patchset please? There's also the send queue full issue
2010 Feb 23
3
[PATCH 0/3] vhost: logging fixes
The following patches on top of net-next fix issues related to write logging in vhost. This fixes all known to me logging issues, migration now works for me while under stress in both TX and RX directions. Rusty's going on vacation, I am guessing he won't have time to review this: Gleb, Juan, Herbert, could one of you review this patchset please? There's also the send queue full issue
2018 Dec 12
10
[PATCH net V2 0/4] Fix various issue of vhost
Hi: This series tries to fix various issues of vhost: - Patch 1 adds a missing write barrier between used idx updating and logging. - Patch 2-3 brings back the protection of device IOTLB through vq mutex, this fixes possible use after free in device IOTLB entries. - Patch 4-7 fixes the diry page logging when device IOTLB is enabled. We should done through GPA instead of GIOVA, this was
2018 Dec 12
10
[PATCH net V2 0/4] Fix various issue of vhost
Hi: This series tries to fix various issues of vhost: - Patch 1 adds a missing write barrier between used idx updating and logging. - Patch 2-3 brings back the protection of device IOTLB through vq mutex, this fixes possible use after free in device IOTLB entries. - Patch 4-7 fixes the diry page logging when device IOTLB is enabled. We should done through GPA instead of GIOVA, this was
2018 Dec 13
0
[PATCH net V2 4/4] vhost: log dirty page correctly
.... > Ok. >> + return 0; >> +} >> + >> +static void log_used(struct vhost_virtqueue *vq, u64 used_offset, u64 len) >> +{ >> + struct iovec iov[64]; >> + int i, ret; >> + >> + if (!vq->iotlb) { >> + log_write(vq->log_base, vq->log_addr + used_offset, len); >> + return; >> + } > This change seems questionable. used ring writes > use their own machinery it does not go through iotlb. > Same should apply to log I think. The problem is used ring may not be physically contiguous with Device IOTLB enabled. So it...
2018 Dec 13
2
[PATCH net V2 4/4] vhost: log dirty page correctly
...gt; > > + > > > +static void log_used(struct vhost_virtqueue *vq, u64 used_offset, u64 len) > > > +{ > > > + struct iovec iov[64]; > > > + int i, ret; > > > + > > > + if (!vq->iotlb) { > > > + log_write(vq->log_base, vq->log_addr + used_offset, len); > > > + return; > > > + } > > This change seems questionable. used ring writes > > use their own machinery it does not go through iotlb. > > Same should apply to log I think. > > > The problem is used ring may not be physically co...
2018 Dec 13
2
[PATCH net V2 4/4] vhost: log dirty page correctly
...gt; > > + > > > +static void log_used(struct vhost_virtqueue *vq, u64 used_offset, u64 len) > > > +{ > > > + struct iovec iov[64]; > > > + int i, ret; > > > + > > > + if (!vq->iotlb) { > > > + log_write(vq->log_base, vq->log_addr + used_offset, len); > > > + return; > > > + } > > This change seems questionable. used ring writes > > use their own machinery it does not go through iotlb. > > Same should apply to log I think. > > > The problem is used ring may not be physically co...
2011 Jun 16
1
[PATCH] vhost: set dirty log when updating flags of used ring
...return get_user(vq->last_used_idx, &used->idx); @@ -700,7 +702,6 @@ static long vhost_set_vring(struct vhost_dev *d, int ioctl, void __user *argp) vq->desc = (void __user *)(unsigned long)a.desc_user_addr; vq->avail = (void __user *)(unsigned long)a.avail_user_addr; vq->log_addr = a.log_guest_addr; - vq->used = (void __user *)(unsigned long)a.used_user_addr; break; case VHOST_SET_VRING_KICK: if (copy_from_user(&f, argp, sizeof f)) { @@ -1375,6 +1376,23 @@ void vhost_add_used_and_signal_n(struct vhost_dev *dev, vhost_signal(dev, vq); } +int vhost_update...
2011 Jun 16
1
[PATCH] vhost: set dirty log when updating flags of used ring
...return get_user(vq->last_used_idx, &used->idx); @@ -700,7 +702,6 @@ static long vhost_set_vring(struct vhost_dev *d, int ioctl, void __user *argp) vq->desc = (void __user *)(unsigned long)a.desc_user_addr; vq->avail = (void __user *)(unsigned long)a.avail_user_addr; vq->log_addr = a.log_guest_addr; - vq->used = (void __user *)(unsigned long)a.used_user_addr; break; case VHOST_SET_VRING_KICK: if (copy_from_user(&f, argp, sizeof f)) { @@ -1375,6 +1376,23 @@ void vhost_add_used_and_signal_n(struct vhost_dev *dev, vhost_signal(dev, vq); } +int vhost_update...
2010 Apr 23
1
[PATCHv5] add mergeable receiver buffers support to vhost
...next-v5/drivers/vhost/vhost.c --- net-next-v0/drivers/vhost/vhost.c 2010-04-22 11:31:57.000000000 -0700 +++ net-next-v5/drivers/vhost/vhost.c 2010-04-22 12:19:59.000000000 -0700 @@ -114,7 +114,8 @@ static void vhost_vq_reset(struct vhost_ vq->used_flags = 0; vq->log_used = false; vq->log_addr = -1ull; - vq->hdr_size = 0; + vq->vhost_hlen = 0; + vq->sock_hlen = 0; vq->private_data = NULL; vq->log_base = NULL; vq->error_ctx = NULL; @@ -861,6 +862,53 @@ static unsigned get_indirect(struct vhos return 0; } +/* This is a multi-buffer version of vhost_get_vq_desc...
2010 Apr 23
1
[PATCHv5] add mergeable receiver buffers support to vhost
...next-v5/drivers/vhost/vhost.c --- net-next-v0/drivers/vhost/vhost.c 2010-04-22 11:31:57.000000000 -0700 +++ net-next-v5/drivers/vhost/vhost.c 2010-04-22 12:19:59.000000000 -0700 @@ -114,7 +114,8 @@ static void vhost_vq_reset(struct vhost_ vq->used_flags = 0; vq->log_used = false; vq->log_addr = -1ull; - vq->hdr_size = 0; + vq->vhost_hlen = 0; + vq->sock_hlen = 0; vq->private_data = NULL; vq->log_base = NULL; vq->error_ctx = NULL; @@ -861,6 +862,53 @@ static unsigned get_indirect(struct vhos return 0; } +/* This is a multi-buffer version of vhost_get_vq_desc...
2010 Oct 11
2
[patch 1/2] vhost: potential integer overflows
...r *log_base) { + if (vq->num > UINT_MAX / sizeof *vq->used->ring - sizeof *vq->used) + return 0; + return vq_memory_access_ok(log_base, vq->dev->memory, vhost_has_feature(vq->dev, VHOST_F_LOG_ALL)) && (!vq->log_used || log_access_ok(log_base, vq->log_addr, @@ -606,12 +617,17 @@ static long vhost_set_vring(struct vhost_dev *d, int ioctl, void __user *argp) } /* Also validate log access for used ring if enabled. */ - if ((a.flags & (0x1 << VHOST_VRING_F_LOG)) && - !log_access_ok(vq->log_base, a.log_guest_addr, +...
2010 Oct 11
2
[patch 1/2] vhost: potential integer overflows
...r *log_base) { + if (vq->num > UINT_MAX / sizeof *vq->used->ring - sizeof *vq->used) + return 0; + return vq_memory_access_ok(log_base, vq->dev->memory, vhost_has_feature(vq->dev, VHOST_F_LOG_ALL)) && (!vq->log_used || log_access_ok(log_base, vq->log_addr, @@ -606,12 +617,17 @@ static long vhost_set_vring(struct vhost_dev *d, int ioctl, void __user *argp) } /* Also validate log access for used ring if enabled. */ - if ((a.flags & (0x1 << VHOST_VRING_F_LOG)) && - !log_access_ok(vq->log_base, a.log_guest_addr, +...
2009 Jan 29
0
[PATCH v2] txt: 2/5 - ACPI Generic Address Structure for tboot shutdown
...orted version of tboot (%u)\n", tboot_shared->version); + return; + } g_tboot_shared = tboot_shared; printk("TBOOT: found shared page at phys addr %lx:\n", p_tboot_shared); printk(" version: %d\n", tboot_shared->version); printk(" log_addr: 0x%08x\n", tboot_shared->log_addr); printk(" shutdown_entry: 0x%08x\n", tboot_shared->shutdown_entry); - printk(" shutdown_type: %d\n", tboot_shared->shutdown_type); - printk(" s3_tb_wakeup_entry: 0x%08x\n", tboot_shared->s3_tb_wakeup_en...
2010 Apr 19
2
[PATCH v4] Add mergeable RX bufs support to vhost
...next-v4/drivers/vhost/vhost.c --- net-next-p0/drivers/vhost/vhost.c 2010-03-22 12:04:38.000000000 -0700 +++ net-next-v4/drivers/vhost/vhost.c 2010-04-19 14:29:55.000000000 -0700 @@ -113,7 +113,8 @@ static void vhost_vq_reset(struct vhost_ vq->used_flags = 0; vq->log_used = false; vq->log_addr = -1ull; - vq->hdr_size = 0; + vq->vhost_hlen = 0; + vq->sock_hlen = 0; vq->private_data = NULL; vq->log_base = NULL; vq->error_ctx = NULL; @@ -856,6 +857,53 @@ static unsigned get_indirect(struct vhos return 0; } +/* This is a multi-buffer version of vhost_get_vq_desc...
2010 Apr 19
2
[PATCH v4] Add mergeable RX bufs support to vhost
...next-v4/drivers/vhost/vhost.c --- net-next-p0/drivers/vhost/vhost.c 2010-03-22 12:04:38.000000000 -0700 +++ net-next-v4/drivers/vhost/vhost.c 2010-04-19 14:29:55.000000000 -0700 @@ -113,7 +113,8 @@ static void vhost_vq_reset(struct vhost_ vq->used_flags = 0; vq->log_used = false; vq->log_addr = -1ull; - vq->hdr_size = 0; + vq->vhost_hlen = 0; + vq->sock_hlen = 0; vq->private_data = NULL; vq->log_base = NULL; vq->error_ctx = NULL; @@ -856,6 +857,53 @@ static unsigned get_indirect(struct vhos return 0; } +/* This is a multi-buffer version of vhost_get_vq_desc...