From: Paolo Bonzini <pbonzini@redhat.com>
To: mrhines@linux.vnet.ibm.com
Cc: aliguori@us.ibm.com, mst@redhat.com, qemu-devel@nongnu.org,
owasserm@redhat.com, abali@us.ibm.com, mrhines@us.ibm.com,
gokul@us.ibm.com
Subject: Re: [Qemu-devel] [PATCH 4/8] rdma: implement new QEMUFileOps hooks
Date: Fri, 12 Apr 2013 13:05:08 +0200 [thread overview]
Message-ID: <5167EA64.9080201@redhat.com> (raw)
In-Reply-To: <1365745929-24871-5-git-send-email-mrhines@linux.vnet.ibm.com>
Il 12/04/2013 07:52, mrhines@linux.vnet.ibm.com ha scritto:
>
> +void ram_control_load_hook(QEMUFile *f, uint32_t flags)
> +{
> + int ret = 0;
> +
> + if (f->ops->hook_ram_load) {
> + qemu_fflush(f);
> + ret = f->ops->hook_ram_load(f, f->opaque, flags);
> + if (ret < 0) {
> + qemu_file_set_error(f, ret);
> + }
> + }
Almost my last request.
Here, qemu_fflush is not needed, we're reading.
Also, please fail if there is no hook, that is:
if (f->ops->hook_ram_load) {
ret = f->ops->hook_ram_load(f, f->opaque, flags);
} else {
ret = -EIO;
}
if (ret < 0) {
qemu_file_set_error(f, ret);
}
> +
> + bytes = f->ops->save_page(f, f->opaque, block_offset, offset, size, va);
> +
> + if (bytes > 0) {
> + f->pos += bytes;
> + }
> +
And please add an "else { qemu_file_set_error(f, ret); }" too.
Paolo
next prev parent reply other threads:[~2013-04-12 11:05 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-12 5:52 [Qemu-devel] [PATCH 2/8] rdma: core rdma logic mrhines
2013-04-12 5:52 ` [Qemu-devel] [PATCH 3/8] rdma: new QEMUFileOps hooks mrhines
2013-04-12 11:02 ` Paolo Bonzini
2013-04-12 13:30 ` Michael R. Hines
2013-04-12 5:52 ` [Qemu-devel] [PATCH 4/8] rdma: implement " mrhines
2013-04-12 11:05 ` Paolo Bonzini [this message]
2013-04-12 13:01 ` Michael R. Hines
2013-04-12 5:52 ` [Qemu-devel] [PATCH 5/8] rdma: introduce capability for chunk registration mrhines
2013-04-12 5:52 ` [Qemu-devel] [PATCH 6/8] rdma: send pc.ram mrhines
2013-04-12 5:52 ` [Qemu-devel] [PATCH 7/8] rdma: print out throughput while debugging mrhines
2013-04-12 5:52 ` [Qemu-devel] [PATCH 8/8] rdma: add documentation mrhines
2013-04-12 11:10 ` [Qemu-devel] [PATCH 2/8] rdma: core rdma logic Paolo Bonzini
2013-04-12 13:29 ` Michael R. Hines
2013-04-12 13:41 ` Paolo Bonzini
2013-04-12 13:49 ` Michael R. Hines
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=5167EA64.9080201@redhat.com \
--to=pbonzini@redhat.com \
--cc=abali@us.ibm.com \
--cc=aliguori@us.ibm.com \
--cc=gokul@us.ibm.com \
--cc=mrhines@linux.vnet.ibm.com \
--cc=mrhines@us.ibm.com \
--cc=mst@redhat.com \
--cc=owasserm@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.