This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-devel] Re: [PATCH] xen: Crash domain rather than guest on unexpecte

To: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH] xen: Crash domain rather than guest on unexpected PIO IO state
From: George Dunlap <george.dunlap@xxxxxxxxxx>
Date: Tue, 14 Jun 2011 14:56:53 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Keir Fraser <keir@xxxxxxx>
Delivery-date: Tue, 14 Jun 2011 06:56:13 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <f93006ca6d02beb0f688.1308059643@elijah>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <f93006ca6d02beb0f688.1308059643@elijah>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
This is probably a candidate to backport to 4.1.x at some point.

On Tue, 2011-06-14 at 14:54 +0100, George Dunlap wrote:
> Under certain conditions, if an IO gets into an unexpected state,
> hvmemul_do_io can return X86EMUL_UNHANDLEABLE.  Unfortunately,
> handle_pio() does not expect this state, and calls BUG() if it sees it,
> crashing the host.
> Other HVM io-related code crashes the guest in this case.  This patch
> makes handle_pio() do the same.
> The crash was seen when executing crash_guest in dom0 to forcibly crash the
> guest.
> Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
> diff -r 782bc7b2661a -r f93006ca6d02 xen/arch/x86/hvm/io.c
> --- a/xen/arch/x86/hvm/io.c   Fri Jun 10 13:51:39 2011 +0100
> +++ b/xen/arch/x86/hvm/io.c   Tue Jun 14 14:53:27 2011 +0100
> @@ -239,7 +239,9 @@ int handle_pio(uint16_t port, int size, 
>          curr->arch.hvm_vcpu.io_state = HVMIO_handle_pio_awaiting_completion;
>          break;
>      default:
> -        BUG();
> +        gdprintk(XENLOG_ERR, "Weird HVM ioemulation status %d.\n", rc);
> +        domain_crash(curr->domain);
> +        break;
>      }
>      return 1;

Xen-devel mailing list

<Prev in Thread] Current Thread [Next in Thread>