OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

virtio message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [virtio] [OASIS Issue Tracker] Commented: (VIRTIO-27) Allow chaining of indirects


OASIS Issues Tracker <workgroup_mailer@lists.oasis-open.org> writes:
>     [ http://tools.oasis-open.org/issues/browse/VIRTIO-27?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=34618#action_34618 ] 
>
> Michael Tsirkin commented on VIRTIO-27:
> ---------------------------------------
>
> I'm not sure it's really easier to implement.

Well, lguest implements indirect this way, and it keeps it simple:

	max = vq->vring.num;
	desc = vq->vring.desc;
	i = head;

	if (desc[i].flags & VRING_DESC_F_INDIRECT) {
		if (desc[i].len % sizeof(struct vring_desc))
			errx(1, "Invalid size for indirect buffer table");

		max = desc[i].len / sizeof(struct vring_desc);
		desc = check_pointer(desc[i].addr, desc[i].len);
		i = 0;
	}

Cheers,
Rusty.



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]