From: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
To: Aurelien Jarno <aurelien@aurel32.net>
Cc: peter.maydell@linaro.org, John Snow <jsnow@redhat.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PULL 18/19] macio: move unaligned DMA write code into separate pmac_dma_write() function
Date: Sat, 01 Aug 2015 12:21:49 +0100 [thread overview]
Message-ID: <55BCABCD.8010308@ilande.co.uk> (raw)
In-Reply-To: <20150728180200.GC22010@aurel32.net>
On 28/07/15 19:02, Aurelien Jarno wrote:
>> Thanks for the heads-up. I have a fairly comprehensive suite of various
>> OS test images I use for OpenBIOS testing and evidently not a single one
>> of them issues a TRIM command as I don't see any regressions here. Can
>> you point me towards the particular test image you are using?
>
> You need a Linux based image, with a relatively recent kernel (3.2 is
> ok). The disk image has to be created with -drive file=...,discard=unmap
> for the TRIM feature to be advertised in the guest. Finally you need to
> run the command "fstrim /" or mount a partition or the swap with the
> option discard.
>
> As a summary:
> - wget https://people.debian.org/~aurel32/qemu/powerpc/debian_wheezy_powerpc_standard.qcow2
> - qemu-system-ppc -snapshot -drive file=debian_wheezy_powerpc_standard.qcow2,discard=unmap
> - in the image, login as root (password root) and run fstrim /.
>
> I have looked a bit at the code, and it looks like we have to provide a
> function similar to pmac_dma_read/write for the TRIM. I'll look at it a
> bit more in details and I will try to provide a patch, but it's probably
> won't be before the week-end.
I should add that regardless of whether the TRIM patch is applied or
not, the wheezy image reports DMA timeout errors which I don't see in
the squeeze or lenny images:
[ 5.420949] ata2.00: configured for MWDMA2
[ 5.451070] rtc-generic rtc-generic: setting system clock to
2015-08-01 11:13:25 UTC (1438427605)
[ 5.461100] Initializing network drop monitor service
[ 5.480460] scsi 1:0:0:0: CD-ROM QEMU QEMU DVD-ROM
2.3. PQ: 0 ANSI: 5
[ 5.540013] Freeing unused kernel memory: 244k freed
[ 6.677779] udevd[46]: starting version 175
[ 8.548044] ne2k-pci.c:v1.03 9/22/2003 D. Becker/P. Gortmaker
[ 8.761179] eth0: RealTek RTL-8029 found at 0x400, IRQ 23,
52:54:00:12:34:56.
[ 10.300003] sd 0:0:0:0: [sda] 52428800 512-byte logical blocks: (26.8
GB/25.0 GiB)
[ 10.359219] pata-macio 0.00021000:ata-4: timeout flushing DMA
[ 10.400935] ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
[ 10.412768] ata2.00: BMDMA stat 0x6
[ 10.421732] sr 1:0:0:0: CDB: Mode Sense(10): 5a 00 2a 00 00 00 00 00
80 00
[ 10.430301] ata2.00: cmd a0/01:00:00:80:00/00:00:00:00:00/a0 tag 0
dma 16512 in
[ 10.430334] res 50/00:03:00:80:00/00:00:00:00:00/a0 Emask
0x20 (host bus error)
[ 10.459348] ata2.00: status: { DRDY }
[ 10.516892] sd 0:0:0:0: [sda] Write Protect is off
[ 10.524614] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[ 10.545353] sd 0:0:0:0: [sda] Write cache: enabled, read cache:
enabled, doesn't support DPO or FUA
[ 10.655885] ata2.00: configured for MWDMA2
[ 10.665041] ata2: EH complete
and:
[ 14.016326] PM: Hibernation image partition 8:4 present
[ 14.016380] PM: Looking for hibernation image.
[ 14.020555] PM: Image not found (code -22)
[ 14.020642] PM: Hibernation image not present or could not be loaded.
[ 14.513667] EXT4-fs (sda3): mounted filesystem with ordered data
mode. Opts: (null)
[ 24.750778] udevd[252]: starting version 175
[ 31.040517] pata-macio 0.00021000:ata-4: timeout flushing DMA
[ 31.528077] ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
[ 31.546115] ata2.00: BMDMA stat 0x6
[ 31.562905] sr 1:0:0:0: [sr0] CDB: Get configuration: 46 00 00 00 00
00 00 00 10 00
[ 31.572557] ata2.00: cmd a0/01:00:00:10:00/00:00:00:00:00/a0 tag 0
dma 16400 in
[ 31.572589] res 50/00:03:00:10:00/00:00:00:00:00/a0 Emask
0x20 (host bus error)
[ 31.597940] ata2.00: status: { DRDY }
[ 32.139342] ata2.00: configured for MWDMA2
[ 32.148769] ata2: EH complete
I'll have a quick look with debugging enabled to see if I can spot
anything obvious.
ATB,
Mark.
next prev parent reply other threads:[~2015-08-01 11:22 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-22 19:59 [Qemu-devel] [PULL 00/19] Ide patches John Snow
2015-05-22 19:59 ` [Qemu-devel] [PULL 01/19] configure: require glib 2.22 John Snow
2015-05-22 19:59 ` [Qemu-devel] [PULL 02/19] glib: remove stale compat functions John Snow
2015-05-22 19:59 ` [Qemu-devel] [PULL 03/19] libqos/ahci: Add halted command helpers John Snow
2015-05-22 19:59 ` [Qemu-devel] [PULL 04/19] libqos/ahci: Fix sector set method John Snow
2015-05-22 19:59 ` [Qemu-devel] [PULL 05/19] libqos: Add migration helpers John Snow
2015-05-22 19:59 ` [Qemu-devel] [PULL 06/19] ich9/ahci: Enable Migration John Snow
2015-05-22 19:59 ` [Qemu-devel] [PULL 07/19] qtest/ahci: Add migration test John Snow
2015-11-05 15:26 ` Peter Maydell
2015-11-05 16:52 ` John Snow
2015-05-22 19:59 ` [Qemu-devel] [PULL 08/19] qtest/ahci: add migrate dma test John Snow
2015-05-22 19:59 ` [Qemu-devel] [PULL 09/19] qtest/ahci: add flush migrate test John Snow
2015-05-22 19:59 ` [Qemu-devel] [PULL 10/19] qtest/ahci: add halted dma test John Snow
2015-05-22 19:59 ` [Qemu-devel] [PULL 11/19] qtest/ahci: add migrate " John Snow
2015-05-22 19:59 ` [Qemu-devel] [PULL 12/19] qtest: allow arbitrarily long sends John Snow
2015-05-22 19:59 ` [Qemu-devel] [PULL 13/19] qtest: Add base64 encoded read/write John Snow
2015-05-22 19:59 ` [Qemu-devel] [PULL 14/19] qtest: add memset to qtest protocol John Snow
2015-05-22 19:59 ` [Qemu-devel] [PULL 15/19] libqos/ahci: Swap memread/write with bufread/write John Snow
2015-05-22 19:59 ` [Qemu-devel] [PULL 16/19] qtest: pre-buffer hex nibs John Snow
2015-05-22 19:59 ` [Qemu-devel] [PULL 17/19] macio: move unaligned DMA read code into separate pmac_dma_read() function John Snow
2015-05-22 19:59 ` [Qemu-devel] [PULL 18/19] macio: move unaligned DMA write code into separate pmac_dma_write() function John Snow
2015-07-27 22:00 ` Aurelien Jarno
2015-07-28 8:52 ` Mark Cave-Ayland
2015-07-28 18:02 ` Aurelien Jarno
2015-08-01 11:21 ` Mark Cave-Ayland [this message]
2015-08-01 12:37 ` Aurelien Jarno
2015-08-01 16:09 ` Mark Cave-Ayland
2015-07-30 10:10 ` Kevin Wolf
2015-07-31 20:37 ` John Snow
2015-08-02 13:02 ` Mark Cave-Ayland
2015-05-22 19:59 ` [Qemu-devel] [PULL 19/19] ahci: do not remap clb/fis unconditionally John Snow
2015-05-26 11:54 ` [Qemu-devel] [PULL 00/19] Ide patches Peter Maydell
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=55BCABCD.8010308@ilande.co.uk \
--to=mark.cave-ayland@ilande.co.uk \
--cc=aurelien@aurel32.net \
--cc=jsnow@redhat.com \
--cc=peter.maydell@linaro.org \
--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).