[<prev] [next>] [day] [month] [year] [list]
Message-Id: <200909300248.55485.rusty@rustcorp.com.au>
Date: Wed, 30 Sep 2009 02:48:54 +0930
From: Rusty Russell <rusty@...tcorp.com.au>
To: linux-kernel@...r.kernel.org
Cc: virtualization@...ts.linux-foundation.org,
john cooper <john.cooper@...hat.com>
Subject: [PATCH 4/4] lguest: GET_ID "support"
We advertise the feature for testing, then promptly fail when the guest
uses it.
Signed-off-by: Rusty Russell <rusty@...tcorp.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists