From: Stefan Hajnoczi <stefanha@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, mst@redhat.com
Subject: Re: [Qemu-devel] [PATCH 3/8] virtio: use address_space_map/unmap to access descriptors
Date: Wed, 25 Jan 2017 13:22:52 +0000 [thread overview]
Message-ID: <20170125132252.GD10664@stefanha-x1.localdomain> (raw)
In-Reply-To: <20170124180420.12430-4-pbonzini@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 545 bytes --]
On Tue, Jan 24, 2017 at 07:04:15PM +0100, Paolo Bonzini wrote:
> @@ -689,18 +714,34 @@ void *virtqueue_pop(VirtQueue *vq, size_t sz)
> }
>
> i = head;
> - vring_desc_read(vdev, &desc, desc_pa, i);
> +
> + len = max * sizeof(VRingDesc);
> + vring_desc_ptr = address_space_map(vdev->dma_as, vq->vring.desc, &len, false);
> + if (len < max * sizeof(VRingDesc)) {
> + virtio_error(vdev, "Cannot map descriptor ring");
> + return NULL;
Missing address_space_unmap() if vring_desc_ptr is non-NULL.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
next prev parent reply other threads:[~2017-01-25 13:23 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-24 18:04 [Qemu-devel] [PATCH v2 0/8] virtio: use MemoryRegionCache for descriptors and rings Paolo Bonzini
2017-01-24 18:04 ` [Qemu-devel] [PATCH 1/8] virtio: make virtio_should_notify static Paolo Bonzini
2017-01-24 18:04 ` [Qemu-devel] [PATCH 2/8] virtio: add virtio_*_phys_cached Paolo Bonzini
2017-01-24 18:04 ` [Qemu-devel] [PATCH 3/8] virtio: use address_space_map/unmap to access descriptors Paolo Bonzini
2017-01-25 13:22 ` Stefan Hajnoczi [this message]
2017-01-25 14:04 ` Paolo Bonzini
2017-01-26 17:25 ` Stefan Hajnoczi
2017-01-24 18:04 ` [Qemu-devel] [PATCH 4/8] exec: make address_space_cache_destroy idempotent Paolo Bonzini
2017-01-25 13:23 ` Stefan Hajnoczi
2017-01-24 18:04 ` [Qemu-devel] [PATCH 5/8] virtio: use MemoryRegionCache to access descriptors Paolo Bonzini
2017-01-25 13:24 ` Stefan Hajnoczi
2017-01-24 18:04 ` [Qemu-devel] [PATCH 6/8] virtio: add MemoryListener to cache ring translations Paolo Bonzini
2017-01-25 13:25 ` Stefan Hajnoczi
2017-01-24 18:04 ` [Qemu-devel] [PATCH 7/8] virtio: use VRingMemoryRegionCaches for descriptor ring Paolo Bonzini
2017-01-25 13:26 ` Stefan Hajnoczi
2017-01-24 18:04 ` [Qemu-devel] [PATCH 8/8] virtio: use VRingMemoryRegionCaches for avail and used rings Paolo Bonzini
2017-01-25 13:27 ` Stefan Hajnoczi
2017-01-24 18:26 ` [Qemu-devel] [PATCH v2 0/8] virtio: use MemoryRegionCache for descriptors and rings no-reply
2017-01-24 19:46 ` Michael S. Tsirkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170125132252.GD10664@stefanha-x1.localdomain \
--to=stefanha@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).