From patchwork Fri Sep 23 03:47:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wanpeng Li X-Patchwork-Id: 673779 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3sgK9q2CS5z9t0m for ; Fri, 23 Sep 2016 13:49:33 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=RMq/Vhn2; dkim-atps=neutral Received: from localhost ([::1]:39328 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnHUQ-0005Pe-98 for incoming@patchwork.ozlabs.org; Thu, 22 Sep 2016 23:49:30 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53062) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnHTj-00057F-BO for qemu-devel@nongnu.org; Thu, 22 Sep 2016 23:48:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bnHTf-0005zI-97 for qemu-devel@nongnu.org; Thu, 22 Sep 2016 23:48:46 -0400 Received: from mail-pf0-f180.google.com ([209.85.192.180]:35970) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnHTf-0005yr-2d for qemu-devel@nongnu.org; Thu, 22 Sep 2016 23:48:43 -0400 Received: by mail-pf0-f180.google.com with SMTP id q2so37225945pfj.3 for ; Thu, 22 Sep 2016 20:48:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=6a87R201f35AWa1Pk0Io1jvgCJjnwfXZBTY8Qj5DKzU=; b=RMq/Vhn2RzDwJFvd4LTfPrMLPKR++DaKhgr9fm1oRdRUGgyJVMqA5bRsHV+qt0+kDs SGZQ5Ib05fd8U0ZLWD12cTTvjjDKgW9HzMxB/KNbFIPXW1c4ZsQuV6U0e9ophtDXRcP4 n5q4kAACCFKEMsybdP9SROHkbWRzRq08n+Tt9wnW+RQFY16eBPGT85sIEPjNIU45HWVH tyfLN1SK1Bq8XvtHFMJVPPLgo3qwuOOqxv+C/G25KA8KqvCwWSRcgTgjm8rAZTU3BvF+ Qb36IhyfbPclGL2PGAwUuCw6JyOIbjof9RzlxHsAG528Pg31yvOO/pRZFJflXZJ/f4U2 9CSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=6a87R201f35AWa1Pk0Io1jvgCJjnwfXZBTY8Qj5DKzU=; b=iEUAyFhUCKmPiKJEaA2FZ+8fNEq6ixePWY6VVJrKdlNA6zGPqdhEsvLTnjpr198nis HYB3uPIMMaiO0BrKm6NE1GkV/1oU6ETaqXSDOpxrS/4y7zr11Co+Qvjourb+lREaKfe1 SsNrqlWDrAhb5Sl+iVumLzZ4fUuj7dcTaEMCpZQImsHDTnbTIBcr9FQXUQ72wPaoEeUy 5Wn+QYVCW8q7MBGpihiTOpzQPu+p0nMwl8CUdprBmzljAMluY1UNgWuj5djGFJwEpGb9 V2icU+jzgYP8uMeL5HCsyr/wDDPdhpybPQjjkj4czDIuDHpignJ9dCz/eTx5znh7dIwe Io5w== X-Gm-Message-State: AE9vXwMCfevWNe9aNAz7n605fUCZ8CXae8+KEbw5cUP9d4ufLaHRrFCNdwfyQNQoiAfX3Q== X-Received: by 10.98.93.85 with SMTP id r82mr8929311pfb.168.1474602461910; Thu, 22 Sep 2016 20:47:41 -0700 (PDT) Received: from kernel.kingsoft.cn ([114.255.44.132]) by smtp.gmail.com with ESMTPSA id s12sm7132077pfj.73.2016.09.22.20.47.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 22 Sep 2016 20:47:41 -0700 (PDT) From: Wanpeng Li X-Google-Original-From: Wanpeng Li To: kvm@vger.kernel.org, qemu-devel@nongnu.org Date: Fri, 23 Sep 2016 11:47:36 +0800 Message-Id: <1474602456-3232-1-git-send-email-wanpeng.li@hotmail.com> X-Mailer: git-send-email 1.9.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.192.180 Subject: [Qemu-devel] [PATCH] hmp: fix qemu crash due to ioapic state dump w/ split irqchip X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Eduardo Habkost , Wanpeng Li , Richard Henderson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Wanpeng Li The qemu will crash when info ioapic through hmp if irqchip is split. Below message is splat: KVM_GET_IRQCHIP failed: Unknown error -6 This patch fix it by dumping the ioapic state from the qemu emulated ioapic if irqchip is split. Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Signed-off-by: Wanpeng Li Reviewed-by: Peter Xu --- target-i386/monitor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target-i386/monitor.c b/target-i386/monitor.c index fccfe40..bf1e983 100644 --- a/target-i386/monitor.c +++ b/target-i386/monitor.c @@ -504,7 +504,8 @@ void hmp_info_local_apic(Monitor *mon, const QDict *qdict) void hmp_info_io_apic(Monitor *mon, const QDict *qdict) { - if (kvm_irqchip_in_kernel()) { + if (kvm_irqchip_in_kernel() && + !kvm_irqchip_is_split()) { kvm_ioapic_dump_state(mon, qdict); } else { ioapic_dump_state(mon, qdict);