dm: gsi: Convert print output to acrn-dm logger

Unifies the logs to pr_* interfaces instead of printf for better log management.

Tracked-On: #5267
Signed-off-by: Sun Peng <peng.p.sun@intel.com>
Reviewed-by: Chi Mingqiang <mingqiang.chi@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
This commit is contained in:
Sun Peng 2020-08-27 13:55:56 +00:00 committed by wenlingz
parent fa668ac010
commit 549e3c74b6

View File

@ -42,7 +42,7 @@ update_gsi_sharing_info(char *dev_name, uint8_t gsi)
continue; continue;
if (group->shared_dev_num >= MAX_DEV_PER_GSI) { if (group->shared_dev_num >= MAX_DEV_PER_GSI) {
warnx("max %d devices share one GSI", MAX_DEV_PER_GSI); pr_err("max %d devices share one GSI", MAX_DEV_PER_GSI);
return -EINVAL; return -EINVAL;
} }
@ -53,7 +53,7 @@ update_gsi_sharing_info(char *dev_name, uint8_t gsi)
if (gsi_shared == 0) { if (gsi_shared == 0) {
group = calloc(1, sizeof(struct gsi_sharing_group)); group = calloc(1, sizeof(struct gsi_sharing_group));
if (!group) { if (!group) {
warnx("%s: calloc FAIL!", __func__); pr_err("%s: calloc FAIL!", __func__);
return -ENOMEM; return -ENOMEM;
} }
@ -213,12 +213,12 @@ check_gsi_sharing_violation(void)
continue; continue;
/* reject the passthrough since gsi sharing violation occurs */ /* reject the passthrough since gsi sharing violation occurs */
warnx("GSI SHARING VIOLATION!"); pr_err("GSI SHARING VIOLATION!");
warnx("following physical devices are sharing same GSI, please " pr_err("following physical devices are sharing same GSI, please "
"assign them to same VM to avoid physical GSI sharing " "assign them to same VM to avoid physical GSI sharing "
"between multiple VMs"); "between multiple VMs");
for (i = 0; i < (group->shared_dev_num); i++) { for (i = 0; i < (group->shared_dev_num); i++) {
warnx("device %s \t assigned_to_this_vm %d", pr_info("device %s \t assigned_to_this_vm %d",
group->dev[i].dev_name, group->dev[i].dev_name,
group->dev[i].assigned_to_this_vm); group->dev[i].assigned_to_this_vm);
} }