All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Snow <jsnow@redhat.com>
To: qemu-devel@nongnu.org
Cc: "kwolf >> Kevin Wolf" <kwolf@redhat.com>,
	"pbonzini >> Paolo Bonzini" <pbonzini@redhat.com>,
	"armbru >> Markus Armbruster" <armbru@redhat.com>,
	stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [block PATCH v2 0/3] AHCI device fixes
Date: Mon, 03 Nov 2014 14:51:45 -0500	[thread overview]
Message-ID: <5457DCD1.7050204@redhat.com> (raw)
In-Reply-To: <5457768C.6060400@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1705 bytes --]



On 11/03/2014 07:35 AM, Paolo Bonzini wrote:
> On 31/10/2014 21:03, John Snow wrote:
>> - Adjust the prepare_buf() callback to return, simply, the number
>>    of bytes it was able to prepare, or -1 on error. This resolves
>>    an ambiguity around the nature of its return code meaning
>>    "no sectors" or "no bytes" which led to bad error pathways.
>
> Much nicer!  Sounds obvious, but hindsight is 20/20...
>
>> John Snow (3):
>>    ide: repair PIO transfers for cases where nsector > 1
>>    ahci: unify sglist preparation
>>    ide: Correct handling of malformed/short PRDTs
>>
>>   hw/ide/ahci.c     | 33 ++++++++++++++++++++++++++-------
>>   hw/ide/core.c     | 14 ++++++++++++--
>>   hw/ide/internal.h | 13 +++++++------
>>   hw/ide/macio.c    |  7 ++++++-
>>   hw/ide/pci.c      | 27 +++++++++++++++++++++------
>>   5 files changed, 72 insertions(+), 22 deletions(-)
>>
>
> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
>
> Paolo
>

There is a trivial fix to be made in hw/ide/ahci.c:

diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
index 27f078d..f49be9f 100644
--- a/hw/ide/ahci.c
+++ b/hw/ide/ahci.c
@@ -791,7 +791,7 @@ static int ahci_populate_sglist(AHCIDevice *ad, 
QEMUSGList *sglist,
          }
          if ((off_idx == -1) || (off_pos < 0) || (off_pos > 
tbl_entry_size)) {
              DPRINTF(ad->port_no, "%s: Incorrect offset! "
-                            "off_idx: %d, off_pos: %d\n",
+                            "off_idx: %d, off_pos: %"PRId64"\n",
                              __func__, off_idx, off_pos);
              r = -1;
              goto out;

Missed this one because it's under a debugging #ifdef. I will fix it 
myself if a v3 is warranted otherwise.

--js

[-- Attachment #2: trivial.diff --]
[-- Type: text/x-patch, Size: 577 bytes --]

diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
index 27f078d..f49be9f 100644
--- a/hw/ide/ahci.c
+++ b/hw/ide/ahci.c
@@ -791,7 +791,7 @@ static int ahci_populate_sglist(AHCIDevice *ad, QEMUSGList *sglist,
         }
         if ((off_idx == -1) || (off_pos < 0) || (off_pos > tbl_entry_size)) {
             DPRINTF(ad->port_no, "%s: Incorrect offset! "
-                            "off_idx: %d, off_pos: %d\n",
+                            "off_idx: %d, off_pos: %"PRId64"\n",
                             __func__, off_idx, off_pos);
             r = -1;
             goto out;

  reply	other threads:[~2014-11-03 19:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-31 20:03 [Qemu-devel] [block PATCH v2 0/3] AHCI device fixes John Snow
2014-10-31 20:03 ` [Qemu-devel] [block PATCH v2 1/3] ide: repair PIO transfers for cases where nsector > 1 John Snow
2014-10-31 20:03 ` [Qemu-devel] [block PATCH v2 2/3] ahci: unify sglist preparation John Snow
2014-10-31 20:03 ` [Qemu-devel] [block PATCH v2 3/3] ide: Correct handling of malformed/short PRDTs John Snow
2014-11-03 12:35 ` [Qemu-devel] [block PATCH v2 0/3] AHCI device fixes Paolo Bonzini
2014-11-03 19:51   ` John Snow [this message]
2014-11-13 10:04 ` Stefan Hajnoczi

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=5457DCD1.7050204@redhat.com \
    --to=jsnow@redhat.com \
    --cc=armbru@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /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.