svn commit: r326156 - head/sys/amd64/vmm/amd

Andriy Gapon avg at FreeBSD.org
Fri Nov 24 11:35:45 UTC 2017


Author: avg
Date: Fri Nov 24 11:35:43 2017
New Revision: 326156
URL: https://svnweb.freebsd.org/changeset/base/326156

Log:
  amd-vi: small improvements to event printing
  
  Ensure that an opening bracket always has a matching closing one.
  Ensure that there is always a new-line at the end of a report line.
  Also, add a space before the printed event flag.
  
  Reviewed by:	anish

Modified:
  head/sys/amd64/vmm/amd/amdvi_hw.c

Modified: head/sys/amd64/vmm/amd/amdvi_hw.c
==============================================================================
--- head/sys/amd64/vmm/amd/amdvi_hw.c	Fri Nov 24 11:34:46 2017	(r326155)
+++ head/sys/amd64/vmm/amd/amdvi_hw.c	Fri Nov 24 11:35:43 2017	(r326156)
@@ -582,7 +582,7 @@ amdvi_decode_evt_flag(uint16_t flag)
 {
 
 	flag &= AMDVI_EVENT_FLAG_MASK;
-	printf("0x%b]\n", flag,
+	printf(" 0x%b]\n", flag,
 		"\020"
 		"\001GN"
 		"\002NX"
@@ -692,7 +692,7 @@ amdvi_decode_evt(struct amdvi_event *evt)
 	case AMDVI_EVENT_ILLEGAL_CMD:
 		/* FALL THROUGH */
 	case AMDVI_EVENT_CMD_HW_ERROR:
-		printf("\t[%s EVT]", (evt->opcode == AMDVI_EVENT_ILLEGAL_CMD) ?
+		printf("\t[%s EVT]\n", (evt->opcode == AMDVI_EVENT_ILLEGAL_CMD) ?
 		    "ILLEGAL CMD" : "CMD HW ERR");
 		cmd = (struct amdvi_cmd *)PHYS_TO_DMAP(evt->addr);
 		printf("\tCMD opcode= 0x%x 0x%x 0x%x 0x%lx\n",
@@ -700,7 +700,7 @@ amdvi_decode_evt(struct amdvi_event *evt)
 		break;
 
 	case AMDVI_EVENT_IOTLB_TIMEOUT:
-		printf("\t[IOTLB_INV_TIMEOUT devid:0x%x addr:0x%lx",
+		printf("\t[IOTLB_INV_TIMEOUT devid:0x%x addr:0x%lx]\n",
 		    evt->devid, evt->addr);
 		break;
 
@@ -716,7 +716,7 @@ amdvi_decode_evt(struct amdvi_event *evt)
 		break;
 
 	default:
-		printf("Unsupported AMD-Vi event:%d", evt->opcode);
+		printf("Unsupported AMD-Vi event:%d\n", evt->opcode);
 	}
 }
 


More information about the svn-src-all mailing list