From: Eric Blake <eblake@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
Alex Williamson <alex.williamson@redhat.com>
Cc: qemu-trivial@nongnu.org,
"libvir-list@redhat.com" <libvir-list@redhat.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH for 2.1] vfio: use correct runstate
Date: Wed, 02 Jul 2014 07:32:23 -0600 [thread overview]
Message-ID: <53B409E7.7080605@redhat.com> (raw)
In-Reply-To: <1081899261.33608246.1403891502613.JavaMail.zimbra@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2439 bytes --]
[adding libvirt]
On 06/27/2014 11:51 AM, Paolo Bonzini wrote:
> ----- Messaggio originale -----
>> Da: "Alex Williamson" <alex.williamson@redhat.com>
>> A: "Paolo Bonzini" <pbonzini@redhat.com>
>> Cc: qemu-devel@nongnu.org, qemu-trivial@nongnu.org
>> Inviato: Venerdì, 27 giugno 2014 18:34:59
>> Oggetto: Re: [PATCH for 2.1] vfio: use correct runstate
>>
>> On Fri, 2014-06-27 at 16:32 +0200, Paolo Bonzini wrote:
>>> io-error is for block device errors; it should always be preceded
>>> by a BLOCK_IO_ERROR event.
>>
>> Where does this requirement come from? I only see a loose association
>> of IO_ERROR to disk in libvirt and none in QEMU.
>
> See the RunState enum in qapi-schema.json:
>
> ##
> # @RunState
> #
> # An enumeration of VM run states.
> #
> # ...
> #
> # @internal-error: An internal error that prevents further guest execution
> # has occurred
> #
> # @io-error: the last IOP has failed and the device is configured to pause
> # on I/O errors
> #
> # @paused: guest has been paused via the 'stop' command
>
> The point of io-error is that management can look at block devices, see if
> any have an error reported, and then resume execution (see documentation of
> rerror=stop and werror=stop/enospc). This is counter to the intentions you
> have in vfio.
>
>>> I think vfio wants to use
>>> RUN_STATE_INTERNAL_ERROR instead.
>>
>> But that seems to put us into an "unknown" paused state in libvirt.
>
> I think paused is incorrect, because (unlike RUN_STATE_IO_ERROR), you cannot
> resume from RUN_STATE_INTERNAL_ERROR except with a reset. QEMU enforces that,
> and this matches the error you are reporting:
>
> error_report("%s(%04x:%02x:%02x.%x) Unrecoverable error detected. "
> "Please collect any data possible and then kill the guest",
> __func__, vdev->host.domain, vdev->host.bus,
> vdev->host.slot, vdev->host.function);
>
> libvirt has a crashed state, I think that's what libvirt should call the
> internal-error runstate. IIRC on Xen you get to crashed when the processor
> raises an error on vmentry, for example.
>
> Libvirt only knows about crashed/unknown, but one could add crashed/internal-error
> too.
Yes, we probably need to teach libvirt about this state.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Eric Blake <eblake@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
Alex Williamson <alex.williamson@redhat.com>
Cc: qemu-trivial@nongnu.org,
"libvir-list@redhat.com" <libvir-list@redhat.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH for 2.1] vfio: use correct runstate
Date: Wed, 02 Jul 2014 07:32:23 -0600 [thread overview]
Message-ID: <53B409E7.7080605@redhat.com> (raw)
In-Reply-To: <1081899261.33608246.1403891502613.JavaMail.zimbra@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2439 bytes --]
[adding libvirt]
On 06/27/2014 11:51 AM, Paolo Bonzini wrote:
> ----- Messaggio originale -----
>> Da: "Alex Williamson" <alex.williamson@redhat.com>
>> A: "Paolo Bonzini" <pbonzini@redhat.com>
>> Cc: qemu-devel@nongnu.org, qemu-trivial@nongnu.org
>> Inviato: Venerdì, 27 giugno 2014 18:34:59
>> Oggetto: Re: [PATCH for 2.1] vfio: use correct runstate
>>
>> On Fri, 2014-06-27 at 16:32 +0200, Paolo Bonzini wrote:
>>> io-error is for block device errors; it should always be preceded
>>> by a BLOCK_IO_ERROR event.
>>
>> Where does this requirement come from? I only see a loose association
>> of IO_ERROR to disk in libvirt and none in QEMU.
>
> See the RunState enum in qapi-schema.json:
>
> ##
> # @RunState
> #
> # An enumeration of VM run states.
> #
> # ...
> #
> # @internal-error: An internal error that prevents further guest execution
> # has occurred
> #
> # @io-error: the last IOP has failed and the device is configured to pause
> # on I/O errors
> #
> # @paused: guest has been paused via the 'stop' command
>
> The point of io-error is that management can look at block devices, see if
> any have an error reported, and then resume execution (see documentation of
> rerror=stop and werror=stop/enospc). This is counter to the intentions you
> have in vfio.
>
>>> I think vfio wants to use
>>> RUN_STATE_INTERNAL_ERROR instead.
>>
>> But that seems to put us into an "unknown" paused state in libvirt.
>
> I think paused is incorrect, because (unlike RUN_STATE_IO_ERROR), you cannot
> resume from RUN_STATE_INTERNAL_ERROR except with a reset. QEMU enforces that,
> and this matches the error you are reporting:
>
> error_report("%s(%04x:%02x:%02x.%x) Unrecoverable error detected. "
> "Please collect any data possible and then kill the guest",
> __func__, vdev->host.domain, vdev->host.bus,
> vdev->host.slot, vdev->host.function);
>
> libvirt has a crashed state, I think that's what libvirt should call the
> internal-error runstate. IIRC on Xen you get to crashed when the processor
> raises an error on vmentry, for example.
>
> Libvirt only knows about crashed/unknown, but one could add crashed/internal-error
> too.
Yes, we probably need to teach libvirt about this state.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2014-07-02 13:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-27 14:32 [Qemu-trivial] [PATCH for 2.1] vfio: use correct runstate Paolo Bonzini
2014-06-27 14:32 ` [Qemu-devel] " Paolo Bonzini
2014-06-27 16:34 ` [Qemu-trivial] " Alex Williamson
2014-06-27 16:34 ` [Qemu-devel] " Alex Williamson
2014-06-27 17:51 ` [Qemu-trivial] " Paolo Bonzini
2014-06-27 17:51 ` [Qemu-devel] " Paolo Bonzini
2014-06-27 18:36 ` [Qemu-trivial] " Alex Williamson
2014-06-27 18:36 ` [Qemu-devel] " Alex Williamson
2014-07-02 13:32 ` Eric Blake [this message]
2014-07-02 13:32 ` Eric Blake
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=53B409E7.7080605@redhat.com \
--to=eblake@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=libvir-list@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.