qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: BALATON Zoltan <balaton@eik.bme.hu>
To: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Cc: Kevin Wolf <kwolf@redhat.com>,
	"qemu-ppc@nongnu.org" <qemu-ppc@nongnu.org>,
	Alexander Graf <agraf@suse.de>,
	qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PULL 075/118] macio: handle non-block ATAPI DMA transfers
Date: Wed, 25 Jun 2014 23:48:54 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LMD.2.02.1406252334500.7519@jedlik.phy.bme.hu> (raw)
In-Reply-To: <53AB2E74.1050802@ilande.co.uk>

On Wed, 25 Jun 2014, Mark Cave-Ayland wrote:
> On 24/06/14 11:53, BALATON Zoltan wrote:
>>> All I can say is that debugging this stuff isn't easy, particularly
>>> with MorphOS which has some rather unusual behaviours. But what we
>>> really need from you now over the next few days is for you to compare
>>> the debug output between the working and non-working cases and figure
>>> out if we can fix this in time for the 2.1 release. You have
>>> everything you need (including my acceptance test of booting both
>>> MorphOS and Darwin ISOs), so time to take a deep breath and begin what
>>> should be a challenging yet ultimately rewarding debugging process :)
>> 
>> I'm still working on finding a solution for the exception problems with
>> OpenBIOS that prevent MorphOS from working and I failed to understand
>> the whole working of macio, DBDMA and the whole block layer so far but I
>> can try to debug it. Can you tell how to reproduce the problem with
>> Darwin? The Darwin images don't seem to work with -M mac99 either before
>> or after the patch so no regressions there.
>
> It's fairly simple to reproduce here:
>
> qemu-system-ppc -M g3beige -cdrom darwinppc-602.iso -boot d
> qemu-system-ppc -M g3beige -cdrom darwinppc-801.iso -boot d
> qemu-system-ppc -M mac99 -cdrom darwinppc-801.iso -boot d
>
> For -M g3beige then darwinppc-602.iso tends to hang just after the "ADB 
> present" line just before it finds the CDROM.
>
> Rather annoyingly it seems to be a lot trickier to reproduce today than it 
> was with my original tests, currently 1 in 8 boots compared to 1 in 3 when I 
> did the OpenBIOS tests. Delays introduced by enabling debugging in 
> pmac_ide_transfer() seem to make it easier to trigger, as does compiling with 
> -O0 -g (slower) and also dropping the kernel FS cache.
>
> Maybe it's an existing timing bug that happens to be exacerbated by the 
> patch? :/

For me darwinppc-602.iso seems to more consistently hang although it did 
boot once but I had no debug logs that time. The diff between a boot with 
the last two patches reverted (your non-block ATAPI patch and Alex's async 
remainder) and HEAD shows this in case it gives a hint to someone:

--- debug-console.log.nopatch
+++ debug-console.log.fail
  ATAPI limit=0x0 packet: bb 00 ff ff 00 00 00 00 00 00 00 00
  ATAPI limit=0xfffe packet: 43 02 00 00 00 00 00 ff fe 80 00 00
  reply: tx_size=48 elem_tx_size=0 index=0
  byte_count_limit=65534
  status=0x58
  reply: tx_size=0 elem_tx_size=0 index=48
  status=0x50
  ATAPI limit=0x30 packet: 43 02 00 00 00 00 00 00 30 80 00 00
  reply: tx_size=48 elem_tx_size=0 index=0
  byte_count_limit=48
  status=0x58
  reply: tx_size=0 elem_tx_size=0 index=48
  status=0x50
  DBDMA: readl 0x0000000000000d04 => 0x00000000
  DBDMA: channel 0x1a reg 0x1
  DBDMA: writel 0x0000000000000d08 <= 0x00000000
  DBDMA: channel 0x1a reg 0x2
  DBDMA: writel 0x0000000000000d0c <= 0x011f8010
  DBDMA: channel 0x1a reg 0x3
  DBDMA: dbdma_cmdptr_load 0x011f8010
  DBDMA: writel 0x0000000000000d00 <= 0x90009000
  DBDMA: channel 0x1a reg 0x0
  DBDMA:     status 0x00009400
  DBDMA: DBDMA_run_bh
  DBDMA: channel_run
-dbdma_cmd 0x7fc7142f0560
+dbdma_cmd 0x7f58257f4b48
      req_count 0x0930
      command 0x2000
-    phy_addr 0x017ca000
+    phy_addr 0x017cb000
      cmd_dep 0x00000000
      res_count 0x0000
      xfer_status 0x0000
  DBDMA: start_input
-DBDMA: addr 0x17ca000 key 0x0
+DBDMA: addr 0x17cb000 key 0x0

-waiting for data (0x3 - 0x930 - 50)
-ATAPI limit=0x930 packet: be 00 00 00 00 00 00 00 01 f8 00 00
-read dma: LBA=0 nb_sectors=1
-
-DBDMA: DBDMA_run_bh
-DBDMA: channel_run
-dbdma_cmd 0x7fc7142f0560
-    req_count 0x0930
-    command 0x2000
-    phy_addr 0x017ca000
-    cmd_dep 0x00000000
-    res_count 0x0000
-    xfer_status 0x0000
-DBDMA: start_input
-DBDMA: addr 0x17ca000 key 0x0
-
-io_buffer_size = 0
-remainder: 0 io->len: 2352 size: 2352
-precopying unaligned 304 bytes to 0x17ca800
-io->len = 0x800
-set remainder to: 0
-sector_num=0 size=2352, cmd_cmd=0
-io_buffer_size = 0x930
-remainder: 0 io->len: 0 size: 0
-end of transfer
-end of DMA
-done DMA
+non-block ATAPI DMA transfer size: 0
+end of non-block ATAPI DMA transfer
  DBDMA: dbdma_end
  DBDMA: conditional_wait
  DBDMA: dbdma_cmdptr_save 0x011f8010
-DBDMA: xfer_status 0x00008400 res_count 0x0000
+DBDMA: xfer_status 0x00008400 res_count 0x0930
  DBDMA: conditional_interrupt
  DBDMA: conditional_branch
  DBDMA: dbdma_cmdptr_load 0x011f8020
  DBDMA: channel_run
-dbdma_cmd 0x7fc7142f0560
+dbdma_cmd 0x7f58257f4b48
      req_count 0x0000
      command 0x6030
      phy_addr 0x00000000
      cmd_dep 0x00000000
      res_count 0x0000
      xfer_status 0x0000
  DBDMA: conditional_wait
  DBDMA: dbdma_cmdptr_save 0x011f8020
  DBDMA: xfer_status 0x00008400 res_count 0x0000
  DBDMA: conditional_interrupt
  DBDMA: conditional_interrupt: raise
  DBDMA: conditional_branch
  DBDMA: dbdma_cmdptr_load 0x011f8030
  DBDMA: DBDMA_run_bh
  DBDMA: channel_run
-dbdma_cmd 0x7fc7142f0560
+dbdma_cmd 0x7f58257f4b48
      req_count 0x0000
      command 0x7000
      phy_addr 0x00000000
      cmd_dep 0x00000000
      res_count 0x0000
      xfer_status 0x0000
-DBDMA: writel 0x0000000000000d00 <= 0xa0002000
-DBDMA: channel 0x1a reg 0x0
-DBDMA:     status 0x00000000
-DBDMA: readl 0x0000000000000d04 => 0x00000000
-DBDMA: channel 0x1a reg 0x1
-DBDMA: readl 0x0000000000000d04 => 0x00000000
-DBDMA: channel 0x1a reg 0x1
-DBDMA: writel 0x0000000000000d08 <= 0x00000000
-DBDMA: channel 0x1a reg 0x2
-DBDMA: writel 0x0000000000000d0c <= 0x011f8010
-DBDMA: channel 0x1a reg 0x3
-DBDMA: dbdma_cmdptr_load 0x011f8010
-DBDMA: writel 0x0000000000000d00 <= 0x90009000
-DBDMA: channel 0x1a reg 0x0
-DBDMA:     status 0x00009400
-DBDMA: DBDMA_run_bh
-DBDMA: channel_run
-dbdma_cmd 0x7fc7142f0560
-    req_count 0x0800
-    command 0x2000
-    phy_addr 0x01526800
-    cmd_dep 0x00000000
-    res_count 0x0000
-    xfer_status 0x0000
-DBDMA: start_input
-DBDMA: addr 0x1526800 key 0x0
-
-waiting for data (0x1 - 0x800 - 58)
-ATAPI limit=0x800 packet: 28 00 00 00 00 00 00 00 01 00 00 00
+ATAPI limit=0x930 packet: be 00 00 00 00 00 00 00 01 f8 00 00
  read dma: LBA=0 nb_sectors=1

  DBDMA: DBDMA_run_bh
-DBDMA: channel_run
-dbdma_cmd 0x7fc7142f0560
-    req_count 0x0800
-    command 0x2000
-    phy_addr 0x01526800
-    cmd_dep 0x00000000
-    res_count 0x0000
-    xfer_status 0x0000
-DBDMA: start_input
-DBDMA: addr 0x1526800 key 0x0
-
-io_buffer_size = 0
-remainder: 0 io->len: 2048 size: 2048
-io->len = 0x800
-set remainder to: 0
-sector_num=0 size=2048, cmd_cmd=0
-io_buffer_size = 0x800
-remainder: 0 io->len: 0 size: 0
-end of transfer
-end of DMA
-done DMA
-DBDMA: dbdma_end
-DBDMA: conditional_wait
-DBDMA: dbdma_cmdptr_save 0x011f8010
-DBDMA: xfer_status 0x00008400 res_count 0x0000
-DBDMA: conditional_interrupt
-DBDMA: conditional_branch

I'm not sure but could it be that it mistakes a transfer to a non-block 
transfer for some reason?

> Notes:
> Darwin 6.02 doesn't support -M mac99 (always hangs) AFAICT.
> Darwin 8.01 works but with -M mac99 IDE detection can take up to 30s or so.

I thought both of these hung but I did not wait 30 seconds.

Regards,
BALATON Zoltan

  reply	other threads:[~2014-06-25 21:49 UTC|newest]

Thread overview: 94+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-04 12:43 [Qemu-devel] [PULL 00/118] ppc patch queue 2014-06-04 Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 001/118] target-ppc: Fix target_disas Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 002/118] monitor: QEMU Monitor Instruction Disassembly Incorrect for PowerPC LE Mode Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 003/118] Fix typo in eTSEC Ethernet controller Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 004/118] spapr_nvram: Correct max nvram size Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 005/118] target-ppc: extract register length calculation in gdbstub Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 006/118] target-ppc: gdbstub allow byte swapping for reading/writing registers Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 007/118] target-ppc: Create versionless CPU class per family if KVM Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 008/118] target-ppc: Move alias lookup after class lookup Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 009/118] target-ppc: Remove redundant POWER7 declarations Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 010/118] spapr-pci: remove io ports workaround Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 011/118] spapr_pci: Fix number of returned vectors in ibm, change-msi Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 012/118] target-ppc: Eliminate Magic Number MSR Masks Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 013/118] target-ppc: Remove PVR check from migration Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 014/118] mac99: Added FW_CFG_PPC_BUSFREQ to match CLOCKFREQ and TBFREQ already there Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 015/118] libdecnumber: Introduce libdecnumber Code Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 016/118] libdecnumber: Eliminate #include *Symbols.h Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 017/118] libdecnumber: Prepare libdecnumber for QEMU include structure Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 018/118] libdecnumber: Modify dconfig.h to Integrate with QEMU Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 019/118] libdecnumber: Change gstdint.h to stdint.h Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 020/118] libdecnumber: Eliminate redundant declarations Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 021/118] libdecnumber: Eliminate Unused Variable in decSetSubnormal Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 022/118] target-ppc: Enable Building of libdecnumber Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 023/118] libdecnumber: Introduce decNumberFrom[U]Int64 Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 024/118] libdecnumber: Introduce decNumberIntegralToInt64 Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 025/118] libdecnumber: Fix decNumberSetBCD Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 026/118] target-ppc: Define FPR Pointer Type for Helpers Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 027/118] target-ppc: Introduce Generator Macros for DFP Arithmetic Forms Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 028/118] target-ppc: Introduce Decoder Macros for DFP Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 029/118] target-ppc: Introduce DFP Helper Utilities Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 030/118] target-ppc: Introduce DFP Post Processor Utilities Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 031/118] target-ppc: Introduce DFP Add Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 032/118] target-ppc: Introduce DFP Subtract Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 033/118] target-ppc: Introduce DFP Multiply Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 034/118] target-ppc: Introduce DFP Divide Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 035/118] target-ppc: Introduce DFP Compares Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 036/118] target-ppc: Introduce DFP Test Data Class Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 037/118] target-ppc: Introduce DFP Test Data Group Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 038/118] target-ppc: Introduce DFP Test Exponent Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 039/118] target-ppc: Introduce DFP Test Significance Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 040/118] target-ppc: Introduce DFP Quantize Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 041/118] target-ppc: Introduce DFP Reround Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 042/118] target-ppc: Introduce DFP Round to Integer Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 043/118] target-ppc: Introduce DFP Convert to Long/Extended Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 044/118] target-ppc: Introduce Round to DFP Short/Long Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 045/118] target-ppc: Introduce DFP Convert to Fixed Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 046/118] " Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 047/118] target-ppc: Introduce DFP Decode DPD to BCD Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 048/118] target-ppc: Introduce DFP Encode BCD to DPD Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 049/118] target-ppc: Introduce DFP Extract Biased Exponent Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 050/118] target-ppc: Introduce DFP Insert " Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 051/118] target-ppc: Introduce DFP Shift Significand Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 052/118] spapr_pci: fix MSI limit Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 053/118] util: Add S-Box and InvS-Box Arrays to Common AES Utils Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 054/118] util: Add AES ShiftRows and InvShiftRows Tables Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 055/118] util: Add InvMixColumns Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 056/118] target-i386: Use Common ShiftRows and InvShiftRows Tables Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 057/118] target-arm: Use Common Tables in AES Instructions Alexander Graf
2014-06-04 12:43 ` [Qemu-devel] [PULL 058/118] target-ppc: Refactor " Alexander Graf
2014-06-04 12:44 ` [Qemu-devel] [PULL 059/118] KVM: PPC: Don't secretly add 1T segment feature to CPU Alexander Graf
2014-06-04 12:44 ` [Qemu-devel] [PULL 060/118] PPC: e500: some pci related cleanup Alexander Graf
2014-06-04 12:44 ` [Qemu-devel] [PULL 061/118] PPC: e500: implement PCI INTx routing Alexander Graf
2014-06-04 12:44 ` [Qemu-devel] [PULL 062/118] PPC: Fix TCG chunks that don't free their temps Alexander Graf
2014-06-04 12:44 ` [Qemu-devel] [PULL 063/118] PPC: Fail on leaking temporaries Alexander Graf
2014-06-04 12:44 ` [Qemu-devel] [PULL 064/118] PPC: Make all e500 CPUs SVR aware Alexander Graf
2014-06-04 12:44 ` [Qemu-devel] [PULL 065/118] PPC: Add definitions for GIVORs Alexander Graf
2014-06-04 12:44 ` [Qemu-devel] [PULL 066/118] PPC: Fix SPR access control of L1CFG0 Alexander Graf
2014-06-04 12:44 ` [Qemu-devel] [PULL 067/118] PPC: Add L1CFG1 SPR emulation Alexander Graf
2014-06-04 12:44 ` [Qemu-devel] [PULL 068/118] PPC: Properly emulate L1CSR0 and L1CSR1 Alexander Graf
2014-06-04 12:44 ` [Qemu-devel] [PULL 069/118] PPC: Add dcbtls emulation Alexander Graf
2014-06-04 12:44 ` [Qemu-devel] [PULL 070/118] PPC: e500: Expose kernel load address in dt Alexander Graf
2014-06-04 12:44 ` [Qemu-devel] [PULL 071/118] PPC: Add u-boot firmware for e500 Alexander Graf
2014-06-04 12:44 ` [Qemu-devel] [PULL 072/118] PPC: e500: Move to u-boot as firmware Alexander Graf
2014-06-04 12:44 ` [Qemu-devel] [PULL 073/118] spapr: Add support for time base offset migration Alexander Graf
2014-06-04 12:44 ` [Qemu-devel] [PULL 074/118] spapr: Add ibm, chip-id property in device tree Alexander Graf
2014-06-04 12:44 ` [Qemu-devel] [PULL 075/118] macio: handle non-block ATAPI DMA transfers Alexander Graf
2014-06-20 14:29   ` Mark Cave-Ayland
2014-06-20 19:17     ` BALATON Zoltan
2014-06-20 19:27       ` Mark Cave-Ayland
2014-06-21  0:57         ` BALATON Zoltan
2014-06-23 16:31         ` Alexander Graf
2014-06-23 19:26           ` BALATON Zoltan
2014-06-23 22:41             ` Mark Cave-Ayland
2014-06-24 10:35               ` Kevin Wolf
2014-06-24 10:53               ` BALATON Zoltan
2014-06-24 11:02                 ` Alexander Graf
2014-06-24 11:22                   ` Kevin Wolf
2014-06-24 11:27                     ` Alexander Graf
2014-06-24 12:07                       ` Kevin Wolf
2014-06-24 12:10                         ` Alexander Graf
2014-06-25 20:17                 ` Mark Cave-Ayland
2014-06-25 21:48                   ` BALATON Zoltan [this message]
2014-06-23 21:30     ` BALATON Zoltan
2014-06-05 19:10 ` [Qemu-devel] [PULL 00/118] ppc patch queue 2014-06-04 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=alpine.LMD.2.02.1406252334500.7519@jedlik.phy.bme.hu \
    --to=balaton@eik.bme.hu \
    --cc=agraf@suse.de \
    --cc=kwolf@redhat.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --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 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).