|
18 | 18 | #include <linux/vdpa.h>
|
19 | 19 | #include <linux/vhost_iotlb.h>
|
20 | 20 | #include <uapi/linux/vdpa.h>
|
| 21 | +#include <uapi/linux/vhost_types.h> |
21 | 22 |
|
22 | 23 | #include "vdpa_sim.h"
|
23 | 24 |
|
@@ -410,6 +411,11 @@ static u64 vdpasim_get_device_features(struct vdpa_device *vdpa)
|
410 | 411 | return vdpasim->dev_attr.supported_features;
|
411 | 412 | }
|
412 | 413 |
|
| 414 | +static u64 vdpasim_get_backend_features(const struct vdpa_device *vdpa) |
| 415 | +{ |
| 416 | + return BIT_ULL(VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK); |
| 417 | +} |
| 418 | + |
413 | 419 | static int vdpasim_set_driver_features(struct vdpa_device *vdpa, u64 features)
|
414 | 420 | {
|
415 | 421 | struct vdpasim *vdpasim = vdpa_to_sim(vdpa);
|
@@ -733,6 +739,7 @@ static const struct vdpa_config_ops vdpasim_config_ops = {
|
733 | 739 | .get_vq_align = vdpasim_get_vq_align,
|
734 | 740 | .get_vq_group = vdpasim_get_vq_group,
|
735 | 741 | .get_device_features = vdpasim_get_device_features,
|
| 742 | + .get_backend_features = vdpasim_get_backend_features, |
736 | 743 | .set_driver_features = vdpasim_set_driver_features,
|
737 | 744 | .get_driver_features = vdpasim_get_driver_features,
|
738 | 745 | .set_config_cb = vdpasim_set_config_cb,
|
@@ -770,6 +777,7 @@ static const struct vdpa_config_ops vdpasim_batch_config_ops = {
|
770 | 777 | .get_vq_align = vdpasim_get_vq_align,
|
771 | 778 | .get_vq_group = vdpasim_get_vq_group,
|
772 | 779 | .get_device_features = vdpasim_get_device_features,
|
| 780 | + .get_backend_features = vdpasim_get_backend_features, |
773 | 781 | .set_driver_features = vdpasim_set_driver_features,
|
774 | 782 | .get_driver_features = vdpasim_get_driver_features,
|
775 | 783 | .set_config_cb = vdpasim_set_config_cb,
|
|
0 commit comments