From: Linhaifeng <haifeng.lin@huawei.com>
To: "Michael S. Tsirkin" <mst@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] vhost-user: fix mmap offset calculation
Date: Mon, 3 Nov 2014 09:28:30 +0800 [thread overview]
Message-ID: <5456DA3E.9030802@huawei.com> (raw)
In-Reply-To: <1414951296-8031-1-git-send-email-mst@redhat.com>
good job!passed test bigger than 3.5G VM.
On 2014/11/3 2:01, Michael S. Tsirkin wrote:
> qemu_get_ram_block_host_ptr should get ram_addr_t,
> vhost-user passes in GPA.
> That's very wrong.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
> hw/virtio/vhost-user.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
> index 4e88d9c..aefe0bb 100644
> --- a/hw/virtio/vhost-user.c
> +++ b/hw/virtio/vhost-user.c
> @@ -226,7 +226,7 @@ static int vhost_user_call(struct vhost_dev *dev, unsigned long int request,
> msg.memory.regions[fd_num].memory_size = reg->memory_size;
> msg.memory.regions[fd_num].guest_phys_addr = reg->guest_phys_addr;
> msg.memory.regions[fd_num].mmap_offset = reg->userspace_addr -
> - (uintptr_t) qemu_get_ram_block_host_ptr(reg->guest_phys_addr);
> + (uintptr_t) qemu_get_ram_block_host_ptr(ram_addr);
> assert(fd_num < VHOST_MEMORY_MAX_NREGIONS);
> fds[fd_num++] = fd;
> }
>
--
Regards,
Haifeng
prev parent reply other threads:[~2014-11-03 1:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-02 18:01 [Qemu-devel] [PATCH] vhost-user: fix mmap offset calculation Michael S. Tsirkin
2014-11-02 20:24 ` Nikolay Nikolaev
2014-11-03 1:28 ` Linhaifeng [this message]
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=5456DA3E.9030802@huawei.com \
--to=haifeng.lin@huawei.com \
--cc=mst@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).