Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Shannon Nelson and committed by
Michael S. Tsirkin
8efc365b c0a6c5cb

+6 -7
+6 -7
drivers/vdpa/pds/debugfs.c
··· 176 176 { 177 177 struct pds_vdpa_aux *vdpa_aux = seq->private; 178 178 struct vdpa_mgmt_dev *mgmt; 179 + u64 hw_features; 179 180 180 181 seq_printf(seq, "aux_dev: %s\n", 181 182 dev_name(&vdpa_aux->padev->aux_dev.dev)); ··· 184 183 mgmt = &vdpa_aux->vdpa_mdev; 185 184 seq_printf(seq, "max_vqs: %d\n", mgmt->max_supported_vqs); 186 185 seq_printf(seq, "config_attr_mask: %#llx\n", mgmt->config_attr_mask); 187 - seq_printf(seq, "supported_features: %#llx\n", mgmt->supported_features); 188 - print_feature_bits_all(seq, mgmt->supported_features); 186 + hw_features = le64_to_cpu(vdpa_aux->ident.hw_features); 187 + seq_printf(seq, "hw_features: %#llx\n", hw_features); 188 + print_feature_bits_all(seq, hw_features); 189 189 190 190 return 0; 191 191 } ··· 202 200 { 203 201 struct pds_vdpa_device *pdsv = seq->private; 204 202 struct virtio_net_config vc; 205 - u64 driver_features; 206 203 u8 status; 207 204 208 205 memcpy_fromio(&vc, pdsv->vdpa_aux->vd_mdev.device, ··· 224 223 status = vp_modern_get_status(&pdsv->vdpa_aux->vd_mdev); 225 224 seq_printf(seq, "dev_status: %#x\n", status); 226 225 print_status_bits(seq, status); 227 - 228 - driver_features = vp_modern_get_driver_features(&pdsv->vdpa_aux->vd_mdev); 229 - seq_printf(seq, "driver_features: %#llx\n", driver_features); 230 - print_feature_bits_all(seq, driver_features); 226 + seq_printf(seq, "negotiated_features: %#llx\n", pdsv->negotiated_features); 227 + print_feature_bits_all(seq, pdsv->negotiated_features); 231 228 seq_printf(seq, "vdpa_index: %d\n", pdsv->vdpa_index); 232 229 seq_printf(seq, "num_vqs: %d\n", pdsv->num_vqs); 233 230