qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Markus Armbruster <armbru@redhat.com>, Kevin Wolf <kwolf@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org, mreitz@redhat.com
Subject: Re: [Qemu-devel] [PATCH] cpus: Fix event order on resume of stopped guest
Date: Thu, 3 May 2018 14:47:25 +0200	[thread overview]
Message-ID: <29e37e65-ba08-4464-79cf-2238bc74e9e8@redhat.com> (raw)
In-Reply-To: <87d0ydorv6.fsf@dusky.pond.sub.org>

On 03/05/2018 14:17, Markus Armbruster wrote:
>>> 4. Connect to the QMP socket e.g. like this:
>>>    $ socat UNIX:/your/qmp/socket READLINE,history=$HOME/.qmp_history,prompt='QMP> '
>>>
>>>    Issue QMP command 'qmp_capabilities':
>>>    QMP> { "execute": "qmp_capabilities" }
>>>
>>> 5. Boot the guest.
>>>
>>> 6. In the guest, write to the scratch disk, e.g. like this:
>>>
>>>    # dd if=/dev/zero of=/dev/vdb count=1
>>>
>>>    Do double-check the device specified with of= is actually the
>>>    scratch device!
>>>
>>> 7. Issue QMP command 'cont':
>>>    QMP> { "execute": "cont" }
>>>
>>> After step 6, I get a BLOCK_IO_ERROR event followed by a STOP event.  Good.
>>>
>>> After step 7, I get BLOCK_IO_ERROR, then RESUME, then STOP.  Not so
>>> good; I'd expect RESUME, then BLOCK_IO_ERROR, then STOP.
>> Do you want to rephrase this in the form of a script for qemu-iotests?
>>
>> I suppose the 'dd' line can be replaced by a 'qemu-io' monitor command.
> Uh, can it?  With qemu-io, the write doesn't stop the guest, because it
> bypasses the device model, and thus blk_error_action().  I'm not aware
> of ways to make qemu-iotests write via a device model.  I'm afraid we
> need a full-fledged qtest.  Better ideas?

Yeah, using virtio-blk-test sounds like a good idea.

Paolo

  parent reply	other threads:[~2018-05-03 12:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-23  8:45 [Qemu-devel] [PATCH] cpus: Fix event order on resume of stopped guest Markus Armbruster
2018-04-23 12:13 ` Paolo Bonzini
2018-04-23 13:02 ` Kevin Wolf
2018-04-23 15:47   ` Markus Armbruster
2018-04-23 16:24     ` Kevin Wolf
2018-05-03 12:17   ` Markus Armbruster
2018-05-03 12:26     ` Kevin Wolf
2018-05-03 12:50       ` Markus Armbruster
2018-05-03 12:47     ` Paolo Bonzini [this message]
2018-05-03 14:38       ` Markus Armbruster

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=29e37e65-ba08-4464-79cf-2238bc74e9e8@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=armbru@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.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).