Commit df1b57fe authored by Michael S. Tsirkin's avatar Michael S. Tsirkin

virtio_balloon: add legacy_only flag

We have no plans to support virtio 1.0 in balloon driver.  Add an
explicit flag to mark it legacy only.

This will be used by follow-up patches.
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>


parent 1f0f9106
...@@ -518,6 +518,7 @@ static unsigned int features[] = { ...@@ -518,6 +518,7 @@ static unsigned int features[] = {
}; };
static struct virtio_driver virtio_balloon_driver = { static struct virtio_driver virtio_balloon_driver = {
.legacy_only = true,
.feature_table = features, .feature_table = features,
.feature_table_size = ARRAY_SIZE(features), .feature_table_size = ARRAY_SIZE(features),
.driver.name = KBUILD_MODNAME, .driver.name = KBUILD_MODNAME,
......
...@@ -132,6 +132,7 @@ int virtio_device_restore(struct virtio_device *dev); ...@@ -132,6 +132,7 @@ int virtio_device_restore(struct virtio_device *dev);
* @feature_table_size: number of entries in the feature table array. * @feature_table_size: number of entries in the feature table array.
* @feature_table_legacy: same as feature_table but when working in legacy mode. * @feature_table_legacy: same as feature_table but when working in legacy mode.
* @feature_table_size_legacy: number of entries in feature table legacy array. * @feature_table_size_legacy: number of entries in feature table legacy array.
* @legacy_only: driver does not support virtio 1.0.
* @probe: the function to call when a device is found. Returns 0 or -errno. * @probe: the function to call when a device is found. Returns 0 or -errno.
* @remove: the function to call when a device is removed. * @remove: the function to call when a device is removed.
* @config_changed: optional function to call when the device configuration * @config_changed: optional function to call when the device configuration
...@@ -144,6 +145,7 @@ struct virtio_driver { ...@@ -144,6 +145,7 @@ struct virtio_driver {
unsigned int feature_table_size; unsigned int feature_table_size;
const unsigned int *feature_table_legacy; const unsigned int *feature_table_legacy;
unsigned int feature_table_size_legacy; unsigned int feature_table_size_legacy;
bool legacy_only;
int (*probe)(struct virtio_device *dev); int (*probe)(struct virtio_device *dev);
void (*scan)(struct virtio_device *dev); void (*scan)(struct virtio_device *dev);
void (*remove)(struct virtio_device *dev); void (*remove)(struct virtio_device *dev);
......
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