Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 301d95c4 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
  virtio_net: Sync header with qemu
  virtio-pci: correctly unregister root device on error
  virtio_blk: ioctl return value fix
  virtio_blk: don't bounce highmem requests
  lguest: restrict CPUID to avoid perf counter wrmsr
  lguest: remove unnecessary forward struct declaration
  lguest: fix journey
parents b983d0de e79f07e2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@
#include <asm/hw_irq.h>
#include <asm/kvm_para.h>

/*G:031 But first, how does our Guest contact the Host to ask for privileged
/*G:030 But first, how does our Guest contact the Host to ask for privileged
 * operations?  There are two ways: the direct way is to make a "hypercall",
 * to make requests of the Host Itself.
 *
+6 −1
Original line number Diff line number Diff line
@@ -379,6 +379,11 @@ static void lguest_cpuid(unsigned int *ax, unsigned int *bx,

	native_cpuid(ax, bx, cx, dx);
	switch (function) {
	case 0: /* ID and highest CPUID.  Futureproof a little by sticking to
		 * older ones. */
		if (*ax > 5)
			*ax = 5;
		break;
	case 1:	/* Basic feature request. */
		/* We only allow kernel to see SSE3, CMPXCHG16B and SSSE3 */
		*cx &= 0x00002201;
@@ -1079,7 +1084,7 @@ static unsigned lguest_patch(u8 type, u16 clobber, void *ibuf,
	return insn_len;
}

/*G:030 Once we get to lguest_init(), we know we're a Guest.  The various
/*G:029 Once we get to lguest_init(), we know we're a Guest.  The various
 * pv_ops structures in the kernel provide points for (almost) every routine we
 * have to override to avoid privileged instructions. */
__init void lguest_init(void)
+4 −1
Original line number Diff line number Diff line
@@ -213,7 +213,7 @@ static int virtblk_ioctl(struct block_device *bdev, fmode_t mode,
	 * Only allow the generic SCSI ioctls if the host can support it.
	 */
	if (!virtio_has_feature(vblk->vdev, VIRTIO_BLK_F_SCSI))
		return -ENOIOCTLCMD;
		return -ENOTTY;

	return scsi_cmd_ioctl(disk->queue, disk, mode, cmd, argp);
}
@@ -360,6 +360,9 @@ static int __devinit virtblk_probe(struct virtio_device *vdev)
	blk_queue_max_phys_segments(vblk->disk->queue, vblk->sg_elems-2);
	blk_queue_max_hw_segments(vblk->disk->queue, vblk->sg_elems-2);

	/* No need to bounce any requests */
	blk_queue_bounce_limit(vblk->disk->queue, BLK_BOUNCE_ANY);

	/* No real sector limit. */
	blk_queue_max_sectors(vblk->disk->queue, -1U);

+0 −2
Original line number Diff line number Diff line
@@ -38,8 +38,6 @@ struct lguest_pages
#define CHANGED_GDT_TLS		4 /* Actually a subset of CHANGED_GDT */
#define CHANGED_ALL	        3

struct lguest;

struct lg_cpu {
	unsigned int id;
	struct lguest *lg;
+1 −1
Original line number Diff line number Diff line
@@ -669,7 +669,7 @@ static int __init virtio_pci_init(void)

	err = pci_register_driver(&virtio_pci_driver);
	if (err)
		device_unregister(virtio_pci_root);
		root_device_unregister(virtio_pci_root);

	return err;
}
Loading