From: Luiz Capitulino <lcapitulino@redhat.com>
To: "Andreas Färber" <afaerber@suse.de>
Cc: qemu-devel <qemu-devel@nongnu.org>,
qemu-ppc <qemu-ppc@nongnu.org>, Paul Mackerras <paulus@samba.org>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
Alexander Graf <agraf@suse.de>
Subject: Re: [Qemu-devel] [PATCH -V3 3/4] target-ppc: Check for error on address translation in memsave command
Date: Mon, 26 Aug 2013 09:22:42 -0400 [thread overview]
Message-ID: <20130826092242.0b24d7dc@redhat.com> (raw)
In-Reply-To: <521B4881.1040105@suse.de>
On Mon, 26 Aug 2013 14:22:25 +0200
Andreas Färber <afaerber@suse.de> wrote:
> Am 26.08.2013 14:20, schrieb Aneesh Kumar K.V:
> > Andreas Färber <afaerber@suse.de> writes:
> >
> >> Am 25.08.2013 20:32, schrieb Alexander Graf:
> >>>
> >>> On 23.08.2013, at 06:20, Aneesh Kumar K.V wrote:
> >>>
> >>>> From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
> >>>>
> >>>> When we translate the virtual address to physical check for error.
> >>>>
> >>>> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
> >>>
> >>> I think this change is sane, but I'd really prefer to see an ack from (or get this applied by) Luiz.
> >>>
> >>>
> >>> Alex
> >>>
> >>>> ---
> >>>> cpus.c | 5 ++++-
> >>>> 1 file changed, 4 insertions(+), 1 deletion(-)
> >>>>
> >>>> diff --git a/cpus.c b/cpus.c
> >>>> index 0f65e76..658366d 100644
> >>>> --- a/cpus.c
> >>>> +++ b/cpus.c
> >>>> @@ -1309,7 +1309,10 @@ void qmp_memsave(int64_t addr, int64_t size, const char *filename,
> >>>> l = sizeof(buf);
> >>>> if (l > size)
> >>>> l = size;
> >>>> - cpu_memory_rw_debug(cpu, addr, buf, l, 0);
> >>>> + if (cpu_memory_rw_debug(cpu, addr, buf, l, 0) != 0) {
> >>>> + error_set(errp, QERR_INVALID_PARAMETER, "addr");
> >>
> >> I've been repeatedly told error_set() should no longer be used, in favor
> >> of error_setg(). :)
> >>
> >
> > Updated to
> >
> > commit 23aa279e11f54808dd9f0f87b3c85e6303d00d9c
> > Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
> > Date: Tue Aug 20 16:14:23 2013 +0530
> >
> > target-ppc: Check for error on address translation in memsave command
> >
> > When we translate the virtual address to physical check for error.
> >
> > Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
> >
> > diff --git a/cpus.c b/cpus.c
> > index 0f65e76..51c38a0 100644
> > --- a/cpus.c
> > +++ b/cpus.c
> > @@ -1309,7 +1309,10 @@ void qmp_memsave(int64_t addr, int64_t size, const char *filename,
> > l = sizeof(buf);
> > if (l > size)
> > l = size;
> > - cpu_memory_rw_debug(cpu, addr, buf, l, 0);
> > + if (cpu_memory_rw_debug(cpu, addr, buf, l, 0) != 0) {
> > + error_setg(errp, "Invalid addr 0x%016" PRIx64 "specified\n", addr);
>
> Next trap is no \n please. ;)
Otherwise looks good.
next prev parent reply other threads:[~2013-08-26 13:23 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1377235210-27093-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com>
[not found] ` <1377235210-27093-2-git-send-email-aneesh.kumar@linux.vnet.ibm.com>
2013-08-25 18:32 ` [Qemu-devel] [PATCH -V3 1/4] target-ppc: Update slb array with correct index values Alexander Graf
2013-08-26 6:46 ` Aneesh Kumar K.V
2013-08-26 10:31 ` Alexander Graf
2013-08-26 12:16 ` Aneesh Kumar K.V
[not found] ` <1377235210-27093-3-git-send-email-aneesh.kumar@linux.vnet.ibm.com>
2013-08-25 18:32 ` [Qemu-devel] [PATCH -V3 2/4] target-ppc: Fix page table lookup with kvm enabled Alexander Graf
2013-08-25 21:13 ` [Qemu-devel] [Qemu-ppc] " Benjamin Herrenschmidt
2013-08-26 3:33 ` Aneesh Kumar K.V
2013-08-26 3:45 ` Benjamin Herrenschmidt
2013-08-26 5:46 ` [Qemu-devel] " Aneesh Kumar K.V
2013-08-26 11:09 ` Alexander Graf
2013-08-26 12:18 ` Aneesh Kumar K.V
[not found] ` <1377235210-27093-4-git-send-email-aneesh.kumar@linux.vnet.ibm.com>
2013-08-25 18:32 ` [Qemu-devel] [PATCH -V3 3/4] target-ppc: Check for error on address translation in memsave command Alexander Graf
2013-08-25 22:17 ` Andreas Färber
2013-08-26 12:20 ` Aneesh Kumar K.V
2013-08-26 12:22 ` Andreas Färber
2013-08-26 13:22 ` Luiz Capitulino [this message]
[not found] ` <1377235210-27093-5-git-send-email-aneesh.kumar@linux.vnet.ibm.com>
2013-08-25 18:33 ` [Qemu-devel] [PATCH -V3 4/4] target-ppc: Use #define for max slb entries Alexander Graf
2013-08-25 22:20 ` Andreas Färber
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=20130826092242.0b24d7dc@redhat.com \
--to=lcapitulino@redhat.com \
--cc=afaerber@suse.de \
--cc=agraf@suse.de \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=paulus@samba.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@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.