All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark McLoughlin <markmc@redhat.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: virtualization@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org, Avi Kivity <avi@redhat.com>,
	Mark McLoughlin <markmc@redhat.com>
Subject: [PATCH 1/3] virtio: teach virtio_has_feature() about transport features
Date: Thu, 18 Dec 2008 17:10:20 +0000	[thread overview]
Message-ID: <1229620222-22216-2-git-send-email-markmc@redhat.com> (raw)
In-Reply-To: <1229620222-22216-1-git-send-email-markmc@redhat.com>

Drivers don't add transport features to their table, so we
shouldn't check these with virtio_check_driver_offered_feature().

We could perhaps add an ->offered_feature() virtio_config_op,
but that perhaps that would be overkill for a consitency check
like this.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
---
 include/linux/virtio_config.h |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
index bf8ec28..e4ba694 100644
--- a/include/linux/virtio_config.h
+++ b/include/linux/virtio_config.h
@@ -99,7 +99,9 @@ static inline bool virtio_has_feature(const struct virtio_device *vdev,
 	if (__builtin_constant_p(fbit))
 		BUILD_BUG_ON(fbit >= 32);
 
-	virtio_check_driver_offered_feature(vdev, fbit);
+	if (fbit < VIRTIO_TRANSPORT_F_START)
+		virtio_check_driver_offered_feature(vdev, fbit);
+
 	return test_bit(fbit, vdev->features);
 }
 
-- 
1.6.0.5


  reply	other threads:[~2008-12-18 17:12 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-18 17:10 [PATCH 0/3] virtio: indirect ring entries Mark McLoughlin
2008-12-18 17:10 ` Mark McLoughlin [this message]
2008-12-18 17:10   ` [PATCH 2/3] virtio: indirect ring entries (VIRTIO_RING_F_INDIRECT_DESC) Mark McLoughlin
2008-12-18 17:10     ` [PATCH 3/3] lguest: add support for indirect ring entries Mark McLoughlin
2008-12-20 11:38     ` [PATCH 2/3] virtio: indirect ring entries (VIRTIO_RING_F_INDIRECT_DESC) Ingo Oeser
2008-12-20 11:38     ` Ingo Oeser
2008-12-22 10:17       ` Mark McLoughlin
2008-12-22 10:17       ` Mark McLoughlin
2009-04-21 12:59     ` Mark McLoughlin
2009-04-27  7:43       ` Dor Laor
2009-05-04  2:19         ` Rusty Russell
2009-05-11 17:10           ` Mark McLoughlin
2009-05-11 17:11             ` [PATCH 1/3] virtio: teach virtio_has_feature() about transport features Mark McLoughlin
2009-05-11 17:11               ` [PATCH 2/3] virtio: indirect ring entries (VIRTIO_RING_F_INDIRECT_DESC) Mark McLoughlin
2009-05-11 17:11                 ` [PATCH 3/3] lguest: add support for indirect ring entries Mark McLoughlin
2009-05-12 14:23             ` [PATCH 2/3] virtio: indirect ring entries (VIRTIO_RING_F_INDIRECT_DESC) Rusty Russell
2009-05-12 14:23             ` Rusty Russell
2009-05-17  2:04             ` Rusty Russell
2009-05-17  2:04             ` Rusty Russell
2009-05-17  6:27               ` Avi Kivity
2009-05-17  6:27               ` Avi Kivity
2009-05-17 14:16                 ` Rusty Russell
2009-05-17 14:16                 ` Rusty Russell
2009-05-17 15:05                   ` Avi Kivity
2009-05-19  8:15                     ` Rusty Russell
2009-05-19  8:15                     ` Rusty Russell
2009-05-17 15:05                   ` Avi Kivity
2009-05-11 17:10           ` Mark McLoughlin
2009-04-21 12:59     ` Mark McLoughlin

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=1229620222-22216-2-git-send-email-markmc@redhat.com \
    --to=markmc@redhat.com \
    --cc=avi@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    --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.