From: Rusty Russell <rusty@rustcorp.com.au>
To: linux-kernel@vger.kernel.org
Cc: virtualization@lists.linux-foundation.org,
john cooper <john.cooper@redhat.com>
Subject: [PATCH 4/4] lguest: GET_ID "support"
Date: Wed, 30 Sep 2009 02:48:54 +0930 [thread overview]
Message-ID: <200909300248.55485.rusty@rustcorp.com.au> (raw)
We advertise the feature for testing, then promptly fail when the guest
uses it.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
---
Documentation/lguest/lguest.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/Documentation/lguest/lguest.c b/Documentation/lguest/lguest.c
--- a/Documentation/lguest/lguest.c
+++ b/Documentation/lguest/lguest.c
@@ -1654,7 +1654,11 @@ static void blk_request(struct virtqueue
* In general the virtio block driver is allowed to try SCSI commands.
* It'd be nice if we supported eject, for example, but we don't.
*/
- if (out->type & VIRTIO_BLK_T_SCSI_CMD) {
+ if (out->type == VIRTIO_BLK_T_GET_ID) {
+ fprintf(stderr, "GET ID command unsupported\n");
+ *in = VIRTIO_BLK_S_UNSUPP;
+ wlen = sizeof(*in);
+ } else if (out->type & VIRTIO_BLK_T_SCSI_CMD) {
fprintf(stderr, "Scsi commands unsupported\n");
*in = VIRTIO_BLK_S_UNSUPP;
wlen = sizeof(*in);
@@ -1751,6 +1755,9 @@ static void setup_block_file(const char
add_feature(dev, VIRTIO_BLK_F_SEG_MAX);
conf.seg_max = cpu_to_le32(VIRTQUEUE_NUM - 2);
+ /* We have GET_ID, at least for testing! */
+ add_feature(dev, VIRTIO_BLK_F_GET_ID);
+
/*
* We only have 8 bits of configuration space for each device. But a
* new feature for virtio_blk added a 1k 'identify' field to struct
reply other threads:[~2009-09-29 17:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200909300248.55485.rusty@rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=john.cooper@redhat.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox