From nobody Sun May 5 01:48:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1593091660; cv=none; d=zohomail.com; s=zohoarc; b=PZQyJLkIWXPiP9lsspcI66AuCgmK7L6c0RrUvwwhow5iAo3FuF1sA6FX5LRmNeQ3b7ylrUwbRIofSP5qV6EV0qWOXkOMWe0KQj/2LnJmzuMcN3X+ma8h/eDYl+6VElCHVCOlqjf6Q39oOu9w0XV21+ahPqFvbBwzq+aS5ajYSCs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593091660; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=q0LqI17gbaolUQ7ni6aJvLUd7fw3qzVVDlcZcGRlLE8=; b=ZigXVf4XZIbL836HBYHQCQ5AkY5mNDVrTvSHfZ7AmkLnZAkqMI/xhNUSTm6Ielvu6sIe7gzkam49Ky46vxIPGpbTCBYgE64vDRQHDJmvhQ5c6DFkckY1NzrBPxkK3ibaZGZFI95+2suelljWuRhQq4qviiuDI95IHFbLgqPXw7Q= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1593091660306413.30611944338807; Thu, 25 Jun 2020 06:27:40 -0700 (PDT) Received: from localhost ([::1]:52882 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1joRul-0001yM-2A for importer@patchew.org; Thu, 25 Jun 2020 09:27:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59804) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1joRrh-0004dh-JE for qemu-devel@nongnu.org; Thu, 25 Jun 2020 09:24:29 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:34004) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1joRrf-0002yS-US for qemu-devel@nongnu.org; Thu, 25 Jun 2020 09:24:29 -0400 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 05PD4NFI043089; Thu, 25 Jun 2020 09:23:31 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 31vts0matk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Jun 2020 09:23:30 -0400 Received: from m0098409.ppops.net (m0098409.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 05PD4dTI045924; Thu, 25 Jun 2020 09:23:30 -0400 Received: from ppma02wdc.us.ibm.com (aa.5b.37a9.ip4.static.sl-reverse.com [169.55.91.170]) by mx0a-001b2d01.pphosted.com with ESMTP id 31vts0masm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Jun 2020 09:23:30 -0400 Received: from pps.filterd (ppma02wdc.us.ibm.com [127.0.0.1]) by ppma02wdc.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 05PDKXkv015863; Thu, 25 Jun 2020 13:23:29 GMT Received: from b03cxnp07029.gho.boulder.ibm.com (b03cxnp07029.gho.boulder.ibm.com [9.17.130.16]) by ppma02wdc.us.ibm.com with ESMTP id 31uus3v65u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Jun 2020 13:23:29 +0000 Received: from b03ledav001.gho.boulder.ibm.com (b03ledav001.gho.boulder.ibm.com [9.17.130.232]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 05PDNSrq61669704 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 25 Jun 2020 13:23:28 GMT Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 587686E050; Thu, 25 Jun 2020 13:23:28 +0000 (GMT) Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C92206E04C; Thu, 25 Jun 2020 13:23:27 +0000 (GMT) Received: from sbct-3.pok.ibm.com (unknown [9.47.158.153]) by b03ledav001.gho.boulder.ibm.com (Postfix) with ESMTP; Thu, 25 Jun 2020 13:23:27 +0000 (GMT) From: Stefan Berger To: qemu-devel@nongnu.org Subject: [PULL v1 1/8] tpm_tis: Allow lowering of IRQ also when locality is not active Date: Thu, 25 Jun 2020 09:23:18 -0400 Message-Id: <20200625132325.2025245-2-stefanb@linux.vnet.ibm.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200625132325.2025245-1-stefanb@linux.vnet.ibm.com> References: <20200625132325.2025245-1-stefanb@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216, 18.0.687 definitions=2020-06-25_08:2020-06-25, 2020-06-25 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 cotscore=-2147483648 adultscore=0 mlxscore=0 malwarescore=0 clxscore=1015 phishscore=0 suspectscore=1 spamscore=0 impostorscore=0 priorityscore=1501 mlxlogscore=838 lowpriorityscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006250083 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=148.163.156.1; envelope-from=stefanb@linux.vnet.ibm.com; helo=mx0a-001b2d01.pphosted.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/25 09:23:31 X-ACL-Warn: Detected OS = Linux 3.x [generic] [fuzzy] X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Eric Auger , Stefan Berger Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" From: Stefan Berger This patch fixes a bug that occurs when using interrupts. It allows to lower the IRQ also when a locality is not active. Signed-off-by: Stefan Berger Reviewed-by: Eric Auger Reviewed-by: Marc-Andr=C3=A9 Lureau Tested-by: Eric Auger Message-id: 20200617142305.1198672-2-stefanb@linux.vnet.ibm.com --- hw/tpm/tpm_tis_common.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/hw/tpm/tpm_tis_common.c b/hw/tpm/tpm_tis_common.c index e700d82181..93667e7788 100644 --- a/hw/tpm/tpm_tis_common.c +++ b/hw/tpm/tpm_tis_common.c @@ -596,10 +596,6 @@ static void tpm_tis_mmio_write(void *opaque, hwaddr ad= dr, /* hard wired -- ignore */ break; case TPM_TIS_REG_INT_STATUS: - if (s->active_locty !=3D locty) { - break; - } - /* clearing of interrupt flags */ if (((val & TPM_TIS_INTERRUPTS_SUPPORTED)) && (s->loc[locty].ints & TPM_TIS_INTERRUPTS_SUPPORTED)) { --=20 2.24.1 From nobody Sun May 5 01:48:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1593091470; cv=none; d=zohomail.com; s=zohoarc; b=LEp82UB4G8Gcr5rDK7EcpNnsyV/RsOxVdLeMAQrnb4vzHL4602qJyHL683AGxFZZFWWdSNvID9ouE3TIrRhRKQobmXqlXJFkY1p7Bo72QU8Ga50jec6T8zgwbWxWQVFdUcOGwmYn7LK7iCx74TwrcnrfYOCSgT6GajEhGVtbLa8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593091470; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=7Xejm51jNz2j5xif/iByUOqdis99n7uWe4E/8sc54aU=; b=Pmq3OklNXTMhycVpAyKWURSAQKoRKpj6XBY0X/7K9hxByEQ1tbASrIzRs1qhkka1quTIkkBTGb8qq7AF2VLwGunhmLSEyh+t5lxH0ydwBHOTyzGIyT78gfXIe8LPorq7drpudg02nJksVcoT3xa/Jo8aOqxjRjRKWiwkIWZbM7k= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1593091470408196.3291969538385; Thu, 25 Jun 2020 06:24:30 -0700 (PDT) Received: from localhost ([::1]:37446 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1joRrh-00043o-4t for importer@patchew.org; Thu, 25 Jun 2020 09:24:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59408) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1joRqq-0002ky-6o for qemu-devel@nongnu.org; Thu, 25 Jun 2020 09:23:36 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:18934 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1joRqo-0002yX-6s for qemu-devel@nongnu.org; Thu, 25 Jun 2020 09:23:35 -0400 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 05PD371m191220; Thu, 25 Jun 2020 09:23:31 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 31uwyfyhyp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Jun 2020 09:23:31 -0400 Received: from m0098419.ppops.net (m0098419.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 05PD3DZb191454; Thu, 25 Jun 2020 09:23:31 -0400 Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0b-001b2d01.pphosted.com with ESMTP id 31uwyfyhy7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Jun 2020 09:23:30 -0400 Received: from pps.filterd (ppma04wdc.us.ibm.com [127.0.0.1]) by ppma04wdc.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 05PDKC8n020943; Thu, 25 Jun 2020 13:23:29 GMT Received: from b03cxnp08025.gho.boulder.ibm.com (b03cxnp08025.gho.boulder.ibm.com [9.17.130.17]) by ppma04wdc.us.ibm.com with ESMTP id 31uuryc7fu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Jun 2020 13:23:29 +0000 Received: from b03ledav001.gho.boulder.ibm.com (b03ledav001.gho.boulder.ibm.com [9.17.130.232]) by b03cxnp08025.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 05PDNRdS30277900 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 25 Jun 2020 13:23:27 GMT Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1B2B96E050; Thu, 25 Jun 2020 13:23:29 +0000 (GMT) Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 84C096E04C; Thu, 25 Jun 2020 13:23:28 +0000 (GMT) Received: from sbct-3.pok.ibm.com (unknown [9.47.158.153]) by b03ledav001.gho.boulder.ibm.com (Postfix) with ESMTP; Thu, 25 Jun 2020 13:23:28 +0000 (GMT) From: Stefan Berger To: qemu-devel@nongnu.org Subject: [PULL v1 2/8] tpm: Extend TPMIfClass with get_irqnum() function Date: Thu, 25 Jun 2020 09:23:19 -0400 Message-Id: <20200625132325.2025245-3-stefanb@linux.vnet.ibm.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200625132325.2025245-1-stefanb@linux.vnet.ibm.com> References: <20200625132325.2025245-1-stefanb@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216, 18.0.687 definitions=2020-06-25_08:2020-06-25, 2020-06-25 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 impostorscore=0 mlxlogscore=999 mlxscore=0 priorityscore=1501 phishscore=0 malwarescore=0 cotscore=-2147483648 lowpriorityscore=0 bulkscore=0 clxscore=1015 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006250080 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=148.163.158.5; envelope-from=stefanb@linux.vnet.ibm.com; helo=mx0a-001b2d01.pphosted.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/25 08:13:37 X-ACL-Warn: Detected OS = Linux 3.x [generic] X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Stefan Berger , Eric Auger , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Stefan Berger Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Implement get_irqnum() as part of the TPMIfClass to get the assigned IRQ number or TPM_IRQ_DISABLED (~0) in case IRQs cannot be used. Signed-off-by: Stefan Berger Reviewed-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Eric Auger Tested-by: Eric Auger Message-id: 20200617142305.1198672-3-stefanb@linux.vnet.ibm.com --- hw/tpm/tpm_tis_isa.c | 9 +++++++++ hw/tpm/tpm_tis_sysbus.c | 9 +++++++++ include/sysemu/tpm.h | 12 ++++++++++++ 3 files changed, 30 insertions(+) diff --git a/hw/tpm/tpm_tis_isa.c b/hw/tpm/tpm_tis_isa.c index 5faf6231c0..bacc4447b5 100644 --- a/hw/tpm/tpm_tis_isa.c +++ b/hw/tpm/tpm_tis_isa.c @@ -81,6 +81,14 @@ static enum TPMVersion tpm_tis_isa_get_tpm_version(TPMIf= *ti) return tpm_tis_get_tpm_version(s); } =20 +static int8_t tpm_tis_isa_get_irqnum(TPMIf *ti) +{ + TPMStateISA *isadev =3D TPM_TIS_ISA(ti); + TPMState *s =3D &isadev->state; + + return s->irq_num; +} + static void tpm_tis_isa_reset(DeviceState *dev) { TPMStateISA *isadev =3D TPM_TIS_ISA(dev); @@ -149,6 +157,7 @@ static void tpm_tis_isa_class_init(ObjectClass *klass, = void *data) dc->reset =3D tpm_tis_isa_reset; tc->request_completed =3D tpm_tis_isa_request_completed; tc->get_version =3D tpm_tis_isa_get_tpm_version; + tc->get_irqnum =3D tpm_tis_isa_get_irqnum; } =20 static const TypeInfo tpm_tis_isa_info =3D { diff --git a/hw/tpm/tpm_tis_sysbus.c b/hw/tpm/tpm_tis_sysbus.c index 4a3bc70625..879a5788de 100644 --- a/hw/tpm/tpm_tis_sysbus.c +++ b/hw/tpm/tpm_tis_sysbus.c @@ -81,6 +81,14 @@ static enum TPMVersion tpm_tis_sysbus_get_tpm_version(TP= MIf *ti) return tpm_tis_get_tpm_version(s); } =20 +static int8_t tpm_tis_sysbus_get_irqnum(TPMIf *ti) +{ + TPMStateSysBus *sbdev =3D TPM_TIS_SYSBUS(ti); + TPMState *s =3D &sbdev->state; + + return s->irq_num; +} + static void tpm_tis_sysbus_reset(DeviceState *dev) { TPMStateSysBus *sbdev =3D TPM_TIS_SYSBUS(dev); @@ -138,6 +146,7 @@ static void tpm_tis_sysbus_class_init(ObjectClass *klas= s, void *data) dc->reset =3D tpm_tis_sysbus_reset; tc->request_completed =3D tpm_tis_sysbus_request_completed; tc->get_version =3D tpm_tis_sysbus_get_tpm_version; + tc->get_irqnum =3D tpm_tis_sysbus_get_irqnum; } =20 static const TypeInfo tpm_tis_sysbus_info =3D { diff --git a/include/sysemu/tpm.h b/include/sysemu/tpm.h index 03fb25941c..39c3c9c0f2 100644 --- a/include/sysemu/tpm.h +++ b/include/sysemu/tpm.h @@ -25,6 +25,8 @@ typedef enum TPMVersion { TPM_VERSION_2_0 =3D 2, } TPMVersion; =20 +#define TPM_IRQ_DISABLED (~0) + #define TYPE_TPM_IF "tpm-if" #define TPM_IF_CLASS(klass) \ OBJECT_CLASS_CHECK(TPMIfClass, (klass), TYPE_TPM_IF) @@ -41,6 +43,7 @@ typedef struct TPMIfClass { enum TpmModel model; void (*request_completed)(TPMIf *obj, int ret); enum TPMVersion (*get_version)(TPMIf *obj); + int8_t (*get_irqnum)(TPMIf *obj); } TPMIfClass; =20 #define TYPE_TPM_TIS_ISA "tpm-tis" @@ -74,4 +77,13 @@ static inline TPMVersion tpm_get_version(TPMIf *ti) return TPM_IF_GET_CLASS(ti)->get_version(ti); } =20 +static inline int8_t tpm_get_irqnum(TPMIf *ti) +{ + if (!ti || !TPM_IF_GET_CLASS(ti)->get_irqnum) { + return TPM_IRQ_DISABLED; + } + + return TPM_IF_GET_CLASS(ti)->get_irqnum(ti); +} + #endif /* QEMU_TPM_H */ --=20 2.24.1 From nobody Sun May 5 01:48:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1593091656; cv=none; d=zohomail.com; s=zohoarc; b=gNGHiU9yl+nFFM55uQjxJQ5Hw/j42N7/kIV6l6xRqyqyRB9B6mPp/JYHhFn2O/vLwc4PB4q+t/jUfgpJJIOjKRgL6OY8QKB5fHjydYhXDbwSH4l+1q3fid78ERYGgK1CvB4P4GDjIqSWntztnzad0K9X7dYqk/RbrzpVi7up21E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593091656; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=0ROmCpjBoL2RzpJifjcB59+rWvjGbFhJpPKvWAZhkO4=; b=E8bZIIy5LK67KLXNo822JFWo0hotqkeMsloXGIhKuT53m/Xz9IN2ERYrRYNZbdRco5ubkBDWZT0dMfPgI52L0Qe+45PGKcrBjyxwvCCdeYoOGJEkZA4cG9AG6V96zxkEcMZI1X/4GeW+jHpAknZ3VRz0o/17d9J44SAY4q7t34E= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1593091656739453.7117895537517; Thu, 25 Jun 2020 06:27:36 -0700 (PDT) Received: from localhost ([::1]:52516 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1joRuh-0001lv-Gp for importer@patchew.org; Thu, 25 Jun 2020 09:27:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59420) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1joRqq-0002lB-KU for qemu-devel@nongnu.org; Thu, 25 Jun 2020 09:23:36 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:18940) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1joRqo-0002yv-UN for qemu-devel@nongnu.org; Thu, 25 Jun 2020 09:23:36 -0400 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 05PDCn0W086229; Thu, 25 Jun 2020 09:23:32 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 31vvkx8dam-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Jun 2020 09:23:32 -0400 Received: from m0098421.ppops.net (m0098421.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 05PDDYtZ094832; Thu, 25 Jun 2020 09:23:31 -0400 Received: from ppma01dal.us.ibm.com (83.d6.3fa9.ip4.static.sl-reverse.com [169.63.214.131]) by mx0a-001b2d01.pphosted.com with ESMTP id 31vvkx8da8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Jun 2020 09:23:31 -0400 Received: from pps.filterd (ppma01dal.us.ibm.com [127.0.0.1]) by ppma01dal.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 05PDK0tA025442; Thu, 25 Jun 2020 13:23:31 GMT Received: from b03cxnp08025.gho.boulder.ibm.com (b03cxnp08025.gho.boulder.ibm.com [9.17.130.17]) by ppma01dal.us.ibm.com with ESMTP id 31uuruq9hw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Jun 2020 13:23:31 +0000 Received: from b03ledav001.gho.boulder.ibm.com (b03ledav001.gho.boulder.ibm.com [9.17.130.232]) by b03cxnp08025.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 05PDNSEe25886998 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 25 Jun 2020 13:23:28 GMT Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D48386E053; Thu, 25 Jun 2020 13:23:29 +0000 (GMT) Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3B8F16E04C; Thu, 25 Jun 2020 13:23:29 +0000 (GMT) Received: from sbct-3.pok.ibm.com (unknown [9.47.158.153]) by b03ledav001.gho.boulder.ibm.com (Postfix) with ESMTP; Thu, 25 Jun 2020 13:23:29 +0000 (GMT) From: Stefan Berger To: qemu-devel@nongnu.org Subject: [PULL v1 3/8] tests: Temporarily ignore DSDT table differences Date: Thu, 25 Jun 2020 09:23:20 -0400 Message-Id: <20200625132325.2025245-4-stefanb@linux.vnet.ibm.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200625132325.2025245-1-stefanb@linux.vnet.ibm.com> References: <20200625132325.2025245-1-stefanb@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216, 18.0.687 definitions=2020-06-25_08:2020-06-25, 2020-06-25 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 clxscore=1015 bulkscore=0 malwarescore=0 adultscore=0 impostorscore=0 priorityscore=1501 mlxscore=0 phishscore=0 cotscore=-2147483648 spamscore=0 mlxlogscore=999 suspectscore=1 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006250080 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=148.163.158.5; envelope-from=stefanb@linux.vnet.ibm.com; helo=mx0b-001b2d01.pphosted.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/25 08:13:37 X-ACL-Warn: Detected OS = Linux 3.x [generic] X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, "Michael S . Tsirkin" , Stefan Berger , Eric Auger , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Stefan Berger Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Ignore DSDT table differences before enabling IRQ support for TPM. Signed-off-by: Stefan Berger Reviewed-by: Eric Auger Reviewed-by: Marc-Andr=C3=A9 Lureau Tested-by: Eric Auger Message-id: 20200617142305.1198672-4-stefanb@linux.vnet.ibm.com CC: Michael S. Tsirkin --- tests/qtest/bios-tables-test-allowed-diff.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios= -tables-test-allowed-diff.h index dfb8523c8b..bb4ce8967b 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1 +1,2 @@ /* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/q35/DSDT.tis", --=20 2.24.1 From nobody Sun May 5 01:48:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1593091472; cv=none; d=zohomail.com; s=zohoarc; b=GKsWJTlITSGbJBhCoE5NT6ZDEVL5Ezh1mYbT9tozcyw+f6mYuk1tSt4m5mgYGqYmxtcd7U5YBsoSsBHBOVW5OdS7Va/X6Wg0CCGDUfGunlK4WxXEYMwSxf9HoPW6Oszb54OyqJ1Ouy6u8Tcu6mcmkopkDBWo6r0qBl2ZVosXjxo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593091472; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=mKrqCfXUT2/AFCdg55VHctGl7pH4EC051MJXr5UldNE=; b=ENO6LEFJJ9joUua7JUNc5h/GfMrxnrNLTRglLgIYBiAuTMQQCpr0XEIVEl05v3ETtDcDdqy84crLMjuUQI8QzD0n9PeGgF365nXMEdIWluwdg30TyMzL8doTZjlT0FivYQvGzOQ5f1QDsR1sNAC6+16XN4n1ODh54h/pNB5u9K8= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1593091472521697.6633268778585; Thu, 25 Jun 2020 06:24:32 -0700 (PDT) Received: from localhost ([::1]:37652 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1joRrj-00048w-Al for importer@patchew.org; Thu, 25 Jun 2020 09:24:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59440) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1joRqr-0002lN-HJ for qemu-devel@nongnu.org; Thu, 25 Jun 2020 09:23:37 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:24594) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1joRqp-0002zU-5s for qemu-devel@nongnu.org; Thu, 25 Jun 2020 09:23:37 -0400 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 05PD3BNi009496; Thu, 25 Jun 2020 09:23:33 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 31vbmu4p1x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Jun 2020 09:23:33 -0400 Received: from m0098404.ppops.net (m0098404.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 05PD3XaR011729; Thu, 25 Jun 2020 09:23:32 -0400 Received: from ppma04dal.us.ibm.com (7a.29.35a9.ip4.static.sl-reverse.com [169.53.41.122]) by mx0a-001b2d01.pphosted.com with ESMTP id 31vbmu4p1f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Jun 2020 09:23:32 -0400 Received: from pps.filterd (ppma04dal.us.ibm.com [127.0.0.1]) by ppma04dal.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 05PDKMBX014864; Thu, 25 Jun 2020 13:23:32 GMT Received: from b03cxnp07028.gho.boulder.ibm.com (b03cxnp07028.gho.boulder.ibm.com [9.17.130.15]) by ppma04dal.us.ibm.com with ESMTP id 31uurq790u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Jun 2020 13:23:31 +0000 Received: from b03ledav001.gho.boulder.ibm.com (b03ledav001.gho.boulder.ibm.com [9.17.130.232]) by b03cxnp07028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 05PDNUI75570902 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 25 Jun 2020 13:23:30 GMT Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 941E26E053; Thu, 25 Jun 2020 13:23:30 +0000 (GMT) Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0AB756E050; Thu, 25 Jun 2020 13:23:30 +0000 (GMT) Received: from sbct-3.pok.ibm.com (unknown [9.47.158.153]) by b03ledav001.gho.boulder.ibm.com (Postfix) with ESMTP; Thu, 25 Jun 2020 13:23:29 +0000 (GMT) From: Stefan Berger To: qemu-devel@nongnu.org Subject: [PULL v1 4/8] tpm: Split TPM_TIS_IRQ into TPM_TIS_ISA_IRQ and TPM_TIS_SYSBUS_IRQ Date: Thu, 25 Jun 2020 09:23:21 -0400 Message-Id: <20200625132325.2025245-5-stefanb@linux.vnet.ibm.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200625132325.2025245-1-stefanb@linux.vnet.ibm.com> References: <20200625132325.2025245-1-stefanb@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216, 18.0.687 definitions=2020-06-25_08:2020-06-25, 2020-06-25 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 malwarescore=0 bulkscore=0 impostorscore=0 suspectscore=1 adultscore=0 spamscore=0 phishscore=0 clxscore=1015 cotscore=-2147483648 mlxlogscore=999 lowpriorityscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006250083 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=148.163.156.1; envelope-from=stefanb@linux.vnet.ibm.com; helo=mx0a-001b2d01.pphosted.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/25 09:23:31 X-ACL-Warn: Detected OS = Linux 3.x [generic] [fuzzy] X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Stefan Berger , Eric Auger , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Stefan Berger Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Before the enablement of interrupts on PCs, split the TPM_TIS_IRQ into TPM_TIS_ISA_IRQ for PCs and TPM_TIS_SYSBUS_IRQ for ARM. Signed-off-by: Stefan Berger Reviewed-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Eric Auger Tested-by: Eric Auger Message-id: 20200617142305.1198672-5-stefanb@linux.vnet.ibm.com --- hw/tpm/tpm_tis_isa.c | 2 +- hw/tpm/tpm_tis_sysbus.c | 3 ++- include/hw/acpi/tpm.h | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/tpm/tpm_tis_isa.c b/hw/tpm/tpm_tis_isa.c index bacc4447b5..d00d49994d 100644 --- a/hw/tpm/tpm_tis_isa.c +++ b/hw/tpm/tpm_tis_isa.c @@ -98,7 +98,7 @@ static void tpm_tis_isa_reset(DeviceState *dev) } =20 static Property tpm_tis_isa_properties[] =3D { - DEFINE_PROP_UINT32("irq", TPMStateISA, state.irq_num, TPM_TIS_IRQ), + DEFINE_PROP_UINT32("irq", TPMStateISA, state.irq_num, TPM_TIS_ISA_IRQ), DEFINE_PROP_TPMBE("tpmdev", TPMStateISA, state.be_driver), DEFINE_PROP_BOOL("ppi", TPMStateISA, state.ppi_enabled, true), DEFINE_PROP_END_OF_LIST(), diff --git a/hw/tpm/tpm_tis_sysbus.c b/hw/tpm/tpm_tis_sysbus.c index 879a5788de..268eec9195 100644 --- a/hw/tpm/tpm_tis_sysbus.c +++ b/hw/tpm/tpm_tis_sysbus.c @@ -98,7 +98,8 @@ static void tpm_tis_sysbus_reset(DeviceState *dev) } =20 static Property tpm_tis_sysbus_properties[] =3D { - DEFINE_PROP_UINT32("irq", TPMStateSysBus, state.irq_num, TPM_TIS_IRQ), + DEFINE_PROP_UINT32("irq", TPMStateSysBus, state.irq_num, + TPM_TIS_SYSBUS_IRQ), DEFINE_PROP_TPMBE("tpmdev", TPMStateSysBus, state.be_driver), DEFINE_PROP_BOOL("ppi", TPMStateSysBus, state.ppi_enabled, false), DEFINE_PROP_END_OF_LIST(), diff --git a/include/hw/acpi/tpm.h b/include/hw/acpi/tpm.h index 1a2a57a21f..d5caee9771 100644 --- a/include/hw/acpi/tpm.h +++ b/include/hw/acpi/tpm.h @@ -24,7 +24,8 @@ #define TPM_TIS_ADDR_BASE 0xFED40000 #define TPM_TIS_ADDR_SIZE 0x5000 =20 -#define TPM_TIS_IRQ 5 +#define TPM_TIS_ISA_IRQ 5 +#define TPM_TIS_SYSBUS_IRQ 5 =20 #define TPM_TIS_NUM_LOCALITIES 5 /* per spec */ #define TPM_TIS_LOCALITY_SHIFT 12 --=20 2.24.1 From nobody Sun May 5 01:48:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1593091556; cv=none; d=zohomail.com; s=zohoarc; b=EMDgTsPps9fmzP2cg4Suhw8filqxV6hTwQ+0PZYQUp9GIdyy/E+cPQbcsigMiGn/dWIwUdcYPQpER7UW5PPz2z+/Jhll43y065+H+Yqkuco/3D2PjFOx8GUGrttoRk85jERs7y7O3f2hpAMXWS7fcLcxUT4LUG0JGeq+pMBdJfs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593091556; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=O/4r1q5a/VtPacGopW1U2SPLxraG228IjcdL+ZU6Eys=; b=JphBeS7jvO/3aN2sxc53DFORDSZoQzi9psjxSDjVLt/gOmWpjTPbegCLFNAz6qlPw9Dx3FCyrpFXg0M583ZyAehWPJBO8ftv6SfJvg4Ps08/kVZ5QWv76zaS7Z3b+4AMjlDfcn9Qk5YU64XHXuKW8MiVWstPgFsZ74tQLctwyjg= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1593091556943656.2037833089638; Thu, 25 Jun 2020 06:25:56 -0700 (PDT) Received: from localhost ([::1]:44650 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1joRt5-00072l-IY for importer@patchew.org; Thu, 25 Jun 2020 09:25:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59414) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1joRqq-0002l1-CB for qemu-devel@nongnu.org; Thu, 25 Jun 2020 09:23:36 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:26372 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1joRqo-0002zP-Hd for qemu-devel@nongnu.org; Thu, 25 Jun 2020 09:23:36 -0400 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 05PD44i0193282; Thu, 25 Jun 2020 09:23:33 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 31uwymr9yu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Jun 2020 09:23:33 -0400 Received: from m0098414.ppops.net (m0098414.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 05PDCIim017565; Thu, 25 Jun 2020 09:23:33 -0400 Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0b-001b2d01.pphosted.com with ESMTP id 31uwymr9yj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Jun 2020 09:23:33 -0400 Received: from pps.filterd (ppma04wdc.us.ibm.com [127.0.0.1]) by ppma04wdc.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 05PDKC8o020943; Thu, 25 Jun 2020 13:23:32 GMT Received: from b03cxnp08026.gho.boulder.ibm.com (b03cxnp08026.gho.boulder.ibm.com [9.17.130.18]) by ppma04wdc.us.ibm.com with ESMTP id 31uuryc7g3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Jun 2020 13:23:32 +0000 Received: from b03ledav001.gho.boulder.ibm.com (b03ledav001.gho.boulder.ibm.com [9.17.130.232]) by b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 05PDNT0n23986514 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 25 Jun 2020 13:23:29 GMT Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 59EF56E04E; Thu, 25 Jun 2020 13:23:31 +0000 (GMT) Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B4D396E04C; Thu, 25 Jun 2020 13:23:30 +0000 (GMT) Received: from sbct-3.pok.ibm.com (unknown [9.47.158.153]) by b03ledav001.gho.boulder.ibm.com (Postfix) with ESMTP; Thu, 25 Jun 2020 13:23:30 +0000 (GMT) From: Stefan Berger To: qemu-devel@nongnu.org Subject: [PULL v1 5/8] acpi: Enable TPM IRQ Date: Thu, 25 Jun 2020 09:23:22 -0400 Message-Id: <20200625132325.2025245-6-stefanb@linux.vnet.ibm.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200625132325.2025245-1-stefanb@linux.vnet.ibm.com> References: <20200625132325.2025245-1-stefanb@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216, 18.0.687 definitions=2020-06-25_08:2020-06-25, 2020-06-25 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 clxscore=1015 bulkscore=0 lowpriorityscore=0 malwarescore=0 priorityscore=1501 suspectscore=1 impostorscore=0 cotscore=-2147483648 adultscore=0 mlxlogscore=999 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006250083 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=148.163.158.5; envelope-from=stefanb@linux.vnet.ibm.com; helo=mx0a-001b2d01.pphosted.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/25 08:13:37 X-ACL-Warn: Detected OS = Linux 3.x [generic] X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, "Michael S . Tsirkin" , Eric Auger , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Igor Mammedov , Stefan Berger Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" From: Stefan Berger Move the TPM TIS IRQ to unused IRQ 13, which is the only one accepted by Windows. Query for the TPM's irq number and enable the TPM IRQ unless TPM_IRQ_DISABLED is returned. Signed-off-by: Stefan Berger Reviewed-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Eric Auger Tested-by: Eric Auger Message-id: 20200617142305.1198672-6-stefanb@linux.vnet.ibm.com Reviewed-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin --- hw/i386/acpi-build.c | 11 +++++------ include/hw/acpi/tpm.h | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 900f786d08..bb9a7f8497 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -2021,6 +2021,7 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, build_append_pci_bus_devices(scope, bus, pm->pcihp_bridge_en); =20 if (TPM_IS_TIS_ISA(tpm)) { + int8_t irq =3D tpm_get_irqnum(tpm); if (misc->tpm_version =3D=3D TPM_VERSION_2_0) { dev =3D aml_device("TPM"); aml_append(dev, aml_name_decl("_HID", @@ -2035,12 +2036,10 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, crs =3D aml_resource_template(); aml_append(crs, aml_memory32_fixed(TPM_TIS_ADDR_BASE, TPM_TIS_ADDR_SIZE, AML_READ_WRITE)); - /* - FIXME: TPM_TIS_IRQ=3D5 conflicts with PNP0C0F irqs, - Rewrite to take IRQ from TPM device model and - fix default IRQ value there to use some unused IRQ - */ - /* aml_append(crs, aml_irq_no_flags(TPM_TIS_IRQ)); */ + + if (irq !=3D TPM_IRQ_DISABLED) { + aml_append(crs, aml_irq_no_flags(irq)); + } aml_append(dev, aml_name_decl("_CRS", crs)); =20 tpm_build_ppi_acpi(tpm, dev); diff --git a/include/hw/acpi/tpm.h b/include/hw/acpi/tpm.h index d5caee9771..d356f2e06e 100644 --- a/include/hw/acpi/tpm.h +++ b/include/hw/acpi/tpm.h @@ -24,7 +24,7 @@ #define TPM_TIS_ADDR_BASE 0xFED40000 #define TPM_TIS_ADDR_SIZE 0x5000 =20 -#define TPM_TIS_ISA_IRQ 5 +#define TPM_TIS_ISA_IRQ 13 /* only one possible */ #define TPM_TIS_SYSBUS_IRQ 5 =20 #define TPM_TIS_NUM_LOCALITIES 5 /* per spec */ --=20 2.24.1 From nobody Sun May 5 01:48:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1593091472; cv=none; d=zohomail.com; s=zohoarc; b=QDRKPGFhtwsij9PDCJ4+H1+5lcWZ7iEN7/bxZm8GbANliGFM/Qw/mIlJt1VJ9B/QwqTYUt2MGMCv3hfqscb6k+6qbBjo1Y20O/jwWhEEX3Qe0sdCkHKZsnjGnBsqcWxKrdSKKNDnkhnIZDwKiOycLShzyGcNAfRsBb+JmlwKWhI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593091472; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=G7SNUhVUpQPmkOFBK/0XYsq0sMLXGJYspRIz6sPdxhs=; b=f6DVHt6j3UrOKJjs+9ooOqBeRG+JEcwTh3Z7236xzboQK4MOlFxxeQfZkote9qFJFmjBnbxzdy0pTtPDz1+pkvrRpmKLJyf+rCSPy2qhFuMI0gk5eHpug5IQGh/OfPAXvIGkJkjfIhYUn+Oem6mf6UeO0Ik5eJoP1Wr4897D8qQ= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1593091472162377.9834805058367; Thu, 25 Jun 2020 06:24:32 -0700 (PDT) Received: from localhost ([::1]:37592 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1joRri-00047W-U4 for importer@patchew.org; Thu, 25 Jun 2020 09:24:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59460) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1joRqs-0002lt-FM for qemu-devel@nongnu.org; Thu, 25 Jun 2020 09:23:38 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:1072) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1joRqq-000307-MY for qemu-devel@nongnu.org; Thu, 25 Jun 2020 09:23:38 -0400 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 05PD1wYK063273; Thu, 25 Jun 2020 09:23:35 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 31ux07xcyx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Jun 2020 09:23:34 -0400 Received: from m0098396.ppops.net (m0098396.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 05PD212h063579; Thu, 25 Jun 2020 09:23:34 -0400 Received: from ppma02dal.us.ibm.com (a.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.10]) by mx0a-001b2d01.pphosted.com with ESMTP id 31ux07xcyd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Jun 2020 09:23:34 -0400 Received: from pps.filterd (ppma02dal.us.ibm.com [127.0.0.1]) by ppma02dal.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 05PDJgI8012223; Thu, 25 Jun 2020 13:23:33 GMT Received: from b03cxnp08027.gho.boulder.ibm.com (b03cxnp08027.gho.boulder.ibm.com [9.17.130.19]) by ppma02dal.us.ibm.com with ESMTP id 31uurt787p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Jun 2020 13:23:33 +0000 Received: from b03ledav001.gho.boulder.ibm.com (b03ledav001.gho.boulder.ibm.com [9.17.130.232]) by b03cxnp08027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 05PDNUKf13631884 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 25 Jun 2020 13:23:30 GMT Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2F5BA6E054; Thu, 25 Jun 2020 13:23:32 +0000 (GMT) Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7A4F26E04C; Thu, 25 Jun 2020 13:23:31 +0000 (GMT) Received: from sbct-3.pok.ibm.com (unknown [9.47.158.153]) by b03ledav001.gho.boulder.ibm.com (Postfix) with ESMTP; Thu, 25 Jun 2020 13:23:31 +0000 (GMT) From: Stefan Berger To: qemu-devel@nongnu.org Subject: [PULL v1 6/8] tests: Add updated DSDT Date: Thu, 25 Jun 2020 09:23:23 -0400 Message-Id: <20200625132325.2025245-7-stefanb@linux.vnet.ibm.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200625132325.2025245-1-stefanb@linux.vnet.ibm.com> References: <20200625132325.2025245-1-stefanb@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216, 18.0.687 definitions=2020-06-25_08:2020-06-25, 2020-06-25 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=1 mlxscore=0 impostorscore=0 cotscore=-2147483648 mlxlogscore=999 bulkscore=0 lowpriorityscore=0 adultscore=0 malwarescore=0 phishscore=0 clxscore=1015 priorityscore=1501 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006250080 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=148.163.156.1; envelope-from=stefanb@linux.vnet.ibm.com; helo=mx0a-001b2d01.pphosted.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/25 09:23:31 X-ACL-Warn: Detected OS = Linux 3.x [generic] [fuzzy] X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Stefan Berger , "Michael S . Tsirkin" , Eric Auger , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Igor Mammedov , Stefan Berger Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Add the updated DSDT following the interrupt enablement. @@ -5,13 +5,13 @@ * * Disassembling to symbolic ASL+ operators * - * Disassembly of tests/data/acpi/q35/DSDT.tis, Mon Jun 15 09:57:05 2020 + * Disassembly of /tmp/aml-Y77YL0, Mon Jun 15 09:57:05 2020 * * Original Table Header: * Signature "DSDT" - * Length 0x000020A5 (8357) + * Length 0x000020A8 (8360) * Revision 0x01 **** 32-bit table (V1), no 64-bit math support - * Checksum 0xAD + * Checksum 0x77 * OEM ID "BOCHS " * OEM Table ID "BXPCDSDT" * OEM Revision 0x00000001 (1) @@ -3162,6 +3162,8 @@ 0xFED40000, // Address Base 0x00005000, // Address Length ) + IRQNoFlags () + {13} }) OperationRegion (TPP2, SystemMemory, 0xFED45100, 0x5A) Field (TPP2, AnyAcc, NoLock, Preserve) ** Signed-off-by: Stefan Berger Reviewed-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Eric Auger Tested-by: Eric Auger Message-id: 20200617142305.1198672-7-stefanb@linux.vnet.ibm.com Reviewed-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin --- tests/data/acpi/q35/DSDT.tis | Bin 8357 -> 8360 bytes tests/qtest/bios-tables-test-allowed-diff.h | 1 - 2 files changed, 1 deletion(-) diff --git a/tests/data/acpi/q35/DSDT.tis b/tests/data/acpi/q35/DSDT.tis index 56b6fb0c3298517d080e38fea05a748b9f1dba54..3f9db960aa05d399fa7f8449e6d= b688788211832 100644 GIT binary patch delta 64 zcmZ4LxWbXkCDllkS`nVeK7N60A%iEs(FaWXJ6 UFkJb^5Wv8o#GtUbT~3Y(068!Z;Q#;t delta 61 zcmZ4CxYUu$CDGx@7bj*wH}7v$n=3D<78lD RV7T&+A%KBlbC;YP695=3D#58(g+ diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios= -tables-test-allowed-diff.h index bb4ce8967b..dfb8523c8b 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1,2 +1 @@ /* List of comma-separated changed AML files to ignore */ -"tests/data/acpi/q35/DSDT.tis", --=20 2.24.1 From nobody Sun May 5 01:48:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1593091651; cv=none; d=zohomail.com; s=zohoarc; b=lScE8/5YzZm8SZH3nd89BHSUtSUjg7fg/q6golSgCIEJ6InWL8z96wB1vIlM7cRfvvJTRU6Z/44uucRASWrjsJcYXGsLZKbl+ygKqy1QM4u3nfdaHETf/opYkZGYh4T66hgZH9sNq1NXAb19LCaDgDqrMkETGtvmKOwUjrbXMy8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593091651; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=bnOeMsVOuZ052WoCdfoaM3TMQigZ8P6DbZ1oI4NrJMU=; b=EaDYr8ZwZcTrenh//1jz6gn0Ul1Unv6QMoem9XS/TIQHKDgLM7T4/O4gwvhIBtLJEq0gFudesJaPuahT0MJa6vkEwrP+1zFXnbDrc+elmcuMR/GPcYhG2EXwprrRre8rmdxqNvTLv17+6/5As/Olvs1r9/OLPevRTlwVQWqY0ug= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1593091651940891.1326574170134; Thu, 25 Jun 2020 06:27:31 -0700 (PDT) Received: from localhost ([::1]:52118 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1joRuc-0001cG-NY for importer@patchew.org; Thu, 25 Jun 2020 09:27:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59476) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1joRqt-0002mc-4a for qemu-devel@nongnu.org; Thu, 25 Jun 2020 09:23:39 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:28294) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1joRqr-00030d-CV for qemu-devel@nongnu.org; Thu, 25 Jun 2020 09:23:38 -0400 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 05PD351l008791; Thu, 25 Jun 2020 09:23:35 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 31vbmu4p3a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Jun 2020 09:23:35 -0400 Received: from m0098404.ppops.net (m0098404.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 05PD40jg013317; Thu, 25 Jun 2020 09:23:35 -0400 Received: from ppma02dal.us.ibm.com (a.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.10]) by mx0a-001b2d01.pphosted.com with ESMTP id 31vbmu4p2q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Jun 2020 09:23:35 -0400 Received: from pps.filterd (ppma02dal.us.ibm.com [127.0.0.1]) by ppma02dal.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 05PDJi9T012234; Thu, 25 Jun 2020 13:23:34 GMT Received: from b03cxnp08027.gho.boulder.ibm.com (b03cxnp08027.gho.boulder.ibm.com [9.17.130.19]) by ppma02dal.us.ibm.com with ESMTP id 31uurt787t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Jun 2020 13:23:34 +0000 Received: from b03ledav001.gho.boulder.ibm.com (b03ledav001.gho.boulder.ibm.com [9.17.130.232]) by b03cxnp08027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 05PDNVhg11338284 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 25 Jun 2020 13:23:31 GMT Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C95546E050; Thu, 25 Jun 2020 13:23:32 +0000 (GMT) Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4FC846E04E; Thu, 25 Jun 2020 13:23:32 +0000 (GMT) Received: from sbct-3.pok.ibm.com (unknown [9.47.158.153]) by b03ledav001.gho.boulder.ibm.com (Postfix) with ESMTP; Thu, 25 Jun 2020 13:23:32 +0000 (GMT) From: Stefan Berger To: qemu-devel@nongnu.org Subject: [PULL v1 7/8] tpm: Guard irq related ops in case interrupts are disabled Date: Thu, 25 Jun 2020 09:23:24 -0400 Message-Id: <20200625132325.2025245-8-stefanb@linux.vnet.ibm.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200625132325.2025245-1-stefanb@linux.vnet.ibm.com> References: <20200625132325.2025245-1-stefanb@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216, 18.0.687 definitions=2020-06-25_08:2020-06-25, 2020-06-25 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 malwarescore=0 bulkscore=0 impostorscore=0 suspectscore=1 adultscore=0 spamscore=0 phishscore=0 clxscore=1015 cotscore=-2147483648 mlxlogscore=999 lowpriorityscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006250083 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=148.163.156.1; envelope-from=stefanb@linux.vnet.ibm.com; helo=mx0a-001b2d01.pphosted.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/25 09:23:31 X-ACL-Warn: Detected OS = Linux 3.x [generic] [fuzzy] X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Stefan Berger , Eric Auger , Stefan Berger Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Check for irq_num having the value of TPM_IRQ_DISABLED before calling any IRQ related functions or allowing the user to try to enable interrupts. Explicitly allow the value of TPM_IRQ_DISABLED in irq_num. Signed-off-by: Stefan Berger Reviewed-by: Eric Auger Tested-by: Eric Auger Message-id: 20200617142305.1198672-8-stefanb@linux.vnet.ibm.com --- hw/tpm/tpm_tis_common.c | 12 +++++++++++- hw/tpm/tpm_tis_isa.c | 6 ++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/hw/tpm/tpm_tis_common.c b/hw/tpm/tpm_tis_common.c index 93667e7788..8ecd11a38c 100644 --- a/hw/tpm/tpm_tis_common.c +++ b/hw/tpm/tpm_tis_common.c @@ -354,7 +354,11 @@ static uint64_t tpm_tis_mmio_read(void *opaque, hwaddr= addr, val =3D s->loc[locty].inte; break; case TPM_TIS_REG_INT_VECTOR: - val =3D s->irq_num; + if (s->irq_num !=3D TPM_IRQ_DISABLED) { + val =3D s->irq_num; + } else { + val =3D 0; + } break; case TPM_TIS_REG_INT_STATUS: val =3D s->loc[locty].ints; @@ -586,6 +590,9 @@ static void tpm_tis_mmio_write(void *opaque, hwaddr add= r, if (s->active_locty !=3D locty) { break; } + if (s->irq_num =3D=3D TPM_IRQ_DISABLED) { + val &=3D ~TPM_TIS_INT_ENABLED; + } =20 s->loc[locty].inte &=3D mask; s->loc[locty].inte |=3D (val & (TPM_TIS_INT_ENABLED | @@ -596,6 +603,9 @@ static void tpm_tis_mmio_write(void *opaque, hwaddr add= r, /* hard wired -- ignore */ break; case TPM_TIS_REG_INT_STATUS: + if (s->irq_num =3D=3D TPM_IRQ_DISABLED) { + break; + } /* clearing of interrupt flags */ if (((val & TPM_TIS_INTERRUPTS_SUPPORTED)) && (s->loc[locty].ints & TPM_TIS_INTERRUPTS_SUPPORTED)) { diff --git a/hw/tpm/tpm_tis_isa.c b/hw/tpm/tpm_tis_isa.c index d00d49994d..11fec805d0 100644 --- a/hw/tpm/tpm_tis_isa.c +++ b/hw/tpm/tpm_tis_isa.c @@ -128,13 +128,15 @@ static void tpm_tis_isa_realizefn(DeviceState *dev, E= rror **errp) error_setg(errp, "'tpmdev' property is required"); return; } - if (s->irq_num > 15) { + if (s->irq_num > 15 && s->irq_num !=3D TPM_IRQ_DISABLED) { error_setg(errp, "IRQ %d is outside valid range of 0 to 15", s->irq_num); return; } =20 - isa_init_irq(ISA_DEVICE(dev), &s->irq, s->irq_num); + if (s->irq_num !=3D TPM_IRQ_DISABLED) { + isa_init_irq(ISA_DEVICE(dev), &s->irq, s->irq_num); + } =20 memory_region_add_subregion(isa_address_space(ISA_DEVICE(dev)), TPM_TIS_ADDR_BASE, &s->mmio); --=20 2.24.1 From nobody Sun May 5 01:48:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1593091733; cv=none; d=zohomail.com; s=zohoarc; b=LfRBuTs8U5+n6BhDuZ0Tt4j/APIn15QhiZXU4da4+4KICgKwhlCOTidwq52pPMvYCEAbwLzVtKqruqXuBb272MAJ4Trabp8VteeJcVzJGiK/fvYk5cFrRvtLJRXf6Atb4uXNPJiVGwgBHYWvOeDy9z2gPwsrP7emuThhKPj45XU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593091733; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=wZRwGhecja6DRKB+fYiqA2DTxzIWeC3Im1Nz8YL6BRs=; b=UfHuKAfizYOARRUyIFzErLiZIVQN+4mND+G5Ahx2GmTCU/mqCz10qkFgOQBrCg3kVvNZM1Nz9vOaPGDvKZ7WCEVT2GXvL21JlVnpWjlRxRIcuHTCEnpURh3VKTicrMorBUXf27k7JN/1enCdkcmbgBc+ESQjs4jlrFouQRMSU38= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1593091733624366.86454998078557; Thu, 25 Jun 2020 06:28:53 -0700 (PDT) Received: from localhost ([::1]:59070 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1joRvw-0004UR-Cc for importer@patchew.org; Thu, 25 Jun 2020 09:28:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59480) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1joRqt-0002nr-Nz for qemu-devel@nongnu.org; Thu, 25 Jun 2020 09:23:39 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:59286) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1joRqs-000316-5l for qemu-devel@nongnu.org; Thu, 25 Jun 2020 09:23:39 -0400 Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 05PDBD2p112422; Thu, 25 Jun 2020 09:23:37 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 31uwyns8xw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Jun 2020 09:23:36 -0400 Received: from m0127361.ppops.net (m0127361.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 05PDCYpR116475; Thu, 25 Jun 2020 09:23:35 -0400 Received: from ppma03dal.us.ibm.com (b.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.11]) by mx0a-001b2d01.pphosted.com with ESMTP id 31uwyns8xg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Jun 2020 09:23:35 -0400 Received: from pps.filterd (ppma03dal.us.ibm.com [127.0.0.1]) by ppma03dal.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 05PDK484005400; Thu, 25 Jun 2020 13:23:34 GMT Received: from b03cxnp08028.gho.boulder.ibm.com (b03cxnp08028.gho.boulder.ibm.com [9.17.130.20]) by ppma03dal.us.ibm.com with ESMTP id 31uurvy8ay-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Jun 2020 13:23:34 +0000 Received: from b03ledav001.gho.boulder.ibm.com (b03ledav001.gho.boulder.ibm.com [9.17.130.232]) by b03cxnp08028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 05PDNXSj26476834 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 25 Jun 2020 13:23:33 GMT Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 882696E04C; Thu, 25 Jun 2020 13:23:33 +0000 (GMT) Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EA0026E050; Thu, 25 Jun 2020 13:23:32 +0000 (GMT) Received: from sbct-3.pok.ibm.com (unknown [9.47.158.153]) by b03ledav001.gho.boulder.ibm.com (Postfix) with ESMTP; Thu, 25 Jun 2020 13:23:32 +0000 (GMT) From: Stefan Berger To: qemu-devel@nongnu.org Subject: [PULL v1 8/8] tpm: Disable interrupt support for TIS on sysbus Date: Thu, 25 Jun 2020 09:23:25 -0400 Message-Id: <20200625132325.2025245-9-stefanb@linux.vnet.ibm.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200625132325.2025245-1-stefanb@linux.vnet.ibm.com> References: <20200625132325.2025245-1-stefanb@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216, 18.0.687 definitions=2020-06-25_08:2020-06-25, 2020-06-25 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=796 malwarescore=0 priorityscore=1501 impostorscore=0 spamscore=0 bulkscore=0 cotscore=-2147483648 mlxscore=0 clxscore=1015 lowpriorityscore=0 suspectscore=1 phishscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006250083 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=148.163.158.5; envelope-from=stefanb@linux.vnet.ibm.com; helo=mx0b-001b2d01.pphosted.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/25 08:13:37 X-ACL-Warn: Detected OS = Linux 3.1-3.10 X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Stefan Berger , Eric Auger , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Stefan Berger Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Disable interrupt support for the TIS on sysbus. Signed-off-by: Stefan Berger Reviewed-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Eric Auger Tested-by: Eric Auger Message-id: 20200617142305.1198672-9-stefanb@linux.vnet.ibm.com --- include/hw/acpi/tpm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hw/acpi/tpm.h b/include/hw/acpi/tpm.h index d356f2e06e..21f81690a5 100644 --- a/include/hw/acpi/tpm.h +++ b/include/hw/acpi/tpm.h @@ -25,7 +25,7 @@ #define TPM_TIS_ADDR_SIZE 0x5000 =20 #define TPM_TIS_ISA_IRQ 13 /* only one possible */ -#define TPM_TIS_SYSBUS_IRQ 5 +#define TPM_TIS_SYSBUS_IRQ TPM_IRQ_DISABLED =20 #define TPM_TIS_NUM_LOCALITIES 5 /* per spec */ #define TPM_TIS_LOCALITY_SHIFT 12 --=20 2.24.1