Skip to content

Commit 8efc365

Browse files
emuslnmstsirkin
authored andcommitted
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: Shannon Nelson <shannon.nelson@amd.com> Message-Id: <20230711042437.69381-6-shannon.nelson@amd.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com>
1 parent c0a6c5c commit 8efc365

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

drivers/vdpa/pds/debugfs.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -176,15 +176,17 @@ static int identity_show(struct seq_file *seq, void *v)
176176
{
177177
struct pds_vdpa_aux *vdpa_aux = seq->private;
178178
struct vdpa_mgmt_dev *mgmt;
179+
u64 hw_features;
179180

180181
seq_printf(seq, "aux_dev: %s\n",
181182
dev_name(&vdpa_aux->padev->aux_dev.dev));
182183

183184
mgmt = &vdpa_aux->vdpa_mdev;
184185
seq_printf(seq, "max_vqs: %d\n", mgmt->max_supported_vqs);
185186
seq_printf(seq, "config_attr_mask: %#llx\n", mgmt->config_attr_mask);
186-
seq_printf(seq, "supported_features: %#llx\n", mgmt->supported_features);
187-
print_feature_bits_all(seq, mgmt->supported_features);
187+
hw_features = le64_to_cpu(vdpa_aux->ident.hw_features);
188+
seq_printf(seq, "hw_features: %#llx\n", hw_features);
189+
print_feature_bits_all(seq, hw_features);
188190

189191
return 0;
190192
}
@@ -200,7 +202,6 @@ static int config_show(struct seq_file *seq, void *v)
200202
{
201203
struct pds_vdpa_device *pdsv = seq->private;
202204
struct virtio_net_config vc;
203-
u64 driver_features;
204205
u8 status;
205206

206207
memcpy_fromio(&vc, pdsv->vdpa_aux->vd_mdev.device,
@@ -223,10 +224,8 @@ static int config_show(struct seq_file *seq, void *v)
223224
status = vp_modern_get_status(&pdsv->vdpa_aux->vd_mdev);
224225
seq_printf(seq, "dev_status: %#x\n", status);
225226
print_status_bits(seq, status);
226-
227-
driver_features = vp_modern_get_driver_features(&pdsv->vdpa_aux->vd_mdev);
228-
seq_printf(seq, "driver_features: %#llx\n", driver_features);
229-
print_feature_bits_all(seq, driver_features);
227+
seq_printf(seq, "negotiated_features: %#llx\n", pdsv->negotiated_features);
228+
print_feature_bits_all(seq, pdsv->negotiated_features);
230229
seq_printf(seq, "vdpa_index: %d\n", pdsv->vdpa_index);
231230
seq_printf(seq, "num_vqs: %d\n", pdsv->num_vqs);
232231

0 commit comments

Comments
 (0)