similar to: [PATCH][VIRTIO] Fix vring_init() ring computations

Displaying 20 results from an estimated 10000 matches similar to: "[PATCH][VIRTIO] Fix vring_init() ring computations"

2007 Nov 14
1
[PATCH] Remove pagesize parameter from vring_init/vring_size
The PAGE_SIZE constant should be used instead of taking an extra parameter. Moreover, once we use PAGE_SIZE, we can use PAGE_ALIGN() instead of having it open coded. I've only compile tested the lguest launcher as I'm on a 64-bit system but I've tested the virtio-pci device with KVM. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> diff --git
2007 Nov 14
1
[PATCH] Remove pagesize parameter from vring_init/vring_size
The PAGE_SIZE constant should be used instead of taking an extra parameter. Moreover, once we use PAGE_SIZE, we can use PAGE_ALIGN() instead of having it open coded. I've only compile tested the lguest launcher as I'm on a 64-bit system but I've tested the virtio-pci device with KVM. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> diff --git
2007 Nov 15
0
[PATCH] Fix vring_init/vring_size to take unsigned long
Using unsigned int resulted in silent truncation of the upper 32-bit on x86_64 resulting in an OOPS since the ring was being initialized wrong. Please reconsider my previous patch to just use PAGE_ALIGN(). Open coding this sort of stuff, no matter how simple it seems, is just asking for this sort of trouble. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> diff --git
2007 Nov 15
0
[PATCH] Fix vring_init/vring_size to take unsigned long
Using unsigned int resulted in silent truncation of the upper 32-bit on x86_64 resulting in an OOPS since the ring was being initialized wrong. Please reconsider my previous patch to just use PAGE_ALIGN(). Open coding this sort of stuff, no matter how simple it seems, is just asking for this sort of trouble. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> diff --git
2019 Sep 03
0
[PATCH] virtio: Change typecasts in vring_init()
On Mon, Sep 02, 2019 at 09:56:42AM +0000, Matej Genci wrote: > On 8/31/2019 6:43 PM, Michael S. Tsirkin wrote: > > On Fri, Aug 30, 2019 at 05:58:23PM +0000, Matej Genci wrote: > >> On 8/30/2019 3:02 PM, Michael S. Tsirkin wrote: > >>> On Tue, Aug 27, 2019 at 03:20:57PM +0000, Matej Genci wrote: > >>>> Compilers such as g++ 7.3 complain about assigning
2015 Jul 02
2
[PATCH RESEND] virtio: Fix typecast of pointer in vring_init()
The virtio_ring.h header is used in userspace programs (ie. QEMU), too. Here we can not assume that sizeof(pointer) is the same as sizeof(long), e.g. when compiling for Windows, so the typecast in vring_init() should be done with (uintptr_t) instead of (unsigned long). Signed-off-by: Thomas Huth <thuth at redhat.com> --- include/uapi/linux/virtio_ring.h | 2 +- 1 file changed, 1
2015 Jul 02
2
[PATCH RESEND] virtio: Fix typecast of pointer in vring_init()
The virtio_ring.h header is used in userspace programs (ie. QEMU), too. Here we can not assume that sizeof(pointer) is the same as sizeof(long), e.g. when compiling for Windows, so the typecast in vring_init() should be done with (uintptr_t) instead of (unsigned long). Signed-off-by: Thomas Huth <thuth at redhat.com> --- include/uapi/linux/virtio_ring.h | 2 +- 1 file changed, 1
2018 Sep 07
3
[PATCH net-next v2 2/5] virtio_ring: support creating packed ring
On Wed, Jul 11, 2018 at 10:27:08AM +0800, Tiwei Bie wrote: > This commit introduces the support for creating packed ring. > All split ring specific functions are added _split suffix. > Some necessary stubs for packed ring are also added. > > Signed-off-by: Tiwei Bie <tiwei.bie at intel.com> I'd rather have a patch just renaming split functions, then add all packed stuff
2018 Sep 07
3
[PATCH net-next v2 2/5] virtio_ring: support creating packed ring
On Wed, Jul 11, 2018 at 10:27:08AM +0800, Tiwei Bie wrote: > This commit introduces the support for creating packed ring. > All split ring specific functions are added _split suffix. > Some necessary stubs for packed ring are also added. > > Signed-off-by: Tiwei Bie <tiwei.bie at intel.com> I'd rather have a patch just renaming split functions, then add all packed stuff
2020 Apr 06
2
[PATCH v2 1/2] virtio: stop using legacy struct vring
struct vring (in the uapi directory) and supporting APIs are kept around to avoid breaking old userspace builds. It's not actually part of the UAPI - it was kept in the UAPI header by mistake, and using it in kernel isn't necessary and prevents us from making changes safely. In particular, the APIs actually assume the legacy layout. Add struct vring_s (identical ATM) and supporting legacy
2020 Apr 06
2
[PATCH v2 1/2] virtio: stop using legacy struct vring
struct vring (in the uapi directory) and supporting APIs are kept around to avoid breaking old userspace builds. It's not actually part of the UAPI - it was kept in the UAPI header by mistake, and using it in kernel isn't necessary and prevents us from making changes safely. In particular, the APIs actually assume the legacy layout. Add struct vring_s (identical ATM) and supporting legacy
2020 Apr 06
1
[PATCH v3 1/2] virtio: stop using legacy struct vring in kernel
struct vring (in the uapi directory) and supporting APIs are kept around to solely avoid breaking old userspace builds. It's not actually part of the UAPI - it was kept in the UAPI header by mistake, and using it in kernel isn't necessary and prevents us from making changes safely. In particular, the APIs actually assume the legacy layout. Add an internal kernel-only struct vring, add
2015 Jul 05
0
[PATCH RESEND] virtio: Fix typecast of pointer in vring_init()
On Thu, Jul 02, 2015 at 09:21:22AM +0200, Thomas Huth wrote: > The virtio_ring.h header is used in userspace programs (ie. QEMU), > too. Here we can not assume that sizeof(pointer) is the same as > sizeof(long), e.g. when compiling for Windows, so the typecast in > vring_init() should be done with (uintptr_t) instead of (unsigned long). > > Signed-off-by: Thomas Huth <thuth
2015 May 06
0
[PATCH] virtio: Fix typecast of pointer in vring_init()
The virtio_ring.h header is used in userspace programs (ie. QEMU), too. Here we can not assume that sizeof(pointer) is the same as sizeof(long), e.g. when compiling for Windows, so the typecast in vring_init() should be done with (uintptr_t) instead of (unsigned long). This fixes a compiler warning when compiling QEMU with the mingw32 cross-compiler. Signed-off-by: Thomas Huth <thuth at
2015 May 06
0
[PATCH] virtio: Fix typecast of pointer in vring_init()
The virtio_ring.h header is used in userspace programs (ie. QEMU), too. Here we can not assume that sizeof(pointer) is the same as sizeof(long), e.g. when compiling for Windows, so the typecast in vring_init() should be done with (uintptr_t) instead of (unsigned long). This fixes a compiler warning when compiling QEMU with the mingw32 cross-compiler. Signed-off-by: Thomas Huth <thuth at
2010 May 05
4
[PATCH RFC] virtio: put last seen used index into ring itself
Generally, the Host end of the virtio ring doesn't need to see where Guest is up to in consuming the ring. However, to completely understand what's going on from the outside, this information must be exposed. For example, host can reduce the number of interrupts by detecting that the guest is currently handling previous buffers. Fortunately, we have room to expand: the ring is always a
2010 May 05
4
[PATCH RFC] virtio: put last seen used index into ring itself
Generally, the Host end of the virtio ring doesn't need to see where Guest is up to in consuming the ring. However, to completely understand what's going on from the outside, this information must be exposed. For example, host can reduce the number of interrupts by detecting that the guest is currently handling previous buffers. Fortunately, we have room to expand: the ring is always a
2018 May 22
0
[RFC v5 2/5] virtio_ring: support creating packed ring
This commit introduces the support for creating packed ring. All split ring specific functions are added _split suffix. Some necessary stubs for packed ring are also added. Signed-off-by: Tiwei Bie <tiwei.bie at intel.com> --- drivers/virtio/virtio_ring.c | 801 +++++++++++++++++++++++------------ include/linux/virtio_ring.h | 8 +- 2 files changed, 546 insertions(+), 263 deletions(-)
2018 Jul 11
0
[PATCH net-next v2 2/5] virtio_ring: support creating packed ring
This commit introduces the support for creating packed ring. All split ring specific functions are added _split suffix. Some necessary stubs for packed ring are also added. Signed-off-by: Tiwei Bie <tiwei.bie at intel.com> --- drivers/virtio/virtio_ring.c | 801 +++++++++++++++++++++++------------ include/linux/virtio_ring.h | 8 +- 2 files changed, 546 insertions(+), 263 deletions(-)
2014 Nov 27
0
[PATCH v5 07/45] virtio: memory access APIs
virtio 1.0 makes all memory structures LE, so we need APIs to conditionally do a byteswap on BE architectures. To make it easier to check code statically, add virtio specific types for multi-byte integers in memory. Add low level wrappers that do a byteswap conditionally, these will be useful e.g. for vhost. Add high level wrappers that query device endian-ness and act accordingly.