qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: qemu-devel@nongnu.org
Cc: thuth@redhat.com, lvivier@redhat.com, pbonzini@redhat.com,
	srowe@mose.org.uk, mike.maslenkin@gmail.com,
	qemu-block@nongnu.org, t.lamprecht@proxmox.com,
	a.lauterer@proxmox.com,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: Re: [POC 2/2] add test exposing AHCI reset issue
Date: Fri, 25 Aug 2023 12:17:12 +0200	[thread overview]
Message-ID: <dec39419-cecf-ce7f-2b8c-af47575f80f2@proxmox.com> (raw)
In-Reply-To: <20230824133831.617833-2-f.ebner@proxmox.com>

Am 24.08.23 um 15:38 schrieb Fiona Ebner:
> Fails without the previous commit "hw/ide: reset: cancel async DMA
> operation before reseting state".
> 
> I haven't ever written such a test before, but I wanted something to
> expose the problem more easily. It hardcodes the behavior that the
> pending write actually is done during reset, which might not be ideal.
> It could just check that the first sector is still intact instead.
> 
> If I should make this a proper test, I'd be happy about some guidance,
> but not sure if required for such a specific one-off issue. After all,
> a different variation of the bug might have written to some other
> sector not covered by this test.
> 

While trying to turn it into a proper test with Philippe's and Thomas's
suggestions, I wanted to add a comment about the buffer size. So I tried
figuring out what the "magic" value is. At the very beginning, I had
tried 4 KiB, but then the callback wouldn't be pending, so I just picked
512 KiB for my proof-of-concept. It turns out to be racy though, and
with a buffer size of 64 KiB, it is flaky whether or not the callback is
still pending on my system. Should I just pick a large enough buffer
size (maybe 4 MiB) and hope for the best?

Best Regards,
Fiona



  parent reply	other threads:[~2023-08-25 10:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-24 13:38 [PATCH 1/2] hw/ide: reset: cancel async DMA operation before reseting state Fiona Ebner
2023-08-24 13:38 ` [POC 2/2] add test exposing AHCI reset issue Fiona Ebner
2023-08-24 15:09   ` Philippe Mathieu-Daudé
2023-08-24 15:52   ` Thomas Huth
2023-08-25 10:17   ` Fiona Ebner [this message]
2023-09-04  9:26     ` Kevin Wolf
2023-08-24 15:07 ` [PATCH 1/2] hw/ide: reset: cancel async DMA operation before reseting state Philippe Mathieu-Daudé

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=dec39419-cecf-ce7f-2b8c-af47575f80f2@proxmox.com \
    --to=f.ebner@proxmox.com \
    --cc=a.lauterer@proxmox.com \
    --cc=lvivier@redhat.com \
    --cc=mike.maslenkin@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=srowe@mose.org.uk \
    --cc=t.lamprecht@proxmox.com \
    --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).