From nobody Sun Feb 8 14:35:33 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1532377707786377.84972223721934; Mon, 23 Jul 2018 13:28:27 -0700 (PDT) Received: from localhost ([::1]:36379 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhhRN-0001O4-La for importer@patchew.org; Mon, 23 Jul 2018 16:28:21 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40813) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhhIP-0001YU-0E for qemu-devel@nongnu.org; Mon, 23 Jul 2018 16:19:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fhhIN-0002dk-S3 for qemu-devel@nongnu.org; Mon, 23 Jul 2018 16:19:04 -0400 Received: from mail-oi0-x243.google.com ([2607:f8b0:4003:c06::243]:46047) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fhhIN-0002cn-M7; Mon, 23 Jul 2018 16:19:03 -0400 Received: by mail-oi0-x243.google.com with SMTP id q11-v6so3443174oic.12; Mon, 23 Jul 2018 13:19:03 -0700 (PDT) Received: from localhost (76-251-165-188.lightspeed.austtx.sbcglobal.net. [76.251.165.188]) by smtp.gmail.com with ESMTPSA id q18-v6sm1078208oic.18.2018.07.23.13.19.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Jul 2018 13:19:01 -0700 (PDT) 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=ftGOhhcn7ObZzaE7x1ZddM4UpJ/3/o81C6JlJyzLlSo=; b=DszBFcI6i6+VU56TAttxR0GSMDiXF3FU1XptxlcKrzmnnydhDvQHN7YH5kVRnFAl1Y i4pfW1m0E6MMNqH6cUJxh6v3xGQwk293SW944brDmvmXlh8tPQ8EIH1Y/9thXXW0p7l8 FyZ4iV6WBz2ePdVhE+4H33cSrCGXsYZ0uBjaclAesmtfF2nHKMQLQ3kczpZ++vVdx9Sr I6q7aNZc6LR0JUsD0x+p9mWn5t7UJebgJ3jKNGzcPJ8GqgB/x8Ofp0/IZnkxt8AxR0m8 N0o3no90DEivkaGNmu3XoBFYTdPGrtkPwHUaXFuFi8780WSSw3cyI/ksWs0HIWidPHms vKKQ== 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=ftGOhhcn7ObZzaE7x1ZddM4UpJ/3/o81C6JlJyzLlSo=; b=KaR4CwGGBQPGSm3n8ZnzfoJkYzuDWBW9SP5y/UtpNDmtJ4YtHcZ1uBuFn43BosIFD2 BDBopcU7r/UaOqL5BXDIryI+56EcnXdDJtsEfBlvGYFX410F64Gy+7+XjQsL2RcLLEON 4aBawJE8Dg7SsyTOeYCYLEQftmXhzSa8O+KxU/ELsP6W2E+0LptX8ze2vYC0muJZuRCb dkx5y6hZX7h8Aonq+Bq7e4eK6APXJih4EkTlGa7Wie2PxVb8jyxU1LDntbceV2mhxm/C PpRivvg7w3+oIyetBd04S/VyX/BdiySkMuyWco/cxGoydbjVEh7VCx3X4LIjiYMMdHOj gx6g== X-Gm-Message-State: AOUpUlET4onQLJtQq0fDAfAarVAY1OCZSBnmvNHQMyzORCwSjzt2KRy/ 2wIe7D1QEQ9/51KU+AnWrukrc3K6UfM= X-Google-Smtp-Source: AAOMgpcH35cy71ENx3m7/v5Ns/E5dpV8dbwaYn3m7zUgs/soiXei+HZvp5fDsy1cVkwTfEm8FqLVpw== X-Received: by 2002:aca:5282:: with SMTP id g124-v6mr278321oib.241.1532377142547; Mon, 23 Jul 2018 13:19:02 -0700 (PDT) From: Michael Roth To: qemu-devel@nongnu.org Date: Mon, 23 Jul 2018 15:16:28 -0500 Message-Id: <20180723201748.25573-20-mdroth@linux.vnet.ibm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180723201748.25573-1-mdroth@linux.vnet.ibm.com> References: <20180723201748.25573-1-mdroth@linux.vnet.ibm.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c06::243 Subject: [Qemu-devel] [PATCH 19/99] s390x/css: disabled subchannels cannot be status pending 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: Cornelia Huck , qemu-stable@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Cornelia Huck The 3270 code will try to post an attention interrupt when the 3270 emulator (e.g. x3270) attaches. If the guest has not yet enabled the subchannel for the 3270 device, we will present a spurious cc 1 (status pending) when it uses msch on it later on, e.g. when trying to enable the subchannel. To fix this, just don't do anything in css_conditional_io_interrupt() if the subchannel is not enabled. The 3270 code will work fine with that, and the other user of this function (virtio-ccw) never attempts to post an interrupt for a disabled device to begin with. CC: qemu-stable@nongnu.org Reported-by: Thomas Huth Tested-by: Thomas Huth Acked-by: Christian Borntraeger Acked-by: Halil Pasic Reviewed-by: David Hildenbrand Signed-off-by: Cornelia Huck (cherry picked from commit 6e9c893ecd00afd5344c35d0d0ded50eaa0938f6) Signed-off-by: Michael Roth --- hw/s390x/css.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hw/s390x/css.c b/hw/s390x/css.c index 301bf1772f..56c3fa8c89 100644 --- a/hw/s390x/css.c +++ b/hw/s390x/css.c @@ -616,6 +616,14 @@ void css_inject_io_interrupt(SubchDev *sch) =20 void css_conditional_io_interrupt(SubchDev *sch) { + /* + * If the subchannel is not enabled, it is not made status pending + * (see PoP p. 16-17, "Status Control"). + */ + if (!(sch->curr_status.pmcw.flags & PMCW_FLAGS_MASK_ENA)) { + return; + } + /* * If the subchannel is not currently status pending, make it pending * with alert status. --=20 2.17.1