From: "Michael S. Tsirkin" <mst@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: linux-api@vger.kernel.org,
David Hildenbrand <dahi@linux.vnet.ibm.com>,
virtualization@lists.linux-foundation.org
Subject: [PATCH RFC 2/2] virtio_balloon: drop legacy_only
Date: Tue, 2 Dec 2014 13:44:08 +0200 [thread overview]
Message-ID: <1417520617-2135-2-git-send-email-mst@redhat.com> (raw)
In-Reply-To: <1417520617-2135-1-git-send-email-mst@redhat.com>
balloon is the only driver using legacy_only ATM.
It turns out, it's easier to just make balloon support virtio 1.0
endian-ness and drop the flag from core.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/linux/virtio.h | 2 --
drivers/virtio/virtio.c | 4 ----
drivers/virtio/virtio_balloon.c | 1 -
3 files changed, 7 deletions(-)
diff --git a/include/linux/virtio.h b/include/linux/virtio.h
index 2bbf626..f70411e 100644
--- a/include/linux/virtio.h
+++ b/include/linux/virtio.h
@@ -132,7 +132,6 @@ int virtio_device_restore(struct virtio_device *dev);
* @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_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.
* @remove: the function to call when a device is removed.
* @config_changed: optional function to call when the device configuration
@@ -145,7 +144,6 @@ struct virtio_driver {
unsigned int feature_table_size;
const unsigned int *feature_table_legacy;
unsigned int feature_table_size_legacy;
- bool legacy_only;
int (*probe)(struct virtio_device *dev);
void (*scan)(struct virtio_device *dev);
void (*remove)(struct virtio_device *dev);
diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c
index fa6b75d..2e836d8 100644
--- a/drivers/virtio/virtio.c
+++ b/drivers/virtio/virtio.c
@@ -197,10 +197,6 @@ static int virtio_dev_probe(struct device *_d)
driver_features_legacy = driver_features;
}
- /* Detect legacy-only drivers and disable VIRTIO_F_VERSION_1. */
- if (drv->legacy_only)
- device_features &= ~(1ULL << VIRTIO_F_VERSION_1);
-
if (device_features & (1ULL << VIRTIO_F_VERSION_1))
dev->features = driver_features & device_features;
else
diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
index 721e32f..fed3709 100644
--- a/drivers/virtio/virtio_balloon.c
+++ b/drivers/virtio/virtio_balloon.c
@@ -518,7 +518,6 @@ static unsigned int features[] = {
};
static struct virtio_driver virtio_balloon_driver = {
- .legacy_only = true,
.feature_table = features,
.feature_table_size = ARRAY_SIZE(features),
.driver.name = KBUILD_MODNAME,
--
MST
WARNING: multiple messages have this Message-ID (diff)
From: "Michael S. Tsirkin" <mst@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: Rusty Russell <rusty@rustcorp.com.au>,
virtualization@lists.linux-foundation.org,
linux-api@vger.kernel.org,
Cornelia Huck <cornelia.huck@de.ibm.com>,
David Hildenbrand <dahi@linux.vnet.ibm.com>
Subject: [PATCH RFC 2/2] virtio_balloon: drop legacy_only
Date: Tue, 2 Dec 2014 13:44:08 +0200 [thread overview]
Message-ID: <1417520617-2135-2-git-send-email-mst@redhat.com> (raw)
In-Reply-To: <1417520617-2135-1-git-send-email-mst@redhat.com>
balloon is the only driver using legacy_only ATM.
It turns out, it's easier to just make balloon support virtio 1.0
endian-ness and drop the flag from core.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/linux/virtio.h | 2 --
drivers/virtio/virtio.c | 4 ----
drivers/virtio/virtio_balloon.c | 1 -
3 files changed, 7 deletions(-)
diff --git a/include/linux/virtio.h b/include/linux/virtio.h
index 2bbf626..f70411e 100644
--- a/include/linux/virtio.h
+++ b/include/linux/virtio.h
@@ -132,7 +132,6 @@ int virtio_device_restore(struct virtio_device *dev);
* @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_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.
* @remove: the function to call when a device is removed.
* @config_changed: optional function to call when the device configuration
@@ -145,7 +144,6 @@ struct virtio_driver {
unsigned int feature_table_size;
const unsigned int *feature_table_legacy;
unsigned int feature_table_size_legacy;
- bool legacy_only;
int (*probe)(struct virtio_device *dev);
void (*scan)(struct virtio_device *dev);
void (*remove)(struct virtio_device *dev);
diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c
index fa6b75d..2e836d8 100644
--- a/drivers/virtio/virtio.c
+++ b/drivers/virtio/virtio.c
@@ -197,10 +197,6 @@ static int virtio_dev_probe(struct device *_d)
driver_features_legacy = driver_features;
}
- /* Detect legacy-only drivers and disable VIRTIO_F_VERSION_1. */
- if (drv->legacy_only)
- device_features &= ~(1ULL << VIRTIO_F_VERSION_1);
-
if (device_features & (1ULL << VIRTIO_F_VERSION_1))
dev->features = driver_features & device_features;
else
diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
index 721e32f..fed3709 100644
--- a/drivers/virtio/virtio_balloon.c
+++ b/drivers/virtio/virtio_balloon.c
@@ -518,7 +518,6 @@ static unsigned int features[] = {
};
static struct virtio_driver virtio_balloon_driver = {
- .legacy_only = true,
.feature_table = features,
.feature_table_size = ARRAY_SIZE(features),
.driver.name = KBUILD_MODNAME,
--
MST
next prev parent reply other threads:[~2014-12-02 11:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-02 11:44 [PATCH RFC 1/2] virtio_balloon: convert to virtio 1.0 endian-ness Michael S. Tsirkin
2014-12-02 11:44 ` Michael S. Tsirkin
2014-12-02 11:44 ` Michael S. Tsirkin [this message]
2014-12-02 11:44 ` [PATCH RFC 2/2] virtio_balloon: drop legacy_only Michael S. Tsirkin
2014-12-02 18:39 ` [PATCH RFC 1/2] virtio_balloon: convert to virtio 1.0 endian-ness Cornelia Huck
[not found] ` <1417520617-2135-1-git-send-email-mst-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-12-02 18:39 ` Cornelia Huck
2014-12-02 18:39 ` Cornelia Huck
2014-12-03 14:02 ` Michael S. Tsirkin
2014-12-03 14:02 ` Michael S. Tsirkin
2014-12-03 14:27 ` Cornelia Huck
2014-12-03 14:27 ` Cornelia Huck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1417520617-2135-2-git-send-email-mst@redhat.com \
--to=mst@redhat.com \
--cc=dahi@linux.vnet.ibm.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=virtualization@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.