Displaying 20 results from an estimated 357 matches for "cpu_to_le64".
2013 Aug 20
2
[PATCH] VMXNET3: Add support for virtual IOMMU
...rk correctly. Fix that with
pci_alloc_consistent() where possible, or pci_map_single() where the
mapping is short-lived or we don't control the allocation (netdev).
Also fix two small bugs:
1) use after free of rq->buf_info in vmxnet3_rq_destroy()
2) a cpu_to_le32() that should have been a cpu_to_le64()
Acked-by: George Zhang <georgezhang at vmware.com>
Acked-by: Aditya Sarwade <asarwade at vmware.com>
Signed-off-by: Andy King <acking at vmware.com>
---
drivers/net/vmxnet3/vmxnet3_drv.c | 89 ++++++++++++++++++++++++++-----------
drivers/net/vmxnet3/vmxnet3_int.h | 10 +++...
2013 Aug 20
2
[PATCH] VMXNET3: Add support for virtual IOMMU
...rk correctly. Fix that with
pci_alloc_consistent() where possible, or pci_map_single() where the
mapping is short-lived or we don't control the allocation (netdev).
Also fix two small bugs:
1) use after free of rq->buf_info in vmxnet3_rq_destroy()
2) a cpu_to_le32() that should have been a cpu_to_le64()
Acked-by: George Zhang <georgezhang at vmware.com>
Acked-by: Aditya Sarwade <asarwade at vmware.com>
Signed-off-by: Andy King <acking at vmware.com>
---
drivers/net/vmxnet3/vmxnet3_drv.c | 89 ++++++++++++++++++++++++++-----------
drivers/net/vmxnet3/vmxnet3_int.h | 10 +++...
2013 Aug 23
1
[PATCH] VMXNET3: Add support for virtual IOMMU
...where we already did this, but using pci_blah();
these have been fixed to use dma_blah(), along with all new occurrences
where we've replaced kmalloc() and friends.
Also fix two small bugs:
1) use after free of rq->buf_info in vmxnet3_rq_destroy()
2) a cpu_to_le32() that should have been a cpu_to_le64()
Acked-by: George Zhang <georgezhang at vmware.com>
Acked-by: Aditya Sarwade <asarwade at vmware.com>
Signed-off-by: Andy King <acking at vmware.com>
---
drivers/net/vmxnet3/vmxnet3_drv.c | 211 +++++++++++++++++++++++--------------
drivers/net/vmxnet3/vmxnet3_int.h | 10 ++-...
2013 Aug 23
1
[PATCH] VMXNET3: Add support for virtual IOMMU
...where we already did this, but using pci_blah();
these have been fixed to use dma_blah(), along with all new occurrences
where we've replaced kmalloc() and friends.
Also fix two small bugs:
1) use after free of rq->buf_info in vmxnet3_rq_destroy()
2) a cpu_to_le32() that should have been a cpu_to_le64()
Acked-by: George Zhang <georgezhang at vmware.com>
Acked-by: Aditya Sarwade <asarwade at vmware.com>
Signed-off-by: Andy King <acking at vmware.com>
---
drivers/net/vmxnet3/vmxnet3_drv.c | 211 +++++++++++++++++++++++--------------
drivers/net/vmxnet3/vmxnet3_int.h | 10 ++-...
2017 Oct 09
0
[virtio-dev] [RFC] virtio-iommu version 0.4
...50,13 +558,7 @@ static int viommu_map(struct iommu_domain *domain, unsigned long iova,
{
int ret;
struct viommu_domain *vdomain = to_viommu_domain(domain);
- struct virtio_iommu_req_map req = {
- .head.type = VIRTIO_IOMMU_T_MAP,
- .address_space = cpu_to_le32(vdomain->id),
- .virt_addr = cpu_to_le64(iova),
- .phys_addr = cpu_to_le64(paddr),
- .size = cpu_to_le64(size),
- };
+ struct virtio_iommu_req_map *req;
pr_debug("map %llu 0x%lx -> 0x%llx (%zu)\n", vdomain->id, iova,
paddr, size);
@@ -564,17 +566,30 @@ static int viommu_map(struct iommu_domain *domain, unsigned l...
2023 Mar 02
1
[PATCH vhost v1 06/12] virtio_ring: packed: separate DMA codes
...or (sg = sgs[n]; sg; sg = sg_next(sg)) {
- addr = vring_map_one_sg(vq, sg, n < out_sgs ?
- DMA_TO_DEVICE : DMA_FROM_DEVICE);
- if (vring_mapping_error(vq, addr))
- goto unmap_release;
-
desc[i].flags = cpu_to_le16(n < out_sgs ?
0 : VRING_DESC_F_WRITE);
- desc[i].addr = cpu_to_le64(addr);
+ desc[i].addr = cpu_to_le64(sg->dma_address);
desc[i].len = cpu_to_le32(sg->length);
i++;
}
@@ -1380,7 +1375,7 @@ static int virtqueue_add_indirect_packed(struct vring_virtqueue *vq,
total_sg * sizeof(struct vring_packed_desc),
DMA_TO_DEVICE);
if (vring_mapping_...
2017 Jan 17
2
[PATCH v6 kernel 3/5] virtio-balloon: speed up inflate/deflate process
...contain pages, set it to 0 to
/*
* Multi-line
* comments
* should look like this.
*/
Also, pls start sentences with an upper-case letter.
> + * indicate the actual length is in the next __le64;
> + */
This is part of the interface so should be documented as such.
> + *range = cpu_to_le64((base_pfn <<
> + VIRTIO_BALLOON_NR_PFN_BITS) | 0);
> + *(range + 1) = cpu_to_le64(pages);
> + vb->resp_pos += 2;
Pls use structs for this kind of stuff.
> + } else {
> + *range = (base_pfn << VIRTIO_BALLOON_NR_PFN_BITS) | pages;
> + vb->resp_pos++;
>...
2017 Jan 17
2
[PATCH v6 kernel 3/5] virtio-balloon: speed up inflate/deflate process
...contain pages, set it to 0 to
/*
* Multi-line
* comments
* should look like this.
*/
Also, pls start sentences with an upper-case letter.
> + * indicate the actual length is in the next __le64;
> + */
This is part of the interface so should be documented as such.
> + *range = cpu_to_le64((base_pfn <<
> + VIRTIO_BALLOON_NR_PFN_BITS) | 0);
> + *(range + 1) = cpu_to_le64(pages);
> + vb->resp_pos += 2;
Pls use structs for this kind of stuff.
> + } else {
> + *range = (base_pfn << VIRTIO_BALLOON_NR_PFN_BITS) | pages;
> + vb->resp_pos++;
>...
2023 May 15
3
[PATCH v2 0/2] iommu/virtio: Fixes
One fix reported by Akihiko, and another found while going over the
driver.
Jean-Philippe Brucker (2):
iommu/virtio: Detach domain on endpoint release
iommu/virtio: Return size mapped for a detached domain
drivers/iommu/virtio-iommu.c | 57 ++++++++++++++++++++++++++----------
1 file changed, 41 insertions(+), 16 deletions(-)
--
2.40.0
2017 Jan 18
2
[PATCH v6 kernel 3/5] virtio-balloon: speed up inflate/deflate process
...art sentences with an upper-case letter.
> >
>
> Sorry for that.
>
> > > + * indicate the actual length is in the next __le64;
> > > + */
> >
> > This is part of the interface so should be documented as such.
> >
> > > + *range = cpu_to_le64((base_pfn <<
> > > + VIRTIO_BALLOON_NR_PFN_BITS) | 0);
> > > + *(range + 1) = cpu_to_le64(pages);
> > > + vb->resp_pos += 2;
> >
> > Pls use structs for this kind of stuff.
>
> I am not sure if you mean to use
>
> struct range {...
2017 Jan 18
2
[PATCH v6 kernel 3/5] virtio-balloon: speed up inflate/deflate process
...art sentences with an upper-case letter.
> >
>
> Sorry for that.
>
> > > + * indicate the actual length is in the next __le64;
> > > + */
> >
> > This is part of the interface so should be documented as such.
> >
> > > + *range = cpu_to_le64((base_pfn <<
> > > + VIRTIO_BALLOON_NR_PFN_BITS) | 0);
> > > + *(range + 1) = cpu_to_le64(pages);
> > > + vb->resp_pos += 2;
> >
> > Pls use structs for this kind of stuff.
>
> I am not sure if you mean to use
>
> struct range {...
2018 Feb 01
0
[vhost:vhost 11/22] drivers//firmware/qemu_fw_cfg.c:379:23: error: 'VMCOREINFO_NOTE_SIZE' undeclared; did you mean 'MEI_CL_NAME_SIZE'?
...2'
.size = cpu_to_le32(VMCOREINFO_NOTE_SIZE),
^~~~~~~~~~~
>> drivers//firmware/qemu_fw_cfg.c:380:24: error: implicit declaration of function 'paddr_vmcoreinfo_note'; did you mean 'write_vmcoreinfo'? [-Werror=implicit-function-declaration]
.paddr = cpu_to_le64(paddr_vmcoreinfo_note())
^
include/uapi/linux/byteorder/little_endian.h:31:51: note: in definition of macro '__cpu_to_le64'
#define __cpu_to_le64(x) ((__force __le64)(__u64)(x))
^
>> drivers//firmw...
2023 Mar 22
1
[PATCH vhost v4 02/11] virtio_ring: packed: separate dma codes
...gs = cpu_to_le16(vq->packed.avail_used_flags |
(++c == total_sg ? 0 : VRING_DESC_F_NEXT) |
(n < out_sgs ? 0 : VRING_DESC_F_WRITE));
@@ -1496,12 +1493,12 @@ static inline int virtqueue_add_packed(struct virtqueue *_vq,
else
desc[i].flags = flags;
- desc[i].addr = cpu_to_le64(addr);
+ desc[i].addr = cpu_to_le64(vring_sg_address(sg));
desc[i].len = cpu_to_le32(sg->length);
desc[i].id = cpu_to_le16(id);
if (unlikely(vq->use_dma_api)) {
- vq->packed.desc_extra[curr].addr = addr;
+ vq->packed.desc_extra[curr].addr = vring_sg_address(sg);...
2017 Mar 16
4
[PATCH kernel v8 3/4] mm: add inerface to offer info about unused pages
...area[order].free_list[t]) {
> + pfn = page_to_pfn(list_entry(curr, struct page, lru));
> + chunk = buf + *offset;
> + if (*offset + 2 > size) {
> + ret = -ENOSPC;
> + goto out;
> + }
> + /* Align to the chunk format used in virtio-balloon */
> + *chunk = cpu_to_le64(pfn << 12);
> + *(chunk + 1) = cpu_to_le64((1 << order) << 12);
> + *offset += 2;
> + }
> + }
> +
> +out:
> + spin_unlock_irqrestore(&zone->lock, flags);
> +
> + return ret;
> +}
This looks like it could disable interrupts for a long time...
2017 Mar 16
4
[PATCH kernel v8 3/4] mm: add inerface to offer info about unused pages
...area[order].free_list[t]) {
> + pfn = page_to_pfn(list_entry(curr, struct page, lru));
> + chunk = buf + *offset;
> + if (*offset + 2 > size) {
> + ret = -ENOSPC;
> + goto out;
> + }
> + /* Align to the chunk format used in virtio-balloon */
> + *chunk = cpu_to_le64(pfn << 12);
> + *(chunk + 1) = cpu_to_le64((1 << order) << 12);
> + *offset += 2;
> + }
> + }
> +
> +out:
> + spin_unlock_irqrestore(&zone->lock, flags);
> +
> + return ret;
> +}
This looks like it could disable interrupts for a long time...
2020 Sep 08
2
[PATCH] drm/virtio: drop quirks handling
...*nents = shmem->mapped;
*ents = kmalloc_array(*nents, sizeof(struct virtio_gpu_mem_entry),
GFP_KERNEL);
@@ -180,9 +175,7 @@ static int virtio_gpu_object_shmem_init(struct virtio_gpu_device *vgdev,
}
for_each_sg(shmem->pages->sgl, sg, *nents, si) {
- (*ents)[si].addr = cpu_to_le64(use_dma_api
- ? sg_dma_address(sg)
- : sg_phys(sg));
+ (*ents)[si].addr = cpu_to_le64(sg_dma_address(sg));
(*ents)[si].length = cpu_to_le32(sg->length);
(*ents)[si].padding = 0;
}
diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq....
2020 Sep 08
2
[PATCH] drm/virtio: drop quirks handling
...*nents = shmem->mapped;
*ents = kmalloc_array(*nents, sizeof(struct virtio_gpu_mem_entry),
GFP_KERNEL);
@@ -180,9 +175,7 @@ static int virtio_gpu_object_shmem_init(struct virtio_gpu_device *vgdev,
}
for_each_sg(shmem->pages->sgl, sg, *nents, si) {
- (*ents)[si].addr = cpu_to_le64(use_dma_api
- ? sg_dma_address(sg)
- : sg_phys(sg));
+ (*ents)[si].addr = cpu_to_le64(sg_dma_address(sg));
(*ents)[si].length = cpu_to_le32(sg->length);
(*ents)[si].padding = 0;
}
diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq....
2017 Mar 29
2
[PATCH kernel v8 3/4] mm: add inerface to offer info about unused pages
..., struct page, lru));
> > > + chunk = buf + *offset;
> > > + if (*offset + 2 > size) {
> > > + ret = -ENOSPC;
> > > + goto out;
> > > + }
> > > + /* Align to the chunk format used in virtio-balloon */
> > > + *chunk = cpu_to_le64(pfn << 12);
> > > + *(chunk + 1) = cpu_to_le64((1 << order) << 12);
> > > + *offset += 2;
> > > + }
> > > + }
> > > +
> > > +out:
> > > + spin_unlock_irqrestore(&zone->lock, flags);
> > > +
> &g...
2017 Mar 29
2
[PATCH kernel v8 3/4] mm: add inerface to offer info about unused pages
..., struct page, lru));
> > > + chunk = buf + *offset;
> > > + if (*offset + 2 > size) {
> > > + ret = -ENOSPC;
> > > + goto out;
> > > + }
> > > + /* Align to the chunk format used in virtio-balloon */
> > > + *chunk = cpu_to_le64(pfn << 12);
> > > + *(chunk + 1) = cpu_to_le64((1 << order) << 12);
> > > + *offset += 2;
> > > + }
> > > + }
> > > +
> > > +out:
> > > + spin_unlock_irqrestore(&zone->lock, flags);
> > > +
> &g...
2011 Mar 11
1
[PATH 9/12] VTPM mini-os: New stubdom applications
This patch ports 5 new applications to the stubdom makefile structure
for inclusion into stubdom domains. While these are required for
vtpm-stubdom and vtpmmgrdom they could be used with other stubdom
applications.
-libgmp 4.3.2
-openssl 1.0.0a
-polarssl 0.12.1
-berlios tpm_emulator 0.6.1
-vtpm_manager (from the tools directory)
Signed off by: Matthew Fioravante