From nobody Mon Apr 29 15:11:32 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 ARC-Seal: i=1; a=rsa-sha256; t=1603318405; cv=none; d=zohomail.com; s=zohoarc; b=gkXv4swKbK7pUsb0XV8IGBSA5QPGLRPr2+gvDHCYkSAWPBq1PfcrAN9UpQj98sQSHr+BsdmW1PEx6ewQ+uNfb/hIZ+ysCuyi1kyfGDe6bW2uHwtwla4M+XJqezrmAkW9eg1O2dRLIogWr3+kxcUGk/coRC9hb8gKCAJc8T/mYeo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603318405; h=Content-Type:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=ptCfF7dbjeSrfLcTQxy6S/Qqg4kGiHG4Qxt4x2MeTls=; b=QeiEumpfBO8GDCmxQgJQJGlAaRAV8KzDRjCHeuZNtssOFOnv6N8zt83akpTtxJkC91ju2z/v/rl4YL0lDm+bgRHoCzGCTIP416Qeaa5nj7Z11ROuv0SO4ruS+0QtF7sEzW3+Y085WThynN4kBgjaNE7mThZE7aeuYtZl4vOFcHw= 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 Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1603318405676510.7843531293885; Wed, 21 Oct 2020 15:13:25 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.10144.26830 (Exim 4.92) (envelope-from ) id 1kVMM0-0006YG-Vn; Wed, 21 Oct 2020 22:13:08 +0000 Received: by outflank-mailman (output) from mailman id 10144.26830; Wed, 21 Oct 2020 22:13:08 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kVMM0-0006Y9-Rx; Wed, 21 Oct 2020 22:13:08 +0000 Received: by outflank-mailman (input) for mailman id 10144; Wed, 21 Oct 2020 22:13:07 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kVMLz-0006Y4-AY for xen-devel@lists.xenproject.org; Wed, 21 Oct 2020 22:13:07 +0000 Received: from mailhost.m5p.com (unknown [74.104.188.4]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id a79acf41-5742-430a-92ae-a722c85c6f90; Wed, 21 Oct 2020 22:13:06 +0000 (UTC) Received: from m5p.com (mailhost.m5p.com [IPv6:2001:470:1f07:15ff:0:0:0:f7]) by mailhost.m5p.com (8.15.2/8.15.2) with ESMTPS id 09LMCrQ2073233 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 21 Oct 2020 18:12:59 -0400 (EDT) (envelope-from ehem@m5p.com) Received: (from ehem@localhost) by m5p.com (8.15.2/8.15.2/Submit) id 09LMCr8q073232; Wed, 21 Oct 2020 15:12:53 -0700 (PDT) (envelope-from ehem) Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kVMLz-0006Y4-AY for xen-devel@lists.xenproject.org; Wed, 21 Oct 2020 22:13:07 +0000 Received: from mailhost.m5p.com (unknown [74.104.188.4]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id a79acf41-5742-430a-92ae-a722c85c6f90; Wed, 21 Oct 2020 22:13:06 +0000 (UTC) Received: from m5p.com (mailhost.m5p.com [IPv6:2001:470:1f07:15ff:0:0:0:f7]) by mailhost.m5p.com (8.15.2/8.15.2) with ESMTPS id 09LMCrQ2073233 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 21 Oct 2020 18:12:59 -0400 (EDT) (envelope-from ehem@m5p.com) Received: (from ehem@localhost) by m5p.com (8.15.2/8.15.2/Submit) id 09LMCr8q073232; Wed, 21 Oct 2020 15:12:53 -0700 (PDT) (envelope-from ehem) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: a79acf41-5742-430a-92ae-a722c85c6f90 Date: Wed, 21 Oct 2020 15:12:53 -0700 From: Elliott Mitchell To: xen-devel@lists.xenproject.org Cc: Stefano Stabellini , Julien Grall , Volodymyr Babchuk Subject: [PATCH] xen/acpi: Don't fail if SPCR table is absent Message-ID: <20201021221253.GA73207@mattapan.m5p.com> MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=0.0 required=10.0 tests=KHOP_HELO_FCRDNS autolearn=unavailable autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mattapan.m5p.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Absence of a SPCR table likely means the console is a framebuffer. In such case acpi_iomem_deny_access() should NOT fail. Signed-off-by: Elliott Mitchell Acked-by: Julien Grall Reviewed-by: Stefano Stabellini --- xen/arch/arm/acpi/domain_build.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/xen/arch/arm/acpi/domain_build.c b/xen/arch/arm/acpi/domain_bu= ild.c index 1b1cfabb00..bbdc90f92c 100644 --- a/xen/arch/arm/acpi/domain_build.c +++ b/xen/arch/arm/acpi/domain_build.c @@ -42,17 +42,18 @@ static int __init acpi_iomem_deny_access(struct domain = *d) status =3D acpi_get_table(ACPI_SIG_SPCR, 0, (struct acpi_table_header **)&spcr); =20 - if ( ACPI_FAILURE(status) ) + if ( ACPI_SUCCESS(status) ) { - printk("Failed to get SPCR table\n"); - return -EINVAL; + mfn =3D spcr->serial_port.address >> PAGE_SHIFT; + /* Deny MMIO access for UART */ + rc =3D iomem_deny_access(d, mfn, mfn + 1); + if ( rc ) + return rc; + } + else + { + printk("Failed to get SPCR table, Xen console may be unavailable\n= "); } - - mfn =3D spcr->serial_port.address >> PAGE_SHIFT; - /* Deny MMIO access for UART */ - rc =3D iomem_deny_access(d, mfn, mfn + 1); - if ( rc ) - return rc; =20 /* Deny MMIO access for GIC regions */ return gic_iomem_deny_access(d); --=20 2.20.1 --=20 (\___(\___(\______ --=3D> 8-) EHM <=3D-- ______/)___/)___= /) \BS ( | ehem+sigmsg@m5p.com PGP 87145445 | ) / \_CS\ | _____ -O #include O- _____ | / _/ 8A19\___\_|_/58D2 7E3D DDF4 7BA6 <-PGP-> 41D1 B375 37D0 8714\_|_/___/5445