Cornelia Huck <> writes:
> On Wed, 16 Oct 2013 10:42:45 +1030
> Rusty Russell <> wrote:
>
>> Cornelia Huck <> writes:
>> > On Tue, 15 Oct 2013 12:53:00 +1030
>> > Rusty Russell <> wrote:
>> Yes, but for virtio-pci, it's part of the ABI. You specify it in
>> struct vq_info_block, so drivers using this value are suspicious, at
>> least?
>
> I had wanted to keep alignment open, but the new interface will rely on
> fixed alignments anyway.
I'm confused.
To be clear, I was talking about the legacy contiguous layout, which
implies an alignment amount between the available ring and the used
ring. For virtio-pci (and lguest and kvm_virtio for that matter), it
was fixed at 4096. For mmio it was set by the driver; I thought CCW was
the same:
Afterwards, CCW_CMD_SET_VQ is issued by the guest to inform the
host about the location used for its queue. The transmitted
structure is
struct vq_info_block {
__u64 queue;
__u32 align;
__u16 index;
__u16 num;
} __attribute__ ((packed));
queue contains the guest address for queue index. The actual
number of allocated buffers is transmitted in num and their
alignment in align.
It says nothing about align being 4096? This I was surprised to find
that value exposed in uapi in Linux:
linux/arch/s390/include/uapi/asm/virtio-ccw.h:
/* Alignment of vring buffers. */
#define KVM_VIRTIO_CCW_RING_ALIGN 4096
Cheers,
Rusty.