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-changelog] [xen-4.1-testing] x86/hvm: Crash domain rather than gues

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-4.1-testing] x86/hvm: Crash domain rather than guest on unexpected PIO IO state
From: Xen patchbot-4.1-testing <patchbot@xxxxxxx>
Date: Thu, 16 Jun 2011 23:55:11 +0100
Delivery-date: Thu, 16 Jun 2011 15:55:43 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User George Dunlap <george.dunlap@xxxxxxxxxxxxx>
# Date 1308167120 -3600
# Node ID 1980763433607fb28e5857850954b3d05e71d899
# Parent  d105e0a98b586583b17648026037a016bcf70912
x86/hvm: Crash domain rather than guest on unexpected PIO IO state

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>
xen-unstable changeset:   23538:35b4220c98bc
xen-unstable date:        Wed Jun 15 16:05:14 2011 +0100

diff -r d105e0a98b58 -r 198076343360 xen/arch/x86/hvm/io.c
--- a/xen/arch/x86/hvm/io.c     Wed Jun 15 20:44:44 2011 +0100
+++ b/xen/arch/x86/hvm/io.c     Wed Jun 15 20:45:20 2011 +0100
@@ -239,7 +239,9 @@
         curr->arch.hvm_vcpu.io_state = HVMIO_handle_pio_awaiting_completion;
-        BUG();
+        gdprintk(XENLOG_ERR, "Weird HVM ioemulation status %d.\n", rc);
+        domain_crash(curr->domain);
+        break;
     return 1;

Xen-changelog mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-4.1-testing] x86/hvm: Crash domain rather than guest on unexpected PIO IO state, Xen patchbot-4 . 1-testing <=