qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: Mike Maslenkin <mike.maslenkin@gmail.com>
Cc: John Snow <jsnow@redhat.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	"open list:Network Block Dev..." <qemu-block@nongnu.org>,
	Thomas Lamprecht <t.lamprecht@proxmox.com>,
	Aaron Lauterer <a.lauterer@proxmox.com>,
	simon.rowe@nutanix.com
Subject: Re: Lost partition tables on ide-hd + ahci drive
Date: Wed, 23 Aug 2023 11:17:41 +0200	[thread overview]
Message-ID: <fb142bbf-d1d4-2a7f-3a4c-b5c59059dc19@proxmox.com> (raw)
In-Reply-To: <1f581666-cfe0-cb7e-bbb5-6097e03c76e2@proxmox.com>

Am 23.08.23 um 10:47 schrieb Fiona Ebner:
> Am 17.02.23 um 22:22 schrieb Mike Maslenkin:
>> I can not tell anything about dma-reentracy issues, but yes, i would
>> start to look at check_cmd() function call sequence.
>> The most interesting is why Sector Count = 1. I thought about race
>> with IDE reset where registers initialized with
>> value SATA_SIGNATURE_DISK = 0x00000101, but this means LBA=1 as well...
>>
> 
> You got it! Since we got another report (after half a year of nothing)
> and also because of Simon's mail, I gave it another shot too and was
> finally able to reproduce the issue (with our patched QEMU 8.0, but
> patches shouldn't affect IDE code). See below for the traces that
> confirm your theory. The reason the write goes to sector 0 and not 1 is
> because ide_dma_cb() uses sector_num = ide_get_sector(s); and that will
> evaluate to 0 after a reset.
> 
> So the issue is indeed that ide_dma_cb can get called with an IDEState
> just after that state was reset. Can we somehow wait for pending
> requests before proceeding with the reset, or can we force an error
> return for callbacks that are still pending during reset?
> 

I noticed that ide_bus_reset() does the reset first and then cancels the
aiocb. Maybe it's already enough to switch those around?

Best Regards,
Fiona



  reply	other threads:[~2023-08-23  9:18 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-02 12:08 Lost partition tables on ide-hd + ahci drive Fiona Ebner
2023-02-14 18:21 ` John Snow
2023-02-15 10:53   ` Fiona Ebner
2023-02-15 21:47     ` John Snow
2023-02-16  8:58       ` Fiona Ebner
2023-02-16 14:17     ` Mike Maslenkin
2023-02-16 15:25       ` Fiona Ebner
2023-02-16 16:15         ` Mike Maslenkin
2023-02-17 12:25           ` Fiona Ebner
2023-02-17 13:40       ` Fiona Ebner
2023-02-17 21:22         ` Mike Maslenkin
2023-08-23  8:47           ` Fiona Ebner
2023-08-23  9:17             ` Fiona Ebner [this message]
2023-08-26 18:07               ` Mike Maslenkin
2023-02-17  9:44     ` Aaron Lauterer
2023-06-14 14:48 ` Simon J. Rowe
2023-06-15  7:04   ` Fiona Ebner
2023-06-15  8:24     ` Simon Rowe
2023-07-27 13:22   ` Simon Rowe

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=fb142bbf-d1d4-2a7f-3a4c-b5c59059dc19@proxmox.com \
    --to=f.ebner@proxmox.com \
    --cc=a.lauterer@proxmox.com \
    --cc=jsnow@redhat.com \
    --cc=mike.maslenkin@gmail.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=simon.rowe@nutanix.com \
    --cc=t.lamprecht@proxmox.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).