From patchwork Thu Dec 7 21:30:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corey Minyard X-Patchwork-Id: 121079 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp8887412qgn; Thu, 7 Dec 2017 13:33:23 -0800 (PST) X-Google-Smtp-Source: AGs4zMZVlTyUQxYNWt5kc8Us8//l2/OCuocTeb3h8gUiYZMGm/yJDCDWJT2S924yuLvVaFcE7U8S X-Received: by 10.37.44.149 with SMTP id s143mr5390930ybs.280.1512682403715; Thu, 07 Dec 2017 13:33:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512682403; cv=none; d=google.com; s=arc-20160816; b=0Lnt7zsO/nQhEsZNhe6r5etZ+JX01XeQN04iyrzqoBMeAfeuqx9EbNmH9yrwu1uGov aZftNdPP+pStKWjmvw1vJzYtHrq3kx0O0Sbie/fKOtn8A69FHNMyZZR+GNUra50JqeXR Co0Gd8wt7FHIlewrAKoQSC+p+zZ7CWYoxzRuxNcq4i7pku4U6N3Fn7eMjHziD2r20gqT ypn2W7onWV94cBqgA2csJK841x4iBgXUn+IQ5x2V7/VTBKIPz+7ZvD03IXn9lI1ba1Fl MSLocqcxG16HlwT+E4Mw0E25a+WzKrFdbDXL7KRR2kzeRJPOACWKhE9iZlgNJnS3xvUA FQDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=0F2xaRV+PnCJvXVpI6Att709KDACjJNoF2TNpF2bBMQ=; b=Y+2tcd1UtMKwKJeEmHSD32W0D9pIa+6rIIQfqfY7gtxiht9ORE8REWYisyw3J7axTD 9vhdExkVTSCHy7jASD6C3Rx/WJhZ68duogv60oon3yLhYqkXrKQXgPswOUi8+YvR3mk+ ykoHXh7B/gk537v2ebcgWrZKAAy/+VB3jkSPECIgnaO2pP4u1nuUbNC8CtwC61EKdOOg rJzhnaqeyoREoHLr0/DEQUguOPIo0YddgXXo6OYHcmFLFiAQKeP5yBBZKS0K9bPD2zCD +jqmJ11lHEjxeX2vwHJp1rF80Y1s1iUZdx/Y3qQDUhgp/rZgMcXDLUX1+J3m6DkC+KpA q1AA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=rBynui1B; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id t2si1295751ybf.104.2017.12.07.13.33.23 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 07 Dec 2017 13:33:23 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=rBynui1B; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org Received: from localhost ([::1]:34408 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eN3nG-0006el-Fb for patch@linaro.org; Thu, 07 Dec 2017 16:33:22 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44863) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eN3kR-0005YU-RN for qemu-devel@nongnu.org; Thu, 07 Dec 2017 16:30:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eN3kP-0001vE-4A for qemu-devel@nongnu.org; Thu, 07 Dec 2017 16:30:27 -0500 Received: from mail-pg0-x241.google.com ([2607:f8b0:400e:c05::241]:35133) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eN3kO-0001uS-UL for qemu-devel@nongnu.org; Thu, 07 Dec 2017 16:30:25 -0500 Received: by mail-pg0-x241.google.com with SMTP id q20so5367460pgv.2 for ; Thu, 07 Dec 2017 13:30:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=0F2xaRV+PnCJvXVpI6Att709KDACjJNoF2TNpF2bBMQ=; b=rBynui1BWvAQbmQJGLXMHPfJKT8j+ILZ5vxFAoXOtimJn2nnUfLryVeiILgDsBGFg/ bDcdT3uQHzo0OoVCbPW9cbw6sIX8g4vkv9gv9F/DgD26/jQSgloJ4rYe6mEfy+liNjhb F3hqPKx1vqqkvyEzI72PICv3+9nY2fz9sJ+eMBEFQu+NR2psktPw7rW+6/4Ltqcfb1vS YtTDWxrtOMZXFNsxxHFh0RNLQMaflSuHkNoyLxKZsh+sZwzgndToQjmFKVClFP0m0wL6 bhFWxXKfVFvMJvVLPPchv3KhJZbVt2DDhBqyMEgW0zigIHT8b7wZsSQjvKYgSoMkSomY 9xsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=0F2xaRV+PnCJvXVpI6Att709KDACjJNoF2TNpF2bBMQ=; b=I0rVWIQIYWZEnr1eWkANhY+FGOHSx6Bbdwt5xGWMapKim9waHpc+iq55sY7t5vOhyX H0pLp0OFs7cLUrWyAEecy5Nit1gvvp0Sgt7B65aB8VoCZAkP5ad7k8uKIZBjYqZP93q0 S6giTspsWWAQwvElN/da44Z/MyaoMsRM8m9dAR6pSyoXXg+EuXMUL5PFhR8yOp5uRUs3 UQOyy/GgDP2QbQchRV4HADjodmC4BSj8aP7sqrDzAmY7LtnGjcbzwgd7EJERWov8KtfF l75p77jN5MAeskyxQXaIONO6P1+HrVLaUUq80xAV4Xdrlu+KQGE3uSVxMSN8S8JEmWZ0 2ZMg== X-Gm-Message-State: AKGB3mIYqmyP6Qyf1oDG4quFzLdVXe/kH+R3uXc4I4VRKDrXAYYbcHFT sAWkJHpeVnH/CwmnC028Mjs9psE= X-Received: by 10.84.235.139 with SMTP id p11mr5630340plk.391.1512682223831; Thu, 07 Dec 2017 13:30:23 -0800 (PST) Received: from serve.minyard.net ([47.184.168.85]) by smtp.gmail.com with ESMTPSA id p126sm9195765pga.58.2017.12.07.13.30.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Dec 2017 13:30:22 -0800 (PST) Received: from t430.minyard.net (t430m.minyard.net [192.168.27.3]) by serve.minyard.net (Postfix) with ESMTPA id 36A5E8F4; Thu, 7 Dec 2017 15:30:20 -0600 (CST) Received: by t430.minyard.net (Postfix, from userid 1000) id 753AF300092; Thu, 7 Dec 2017 15:30:18 -0600 (CST) From: minyard@acm.org To: qemu-devel@nongnu.org Date: Thu, 7 Dec 2017 15:30:10 -0600 Message-Id: <1512682213-4354-6-git-send-email-minyard@acm.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512682213-4354-1-git-send-email-minyard@acm.org> References: <1512682213-4354-1-git-send-email-minyard@acm.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::241 Subject: [Qemu-devel] [PATCH 5/8] ipmi: disable IRQ and ATN on an external disconnect 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: Corey Minyard Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Corey Minyard Otherwise there's no way to clear them without an external command, and it could lock the OS in the VM if they were stuck. Signed-off-by: Corey Minyard --- hw/ipmi/ipmi_bmc_extern.c | 5 +++++ 1 file changed, 5 insertions(+) -- 2.7.4 diff --git a/hw/ipmi/ipmi_bmc_extern.c b/hw/ipmi/ipmi_bmc_extern.c index abab3bb..58ade79 100644 --- a/hw/ipmi/ipmi_bmc_extern.c +++ b/hw/ipmi/ipmi_bmc_extern.c @@ -424,6 +424,11 @@ static void chr_event(void *opaque, int event) return; } ibe->connected = false; + /* + * Don't hang the OS trying to handle the ATN bit, other end will + * resend on a reconnect. + */ + k->set_atn(s, 0, 0); if (ibe->waiting_rsp) { ibe->waiting_rsp = false; ibe->inbuf[1] = ibe->outbuf[1] | 0x04;