diff options
-rw-r--r-- | arch/x86/include/asm/lguest_hcall.h | 2 | ||||
-rw-r--r-- | arch/x86/lguest/boot.c | 7 | ||||
-rw-r--r-- | drivers/block/virtio_blk.c | 5 | ||||
-rw-r--r-- | drivers/lguest/lg.h | 2 | ||||
-rw-r--r-- | drivers/virtio/virtio_pci.c | 2 | ||||
-rw-r--r-- | include/linux/lguest.h | 2 | ||||
-rw-r--r-- | include/linux/virtio_net.h | 14 |
7 files changed, 23 insertions, 11 deletions
diff --git a/arch/x86/include/asm/lguest_hcall.h b/arch/x86/include/asm/lguest_hcall.h index d31c4a684078..33600a66755f 100644 --- a/arch/x86/include/asm/lguest_hcall.h +++ b/arch/x86/include/asm/lguest_hcall.h | |||
@@ -30,7 +30,7 @@ | |||
30 | #include <asm/hw_irq.h> | 30 | #include <asm/hw_irq.h> |
31 | #include <asm/kvm_para.h> | 31 | #include <asm/kvm_para.h> |
32 | 32 | ||
33 | /*G:031 But first, how does our Guest contact the Host to ask for privileged | 33 | /*G:030 But first, how does our Guest contact the Host to ask for privileged |
34 | * operations? There are two ways: the direct way is to make a "hypercall", | 34 | * operations? There are two ways: the direct way is to make a "hypercall", |
35 | * to make requests of the Host Itself. | 35 | * to make requests of the Host Itself. |
36 | * | 36 | * |
diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c index 7bc65f0f62c4..f2bf1f73d468 100644 --- a/arch/x86/lguest/boot.c +++ b/arch/x86/lguest/boot.c | |||
@@ -379,6 +379,11 @@ static void lguest_cpuid(unsigned int *ax, unsigned int *bx, | |||
379 | 379 | ||
380 | native_cpuid(ax, bx, cx, dx); | 380 | native_cpuid(ax, bx, cx, dx); |
381 | switch (function) { | 381 | switch (function) { |
382 | case 0: /* ID and highest CPUID. Futureproof a little by sticking to | ||
383 | * older ones. */ | ||
384 | if (*ax > 5) | ||
385 | *ax = 5; | ||
386 | break; | ||
382 | case 1: /* Basic feature request. */ | 387 | case 1: /* Basic feature request. */ |
383 | /* We only allow kernel to see SSE3, CMPXCHG16B and SSSE3 */ | 388 | /* We only allow kernel to see SSE3, CMPXCHG16B and SSSE3 */ |
384 | *cx &= 0x00002201; | 389 | *cx &= 0x00002201; |
@@ -1079,7 +1084,7 @@ static unsigned lguest_patch(u8 type, u16 clobber, void *ibuf, | |||
1079 | return insn_len; | 1084 | return insn_len; |
1080 | } | 1085 | } |
1081 | 1086 | ||
1082 | /*G:030 Once we get to lguest_init(), we know we're a Guest. The various | 1087 | /*G:029 Once we get to lguest_init(), we know we're a Guest. The various |
1083 | * pv_ops structures in the kernel provide points for (almost) every routine we | 1088 | * pv_ops structures in the kernel provide points for (almost) every routine we |
1084 | * have to override to avoid privileged instructions. */ | 1089 | * have to override to avoid privileged instructions. */ |
1085 | __init void lguest_init(void) | 1090 | __init void lguest_init(void) |
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 43db3ea15b54..fbeefb68a31f 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c | |||
@@ -213,7 +213,7 @@ static int virtblk_ioctl(struct block_device *bdev, fmode_t mode, | |||
213 | * Only allow the generic SCSI ioctls if the host can support it. | 213 | * Only allow the generic SCSI ioctls if the host can support it. |
214 | */ | 214 | */ |
215 | if (!virtio_has_feature(vblk->vdev, VIRTIO_BLK_F_SCSI)) | 215 | if (!virtio_has_feature(vblk->vdev, VIRTIO_BLK_F_SCSI)) |
216 | return -ENOIOCTLCMD; | 216 | return -ENOTTY; |
217 | 217 | ||
218 | return scsi_cmd_ioctl(disk->queue, disk, mode, cmd, argp); | 218 | return scsi_cmd_ioctl(disk->queue, disk, mode, cmd, argp); |
219 | } | 219 | } |
@@ -360,6 +360,9 @@ static int __devinit virtblk_probe(struct virtio_device *vdev) | |||
360 | blk_queue_max_phys_segments(vblk->disk->queue, vblk->sg_elems-2); | 360 | blk_queue_max_phys_segments(vblk->disk->queue, vblk->sg_elems-2); |
361 | blk_queue_max_hw_segments(vblk->disk->queue, vblk->sg_elems-2); | 361 | blk_queue_max_hw_segments(vblk->disk->queue, vblk->sg_elems-2); |
362 | 362 | ||
363 | /* No need to bounce any requests */ | ||
364 | blk_queue_bounce_limit(vblk->disk->queue, BLK_BOUNCE_ANY); | ||
365 | |||
363 | /* No real sector limit. */ | 366 | /* No real sector limit. */ |
364 | blk_queue_max_sectors(vblk->disk->queue, -1U); | 367 | blk_queue_max_sectors(vblk->disk->queue, -1U); |
365 | 368 | ||
diff --git a/drivers/lguest/lg.h b/drivers/lguest/lg.h index 9c3138265f8e..01c591923793 100644 --- a/drivers/lguest/lg.h +++ b/drivers/lguest/lg.h | |||
@@ -38,8 +38,6 @@ struct lguest_pages | |||
38 | #define CHANGED_GDT_TLS 4 /* Actually a subset of CHANGED_GDT */ | 38 | #define CHANGED_GDT_TLS 4 /* Actually a subset of CHANGED_GDT */ |
39 | #define CHANGED_ALL 3 | 39 | #define CHANGED_ALL 3 |
40 | 40 | ||
41 | struct lguest; | ||
42 | |||
43 | struct lg_cpu { | 41 | struct lg_cpu { |
44 | unsigned int id; | 42 | unsigned int id; |
45 | struct lguest *lg; | 43 | struct lguest *lg; |
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index 193c8f0e5cc5..bcec78ffc765 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c | |||
@@ -669,7 +669,7 @@ static int __init virtio_pci_init(void) | |||
669 | 669 | ||
670 | err = pci_register_driver(&virtio_pci_driver); | 670 | err = pci_register_driver(&virtio_pci_driver); |
671 | if (err) | 671 | if (err) |
672 | device_unregister(virtio_pci_root); | 672 | root_device_unregister(virtio_pci_root); |
673 | 673 | ||
674 | return err; | 674 | return err; |
675 | } | 675 | } |
diff --git a/include/linux/lguest.h b/include/linux/lguest.h index 7bc1440fc473..dbf2479e808e 100644 --- a/include/linux/lguest.h +++ b/include/linux/lguest.h | |||
@@ -11,7 +11,7 @@ | |||
11 | #define LG_CLOCK_MIN_DELTA 100UL | 11 | #define LG_CLOCK_MIN_DELTA 100UL |
12 | #define LG_CLOCK_MAX_DELTA ULONG_MAX | 12 | #define LG_CLOCK_MAX_DELTA ULONG_MAX |
13 | 13 | ||
14 | /*G:032 The second method of communicating with the Host is to via "struct | 14 | /*G:031 The second method of communicating with the Host is to via "struct |
15 | * lguest_data". Once the Guest's initialization hypercall tells the Host where | 15 | * lguest_data". Once the Guest's initialization hypercall tells the Host where |
16 | * this is, the Guest and Host both publish information in it. :*/ | 16 | * this is, the Guest and Host both publish information in it. :*/ |
17 | struct lguest_data | 17 | struct lguest_data |
diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h index cec79adbe3ea..9c543d6ac535 100644 --- a/include/linux/virtio_net.h +++ b/include/linux/virtio_net.h | |||
@@ -27,6 +27,7 @@ | |||
27 | #define VIRTIO_NET_F_CTRL_VQ 17 /* Control channel available */ | 27 | #define VIRTIO_NET_F_CTRL_VQ 17 /* Control channel available */ |
28 | #define VIRTIO_NET_F_CTRL_RX 18 /* Control channel RX mode support */ | 28 | #define VIRTIO_NET_F_CTRL_RX 18 /* Control channel RX mode support */ |
29 | #define VIRTIO_NET_F_CTRL_VLAN 19 /* Control channel VLAN filtering */ | 29 | #define VIRTIO_NET_F_CTRL_VLAN 19 /* Control channel VLAN filtering */ |
30 | #define VIRTIO_NET_F_CTRL_RX_EXTRA 20 /* Extra RX mode control support */ | ||
30 | 31 | ||
31 | #define VIRTIO_NET_S_LINK_UP 1 /* Link is up */ | 32 | #define VIRTIO_NET_S_LINK_UP 1 /* Link is up */ |
32 | 33 | ||
@@ -81,14 +82,19 @@ typedef __u8 virtio_net_ctrl_ack; | |||
81 | #define VIRTIO_NET_ERR 1 | 82 | #define VIRTIO_NET_ERR 1 |
82 | 83 | ||
83 | /* | 84 | /* |
84 | * Control the RX mode, ie. promisucous and allmulti. PROMISC and | 85 | * Control the RX mode, ie. promisucous, allmulti, etc... |
85 | * ALLMULTI commands require an "out" sg entry containing a 1 byte | 86 | * All commands require an "out" sg entry containing a 1 byte |
86 | * state value, zero = disable, non-zero = enable. These commands | 87 | * state value, zero = disable, non-zero = enable. Commands |
87 | * are supported with the VIRTIO_NET_F_CTRL_RX feature. | 88 | * 0 and 1 are supported with the VIRTIO_NET_F_CTRL_RX feature. |
89 | * Commands 2-5 are added with VIRTIO_NET_F_CTRL_RX_EXTRA. | ||
88 | */ | 90 | */ |
89 | #define VIRTIO_NET_CTRL_RX 0 | 91 | #define VIRTIO_NET_CTRL_RX 0 |
90 | #define VIRTIO_NET_CTRL_RX_PROMISC 0 | 92 | #define VIRTIO_NET_CTRL_RX_PROMISC 0 |
91 | #define VIRTIO_NET_CTRL_RX_ALLMULTI 1 | 93 | #define VIRTIO_NET_CTRL_RX_ALLMULTI 1 |
94 | #define VIRTIO_NET_CTRL_RX_ALLUNI 2 | ||
95 | #define VIRTIO_NET_CTRL_RX_NOMULTI 3 | ||
96 | #define VIRTIO_NET_CTRL_RX_NOUNI 4 | ||
97 | #define VIRTIO_NET_CTRL_RX_NOBCAST 5 | ||
92 | 98 | ||
93 | /* | 99 | /* |
94 | * Control the MAC filter table. | 100 | * Control the MAC filter table. |