From: Kevin Wolf <kwolf@redhat.com>
To: Alexander Popov <alex.popov@linux.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>,
Laurent Vivier <lvivier@redhat.com>,
Darren Kenny <darren.kenny@oracle.com>,
sstabellini@kernel.org, pmatouse@redhat.com,
mdroth@linux.vnet.ibm.com, qemu-block@nongnu.org,
"Michael S . Tsirkin" <mst@redhat.com>,
qemu-stable@nongnu.org, qemu-devel@nongnu.org,
Kashyap Chamarthy <kashyap.cv@gmail.com>,
Thomas Huth <thuth@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>, John Snow <jsnow@redhat.com>,
pjp@redhat.com
Subject: Re: [PATCH v3 1/2] ide: Fix incorrect handling of some PRDTs in ide_dma_cb()
Date: Tue, 7 Jan 2020 08:34:42 +0100 [thread overview]
Message-ID: <20200107073442.GD4076@linux.fritz.box> (raw)
In-Reply-To: <20191223175117.508990-2-alex.popov@linux.com>
Am 23.12.2019 um 18:51 hat Alexander Popov geschrieben:
> The commit a718978ed58a from July 2015 introduced the assertion which
> implies that the size of successful DMA transfers handled in ide_dma_cb()
> should be multiple of 512 (the size of a sector). But guest systems can
> initiate DMA transfers that don't fit this requirement.
>
> For fixing that let's check the number of bytes prepared for the transfer
> by the prepare_buf() handler. The code in ide_dma_cb() must behave
> according to the Programming Interface for Bus Master IDE Controller
> (Revision 1.0 5/16/94):
> 1. If PRDs specified a smaller size than the IDE transfer
> size, then the Interrupt and Active bits in the Controller
> status register are not set (Error Condition).
> 2. If the size of the physical memory regions was equal to
> the IDE device transfer size, the Interrupt bit in the
> Controller status register is set to 1, Active bit is set to 0.
> 3. If PRDs specified a larger size than the IDE transfer size,
> the Interrupt and Active bits in the Controller status register
> are both set to 1.
>
> Signed-off-by: Alexander Popov <alex.popov@linux.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
next prev parent reply other threads:[~2020-01-07 7:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-23 17:51 [PATCH v3 0/2] ide: Fix incorrect handling of some PRDTs and add the corresponding unit-test Alexander Popov
2019-12-23 17:51 ` [PATCH v3 1/2] ide: Fix incorrect handling of some PRDTs in ide_dma_cb() Alexander Popov
2020-01-07 7:34 ` Kevin Wolf [this message]
2019-12-23 17:51 ` [PATCH v3 2/2] tests/ide-test: Create a single unit-test covering more PRDT cases Alexander Popov
2020-01-07 7:44 ` Kevin Wolf
2020-01-07 22:39 ` Alexander Popov
2020-01-08 9:23 ` Kevin Wolf
2019-12-28 12:28 ` [PATCH v3 0/2] ide: Fix incorrect handling of some PRDTs and add the corresponding unit-test Alexander Popov
2020-01-22 11:53 ` Alexander Popov
2020-01-22 12:23 ` Kevin Wolf
2020-01-22 21:06 ` John Snow
2020-01-22 23:14 ` John Snow
2020-01-23 10:52 ` Alexander Popov
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=20200107073442.GD4076@linux.fritz.box \
--to=kwolf@redhat.com \
--cc=aarcange@redhat.com \
--cc=alex.popov@linux.com \
--cc=darren.kenny@oracle.com \
--cc=jsnow@redhat.com \
--cc=kashyap.cv@gmail.com \
--cc=lvivier@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=pjp@redhat.com \
--cc=pmatouse@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
--cc=sstabellini@kernel.org \
--cc=thuth@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 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).