From nobody Sun Apr 28 16:24:46 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1590671321; cv=none; d=zohomail.com; s=zohoarc; b=haXvqhN0LBftnFduBkn1KJR/lznImf8QK9nrrcIrpaYc90TYvnbm0LCyR6q8bUV4uCEYb6kpSKHuL/KVlSNmJgF0PuQ95Rtnhm1Jam8YBy19cGnSxlkURqcZ+6K/1ywXWTcj2DSf5NIrM6sw3zVDGUwd9fmmXE2v5NL+i3elyZY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590671321; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=4cIg1/Wo1TEyDUXOO0ngl0grBqQq7aXFoBD7Yt5Yca0=; b=ExPoAsdan3iMTd3rsCjt5lpKYhng4FsQy2YnBaKNPxXEtZbDJTgWts9U+1IGxJxFQptELpti2SFM5vDTrLEtvGpvwIdGPyW0uMtGljrjuKC5th0FlNCLOjPZVLO9VkoTB03B9plRmoIwoIEvDGL2PCaq7e7c48JrXTNLV+YqK9o= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1590671321644610.7658037969387; Thu, 28 May 2020 06:08:41 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jeIGN-0006cY-Oo; Thu, 28 May 2020 13:07:59 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jeIGN-0006cT-78 for xen-devel@lists.xenproject.org; Thu, 28 May 2020 13:07:59 +0000 Received: from esa4.hc3370-68.iphmx.com (unknown [216.71.155.144]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 3ff13104-a0e4-11ea-8993-bc764e2007e4; Thu, 28 May 2020 13:07:57 +0000 (UTC) X-Inumbo-ID: 3ff13104-a0e4-11ea-8993-bc764e2007e4 Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: 78UCGICbqnbVdGeCbbPd0B2eskBfpEuIjG+gYkPNFGwgfALk1/OeB7ClUBDCN4K5asDzjA3W/v sRuQ6M4Ta9gEkchlqHe93Qf4+Aq/VZVu4Ylwkzrspwj2r7tTa8N1OJ+Ug24Cq8Q/+LXO5zyQff Vpw1Ba8IcnjdM4ZK/wUgAx3LGNvTbEJ9Sh7mC6tQ5GYzyDMqqv9YTLb3JWfA8nA/WEcyRudQRD GdWd2xnaLI8LYG7qlLAUTw53OaAHXrPc2kKzOtfGFt+v5G15I2v52WJPm/E8iVi4q2Rfm6dQyf DzY= X-SBRS: 2.7 X-MesageID: 19392726 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.73,444,1583211600"; d="scan'208";a="19392726" From: Andrew Cooper To: Xen-devel Subject: [PATCH] x86/hvm: Improve error information in handle_pio() Date: Thu, 28 May 2020 14:07:38 +0100 Message-ID: <20200528130738.12816-1-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Wei Liu , Andrew Cooper , =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= , Paul Durrant , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" domain_crash() should always have a message which emitted even in release builds, so something more useful than this is presented. (XEN) domain_crash called from io.c:171 (XEN) domain_crash called from io.c:171 (XEN) domain_crash called from io.c:171 ... Signed-off-by: Andrew Cooper Acked-by: Jan Beulich Reviewed-by: Roger Pau Monn=C3=A9 --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monn=C3=A9 CC: Paul Durrant CC: Marek Marczykowski-G=C3=B3recki Part of a bug reported by Marek. Something else is wonky in the IO emulati= on state, and preventing us from yielding to the scheduler so the domain can progress with being shut down. --- xen/arch/x86/hvm/io.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/hvm/io.c b/xen/arch/x86/hvm/io.c index a5b0a23f06..4e468bfb6b 100644 --- a/xen/arch/x86/hvm/io.c +++ b/xen/arch/x86/hvm/io.c @@ -167,7 +167,9 @@ bool handle_pio(uint16_t port, unsigned int size, int d= ir) break; =20 default: - gdprintk(XENLOG_ERR, "Weird HVM ioemulation status %d.\n", rc); + gprintk(XENLOG_ERR, "Unexpected PIO status %d, port %#x %s 0x%0*lx= \n", + rc, port, dir =3D=3D IOREQ_WRITE ? "write" : "read", + size * 2, data & ((1ul << (size * 8)) - 1)); domain_crash(curr->domain); return false; } --=20 2.11.0