Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp22329imw; Mon, 4 Jul 2022 04:38:22 -0700 (PDT) X-Google-Smtp-Source: AGRyM1upBVe9AOtDHE3lB30KaRD2BtWMsQcmBnYr0u3L7l3AYnfSt1IqUJ4nj7GTTz/jYAuVf1/n X-Received: by 2002:a63:6888:0:b0:3fe:49fc:3be3 with SMTP id d130-20020a636888000000b003fe49fc3be3mr24115623pgc.182.1656934702543; Mon, 04 Jul 2022 04:38:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656934702; cv=none; d=google.com; s=arc-20160816; b=L6mLSuPxD6DqxM2BrbESmbyoj8NOxYiK517ysIJthnoVgLFzIFx10wRNe4fm2RTBA7 r8qfO4W9hF2fLPBqReu7/uQk7ckpsBV8TzgrED6R4SfBLt250WX5je6887gzzKKcMIz8 2QFC1wV96v329V/A7Fb0uqOxTF+ibE6/q2dGyxJIG5VEW7YoDPi6af+ZKkxVy9X/8W79 D/nMqUCjlp1DpqCBm/2QdJkdBiJPu26/GNPPFcJs0VQUcg2cJ0rITPF4pRQsJ4qt9dek ZlTHQ8bDInPlgJcNLTQYMV6FpLqSujZ5VX54ROpnmIIhRX9+XONRvKIq2GMSxjeJHWjl CoqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=WXCB1pj0dM4V9DP3Ldu8djDt/2MhWv/5hdqLopmyOD0=; b=yGDB5xnLWxMFz0YVEiMGGl7aidGglXiMS1cpAxS5FRVtM00AvHCMolM5Q3/uHk5Tgg UiKIQgQVOjFr6LQeqtLljspF2SL7zcc/FuofO0lcODPRrOyBq1TEZsNRAuSGuCLJ1yu3 opU+aSXR+SbcT+Nutgyh5hzijqwHe1OvQ8Wq13tfxWDc/0RMGD+b6rsENvMD0thtlwH5 JwPe+DICnqzfEyPwKSCcRiP+uYry57hWi0ammxIic/7y6Ep+x7bkDjfhVHivZIyu2mpq VsHDs7NrKrVtg/xq5MG5SYDlOR5BLOXzeDvD600Tr+5BGiFl/qJ463kk44v6dhGvEYWp 39jw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id iy20-20020a170903131400b0016be703438fsi1960081plb.543.2022.07.04.04.38.10; Mon, 04 Jul 2022 04:38:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233890AbiGDLRu (ORCPT + 99 others); Mon, 4 Jul 2022 07:17:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231339AbiGDLRu (ORCPT ); Mon, 4 Jul 2022 07:17:50 -0400 X-Greylist: delayed 138 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 04 Jul 2022 04:17:49 PDT Received: from p3plsmtpa09-03.prod.phx3.secureserver.net (p3plsmtpa09-03.prod.phx3.secureserver.net [173.201.193.232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EBD6F58B for ; Mon, 4 Jul 2022 04:17:49 -0700 (PDT) Received: from localhost ([82.17.115.212]) by :SMTPAUTH: with ESMTPA id 8K37oHcGkhLDC8K38oUuWd; Mon, 04 Jul 2022 04:15:31 -0700 X-CMAE-Analysis: v=2.4 cv=LfT5VhTi c=1 sm=1 tr=0 ts=62c2cbd3 a=9gipVNR6X1CoIeAWHwLoWw==:117 a=9gipVNR6X1CoIeAWHwLoWw==:17 a=IkcTkHD0fZMA:10 a=GPr1rYa5ujshtZzWUQMA:9 a=QEXdDO2ut3YA:10 X-SECURESERVER-ACCT: atomlin@atomlin.com Date: Mon, 4 Jul 2022 12:15:29 +0100 From: Aaron Tomlin To: Robin Murphy Cc: Aaron Tomlin , tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, joro@8bytes.org, will@kernel.org, dwmw2@infradead.org, baolu.lu@linux.intel.com, hpa@zytor.com, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 3/3] iommu/vt-d: Show region type in arch_rmrr_sanity_check() Message-ID: <20220704111529.6pdlueeu2beo64ha@ava.usersys.com> References: <20220611204859.234975-1-atomlin@redhat.com> <20220611204859.234975-3-atomlin@redhat.com> <99632b76-3039-34a5-7615-b25e716e2621@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <99632b76-3039-34a5-7615-b25e716e2621@arm.com> X-CMAE-Envelope: MS4xfKPF35BvRczXniDFtllcvlL8GhpE6MwRfhiS3R7g0tcxEjsnemJKc93ZWS+yS/omPfyX3CX2HKI+uDxSceFX+Nymms5bGNwU1w6647Ll8b6U4mN+wAt5 4C4D+z8FELgriEIm0J8Df1u8+3sw8RwqjLMbn7thchaJjGza86QkjqnGbualmIbbXquClhk0t0nHPscnfQOqQVksv7v9Ti4RfBMAc+1xpu4HedaeIjt3o4vO IfjTwebIVCsWeKWM4H5WWOWrDlMoiZ/JeVCvH8IUiIvtATkOZ6HOLvtdYxljGjwpmr91xARF0V2Uz/Sgemv4lGQkX+6nO8OiDu/gNuiN6CNfVJC4WXXVcTe0 cvcr555yOPnn/Ny4V65OksAFEuodgPIEm0d23BL5RFzwLezBbT9KYbpSGQCwdQNOfglAFCf8AZqv4wsStB0oI2ZDTmWRsYBhEqqOT7txveTerZ/bU2+TE133 leWa1SUfK8twe3NM7u5zEJoiRFHo5RLytQYAX9mVbm86ibl7psl+88ZmKsnA74mMPyChHM0+nkAKEIs55UOj8emQPKFnHI4Bi1yMmg== X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 2022-07-04 11:39 +0100, Robin Murphy wrote: > On 2022-06-11 21:48, Aaron Tomlin wrote: > > This patch will attempt to describe the region type in the event > > that a given RMRR entry is not within a reserved region. > > Hmm, is this useful information for the user? You'd hope the firmware vendor > knows the memory map already, but either way, is it particularly likely that > anyone would be noticing and caring about this warning in a context where > they couldn't just scroll further up the log and cross-reference the full > memory map listing? If so, it might be worth clarifying what that use-case > is, since as it stands there doesn't seem to be much justification for the > "why" here. Hi Robin, Thanks for looking at this. Honestly, the only justification for the modification/or proposed changes is to have more insight when this statement is provided in total isolation and the RAM map listing (as per e820__print_table()) is no longer available to reference. > > diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c > > index 95b994cf80cd..165e9a444bb9 100644 > > --- a/arch/x86/kernel/e820.c > > +++ b/arch/x86/kernel/e820.c > > @@ -1073,7 +1073,7 @@ void __init e820__finish_early_params(void) > > const char *__init e820_type_to_string(struct e820_entry *entry) > > { > > - switch (entry->type) { > > + switch (entry && entry->type) { > > Have you tested this for anything other than E820_TYPE_RAM? I think > sufficiently up-to-date compilers should warn you here anyway. I have not. Kind regards, -- Aaron Tomlin