mtrr: set severity to critical for incorrect attributes
diff mbox series

Message ID 20190522185547.26577-1-alex.hung@canonical.com
State Accepted
Headers show
Series
  • mtrr: set severity to critical for incorrect attributes
Related show

Commit Message

Alex Hung May 22, 2019, 6:55 p.m. UTC
The lpss device driver crashes OS when its PCI BAR ranges are set to
write-combining in MTRR. The errors was caught as below, but they were
medium failures and ignored. Therefore, change it to critical.

Medium failures: 3
 mtrr: Memory range 0x4010000000 to 0x4010000fff (0000:00:15.0) has incorrect attribute Write-Combining.
 mtrr: Memory range 0x4010001000 to 0x4010001fff (0000:00:15.1) has incorrect attribute Write-Combining.
 mtrr: Memory range 0x4010002000 to 0x4010002fff (0000:00:1e.0) has incorrect attribute Write-Combining.

Signed-off-by: Alex Hung <alex.hung@canonical.com>
---
 src/bios/mtrr/mtrr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ivan May 31, 2019, 7:04 a.m. UTC | #1
On 5/23/19 2:55 AM, Alex Hung wrote:
> The lpss device driver crashes OS when its PCI BAR ranges are set to
> write-combining in MTRR. The errors was caught as below, but they were
> medium failures and ignored. Therefore, change it to critical.
>
> Medium failures: 3
>  mtrr: Memory range 0x4010000000 to 0x4010000fff (0000:00:15.0) has incorrect attribute Write-Combining.
>  mtrr: Memory range 0x4010001000 to 0x4010001fff (0000:00:15.1) has incorrect attribute Write-Combining.
>  mtrr: Memory range 0x4010002000 to 0x4010002fff (0000:00:1e.0) has incorrect attribute Write-Combining.
>
> Signed-off-by: Alex Hung <alex.hung@canonical.com>
> ---
>  src/bios/mtrr/mtrr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/bios/mtrr/mtrr.c b/src/bios/mtrr/mtrr.c
> index 54b0d852..6aa11a24 100644
> --- a/src/bios/mtrr/mtrr.c
> +++ b/src/bios/mtrr/mtrr.c
> @@ -495,7 +495,7 @@ static int validate_iomem(fwts_framework *fw)
>  
>  		if ((type & type_mustnot) != 0) {
>  			failed++;
> -			fwts_failed(fw, LOG_LEVEL_MEDIUM,
> +			fwts_failed(fw, LOG_LEVEL_CRITICAL,
>  				"MTRRIncorrectAttr",
>  				"Memory range 0x%" PRIx64 " to 0x%" PRIx64 " (%s) "
>  				"has incorrect attribute%s.",

Acked-by: Ivan Hu <ivan.hu@canonical.com>
Colin Ian King June 10, 2019, 8:13 a.m. UTC | #2
On 22/05/2019 19:55, Alex Hung wrote:
> The lpss device driver crashes OS when its PCI BAR ranges are set to
> write-combining in MTRR. The errors was caught as below, but they were
> medium failures and ignored. Therefore, change it to critical.
> 
> Medium failures: 3
>  mtrr: Memory range 0x4010000000 to 0x4010000fff (0000:00:15.0) has incorrect attribute Write-Combining.
>  mtrr: Memory range 0x4010001000 to 0x4010001fff (0000:00:15.1) has incorrect attribute Write-Combining.
>  mtrr: Memory range 0x4010002000 to 0x4010002fff (0000:00:1e.0) has incorrect attribute Write-Combining.
> 
> Signed-off-by: Alex Hung <alex.hung@canonical.com>
> ---
>  src/bios/mtrr/mtrr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/bios/mtrr/mtrr.c b/src/bios/mtrr/mtrr.c
> index 54b0d852..6aa11a24 100644
> --- a/src/bios/mtrr/mtrr.c
> +++ b/src/bios/mtrr/mtrr.c
> @@ -495,7 +495,7 @@ static int validate_iomem(fwts_framework *fw)
>  
>  		if ((type & type_mustnot) != 0) {
>  			failed++;
> -			fwts_failed(fw, LOG_LEVEL_MEDIUM,
> +			fwts_failed(fw, LOG_LEVEL_CRITICAL,
>  				"MTRRIncorrectAttr",
>  				"Memory range 0x%" PRIx64 " to 0x%" PRIx64 " (%s) "
>  				"has incorrect attribute%s.",
> 

Good idea Alex. Thanks.

Acked-by: Colin Ian King <colin.king@canonical.com>

Patch
diff mbox series

diff --git a/src/bios/mtrr/mtrr.c b/src/bios/mtrr/mtrr.c
index 54b0d852..6aa11a24 100644
--- a/src/bios/mtrr/mtrr.c
+++ b/src/bios/mtrr/mtrr.c
@@ -495,7 +495,7 @@  static int validate_iomem(fwts_framework *fw)
 
 		if ((type & type_mustnot) != 0) {
 			failed++;
-			fwts_failed(fw, LOG_LEVEL_MEDIUM,
+			fwts_failed(fw, LOG_LEVEL_CRITICAL,
 				"MTRRIncorrectAttr",
 				"Memory range 0x%" PRIx64 " to 0x%" PRIx64 " (%s) "
 				"has incorrect attribute%s.",