2020-02-03 10:46:44

by Chen, Rong A

[permalink] [raw]
Subject: [iommu/vt] c9ac3b69cf: WARNING:at_drivers/iommu/intel-iommu.c:#dmar_parse_one_rmrr

FYI, we noticed the following commit (built with gcc-7):

commit: c9ac3b69cfdbc46a0504fa353b5126827e4b0bdb ("iommu/vt-d: skip RMRR entries that fail the sanity check")
https://github.com/0day-ci/linux/commits/Barret-Rhoden/iommu-vt-d-bad-RMRR-workarounds/20200109-051817

in testcase: kernel_selftests
with following parameters:

group: kselftests-02
ucode: 0xd6

test-description: The kernel contains a set of "self tests" under the tools/testing/selftests/ directory. These are intended to be small unit tests to exercise individual code paths in the kernel.
test-url: https://www.kernel.org/doc/Documentation/kselftest.txt


on test machine: 8 threads Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz with 16G memory

caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):


If you fix the issue, kindly add following tag
Reported-by: kernel test robot <[email protected]>


kern :warn : [ 2.958337] WARNING: CPU: 0 PID: 0 at drivers/iommu/intel-iommu.c:4331 dmar_parse_one_rmrr+0xa5/0x12c
kern :warn : [ 2.969629] Modules linked in:
kern :warn : [ 2.972830] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.5.0-rc2-00007-gc9ac3b69cfdbc #1
kern :warn : [ 2.981058] Hardware name: Dell Inc. OptiPlex 7040/0Y7WYT, BIOS 1.2.8 01/26/2016
kern :warn : [ 2.988673] RIP: 0010:dmar_parse_one_rmrr+0xa5/0x12c
kern :warn : [ 2.993799] Code: bf 01 00 00 00 48 89 c3 e8 04 c9 b4 fe 48 8b 55 10 48 8b 75 08 4d 89 e1 49 89 d8 48 89 c1 48 c7 c7 e8 b6 39 82 e8 c7 c4 38 fe <0f> 0b 31 d2 eb 7a 48 89 68 10 48 8b 45 08 48 8d 53 30 0f b7 75 02
kern :warn : [ 3.012920] RSP: 0000:ffffffff82603de0 EFLAGS: 00010286
kern :warn : [ 3.018310] RAX: 0000000000000000 RBX: ffffffff8340000c RCX: ffffffff82667ac8
kern :warn : [ 3.025628] RDX: 0000000000000001 RSI: 0000000000000082 RDI: 0000000000000246
kern :warn : [ 3.032943] RBP: ffffc9000001b3a8 R08: 00000000000000ec R09: 0736073707350739
kern :warn : [ 3.040259] R10: ffffffff82dee824 R11: 072007200720075b R12: ffffffff820fa3fc
kern :warn : [ 3.047575] R13: ffffc9000001b3c8 R14: ffffffff82603e38 R15: 0000000000000000
kern :warn : [ 3.054892] FS: 0000000000000000(0000) GS:ffff888459c00000(0000) knlGS:0000000000000000
kern :warn : [ 3.063203] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
kern :warn : [ 3.069117] CR2: ffff888459401000 CR3: 000000045860a001 CR4: 00000000000606b0
kern :warn : [ 3.076431] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
kern :warn : [ 3.083747] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
kern :warn : [ 3.091065] Call Trace:
kern :warn : [ 3.093654] dmar_walk_remapping_entries+0xa2/0x1d0
kern :warn : [ 3.098696] dmar_table_init+0xe0/0x170
kern :warn : [ 3.102682] ? dmar_free_dev_scope+0x70/0x70
kern :warn : [ 3.107108] ? init_dmars+0xa04/0xa04
kern :warn : [ 3.110923] ? iommu_flush_write_buffer+0x20/0x20
kern :warn : [ 3.115786] ? get_order+0x11/0x11
kern :warn : [ 3.119343] ? amd_iommu_apply_ivrs_quirks+0x11/0x11
kern :warn : [ 3.124481] intel_prepare_irq_remapping+0x3a/0x224
kern :warn : [ 3.129528] irq_remapping_prepare+0x1d/0x5f
kern :warn : [ 3.133965] enable_IR_x2apic+0x21/0x17e
kern :warn : [ 3.138045] default_setup_apic_routing+0x12/0x6f
kern :warn : [ 3.142918] apic_intr_mode_init+0x1a1/0x1f1
kern :warn : [ 3.147350] x86_late_time_init+0x17/0x1c
kern :warn : [ 3.151515] start_kernel+0x457/0x515
kern :warn : [ 3.155330] secondary_startup_64+0xb6/0xc0
kern :warn : [ 3.159670] ---[ end trace ba9f2cc9dcf19f0e ]---


To reproduce:

git clone https://github.com/intel/lkp-tests.git
cd lkp-tests
bin/lkp install job.yaml # job file is attached in this email
bin/lkp run job.yaml



Thanks,
Rong Chen


Attachments:
(No filename) (3.86 kB)
config-5.5.0-rc2-00007-gc9ac3b69cfdbc (205.69 kB)
job-script (7.66 kB)
kmsg.xz (58.75 kB)
kernel_selftests (127.88 kB)
job.yaml (6.88 kB)
reproduce (353.00 B)
Download all attachments

2020-02-03 18:03:11

by Barret Rhoden

[permalink] [raw]
Subject: Re: [iommu/vt] c9ac3b69cf: WARNING:at_drivers/iommu/intel-iommu.c:#dmar_parse_one_rmrr

Hi -

On 2/3/20 4:10 AM, kernel test robot wrote:
> FYI, we noticed the following commit (built with gcc-7):
>
> commit: c9ac3b69cfdbc46a0504fa353b5126827e4b0bdb ("iommu/vt-d: skip RMRR entries that fail the sanity check")
> https://github.com/0day-ci/linux/commits/Barret-Rhoden/iommu-vt-d-bad-RMRR-workarounds/20200109-051817

This looks like your system's firmware might be buggy, which is what the
warning is all about.

From the kmesg:

> kern :info : [ 2.912758] DMAR: RMRR base: 0x0000009f271000 end: 0x0000009f290fff
> kern :info : [ 2.919226] DMAR: RMRR base: 0x000000a1800000 end: 0x000000a3ffffff
> kern :err : [ 2.925692] DMAR: [Firmware Bug]: No firmware reserved region can cover this RMRR [0x00000000a1800000-0x00000000a3ffffff], contact BIOS vendor for fixes
> kern :warn : [ 2.939636] ------------[ cut here ]------------
> kern :warn : [ 2.944436] Your BIOS is broken; bad RMRR [0x00000000a1800000-0x00000000a3ffffff]
> BIOS vendor: Dell Inc.; Ver: 1.2.8; Product Version:


The e820 map has this:

> kern :info : [ 0.000000] BIOS-e820: [mem 0x00000000a0000000-0x00000000a00fffff] reserved
> kern :info : [ 0.000000] BIOS-e820: [mem 0x00000000f8000000-0x00000000fbffffff] reserved
> kern :info : [ 0.000000] BIOS-e820: [mem 0x00000000fe000000-0x00000000fe010fff] reserved

The region 0xa1800000-0xa3ffffff isn't explicitly reserved (it's not
listed at all), which the IOMMU-folk say is the fault of the firmware.

My commit made it so that it merely spits out a warning, instead of
failing to use the IOMMU at all.

Thanks,

Barret