Commit 8efc365b authored by Shannon Nelson's avatar Shannon Nelson Committed by Michael S. Tsirkin

pds_vdpa: fix up debugfs feature bit printing

Make clearer in debugfs output the difference between the hw
feature bits, the features supported through the driver, and
the features that have been negotiated.
Signed-off-by: default avatarShannon Nelson <shannon.nelson@amd.com>
Message-Id: <20230711042437.69381-6-shannon.nelson@amd.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Acked-by: default avatarJason Wang <jasowang@redhat.com>
parent c0a6c5cb
...@@ -176,6 +176,7 @@ static int identity_show(struct seq_file *seq, void *v) ...@@ -176,6 +176,7 @@ static int identity_show(struct seq_file *seq, void *v)
{ {
struct pds_vdpa_aux *vdpa_aux = seq->private; struct pds_vdpa_aux *vdpa_aux = seq->private;
struct vdpa_mgmt_dev *mgmt; struct vdpa_mgmt_dev *mgmt;
u64 hw_features;
seq_printf(seq, "aux_dev: %s\n", seq_printf(seq, "aux_dev: %s\n",
dev_name(&vdpa_aux->padev->aux_dev.dev)); dev_name(&vdpa_aux->padev->aux_dev.dev));
...@@ -183,8 +184,9 @@ static int identity_show(struct seq_file *seq, void *v) ...@@ -183,8 +184,9 @@ static int identity_show(struct seq_file *seq, void *v)
mgmt = &vdpa_aux->vdpa_mdev; mgmt = &vdpa_aux->vdpa_mdev;
seq_printf(seq, "max_vqs: %d\n", mgmt->max_supported_vqs); seq_printf(seq, "max_vqs: %d\n", mgmt->max_supported_vqs);
seq_printf(seq, "config_attr_mask: %#llx\n", mgmt->config_attr_mask); seq_printf(seq, "config_attr_mask: %#llx\n", mgmt->config_attr_mask);
seq_printf(seq, "supported_features: %#llx\n", mgmt->supported_features); hw_features = le64_to_cpu(vdpa_aux->ident.hw_features);
print_feature_bits_all(seq, mgmt->supported_features); seq_printf(seq, "hw_features: %#llx\n", hw_features);
print_feature_bits_all(seq, hw_features);
return 0; return 0;
} }
...@@ -200,7 +202,6 @@ static int config_show(struct seq_file *seq, void *v) ...@@ -200,7 +202,6 @@ static int config_show(struct seq_file *seq, void *v)
{ {
struct pds_vdpa_device *pdsv = seq->private; struct pds_vdpa_device *pdsv = seq->private;
struct virtio_net_config vc; struct virtio_net_config vc;
u64 driver_features;
u8 status; u8 status;
memcpy_fromio(&vc, pdsv->vdpa_aux->vd_mdev.device, memcpy_fromio(&vc, pdsv->vdpa_aux->vd_mdev.device,
...@@ -223,10 +224,8 @@ static int config_show(struct seq_file *seq, void *v) ...@@ -223,10 +224,8 @@ static int config_show(struct seq_file *seq, void *v)
status = vp_modern_get_status(&pdsv->vdpa_aux->vd_mdev); status = vp_modern_get_status(&pdsv->vdpa_aux->vd_mdev);
seq_printf(seq, "dev_status: %#x\n", status); seq_printf(seq, "dev_status: %#x\n", status);
print_status_bits(seq, status); print_status_bits(seq, status);
seq_printf(seq, "negotiated_features: %#llx\n", pdsv->negotiated_features);
driver_features = vp_modern_get_driver_features(&pdsv->vdpa_aux->vd_mdev); print_feature_bits_all(seq, pdsv->negotiated_features);
seq_printf(seq, "driver_features: %#llx\n", driver_features);
print_feature_bits_all(seq, driver_features);
seq_printf(seq, "vdpa_index: %d\n", pdsv->vdpa_index); seq_printf(seq, "vdpa_index: %d\n", pdsv->vdpa_index);
seq_printf(seq, "num_vqs: %d\n", pdsv->num_vqs); seq_printf(seq, "num_vqs: %d\n", pdsv->num_vqs);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment