]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
13 years agotools kvm: Fix missing ARCH define on 32-bit in Makefile
Pekka Enberg [Mon, 4 Apr 2011 15:23:47 +0000 (18:23 +0300)]
tools kvm: Fix missing ARCH define on 32-bit in Makefile

Commit daf68ae ("kvm tools: Fix KVM problem on SuSe 2.6.37 kernel") missed a
hunk that's needed on 32 bit x86.

Reported-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm tools: Fix KVM problem on SuSe 2.6.37 kernel
Prasad Joshi [Mon, 4 Apr 2011 15:03:21 +0000 (16:03 +0100)]
kvm tools: Fix KVM problem on SuSe 2.6.37 kernel

Got following errors while compiling the native kvm tool on my supervisor's
machine.

oswaldo@sir61a:~/linux-kvm/tools/kvm> make
In file included from /usr/include/asm/types.h:4,
                 from /usr/include/asm/kvm.h:9,
                 from ../../include/linux/kvm.h:13,
                 from include/kvm/kvm.h:6,
                 from mmio.c:1:
../../include/asm-generic/int-ll64.h:11:29: error: asm/bitsperlong.h: No such file or directory
In file included from /usr/include/asm/types.h:4,
                 from /usr/include/asm/kvm.h:9,
                 from ../../include/linux/kvm.h:13,
                 from include/kvm/kvm.h:6,
                 from main.c:1:
[snip]

../../include/asm-generic/int-ll64.h:11:29: error: asm/bitsperlong.h: No such file or directory
make: *** No rule to make target `8250-serial.d', needed by `kvm'.  Stop.

Following patch adds architecture specific include path to resolve this error.

Signed-off-by: Prasad Joshi <prasadjoshi124@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm tools: add README
Asias He [Sun, 3 Apr 2011 10:50:51 +0000 (18:50 +0800)]
kvm tools: add README

Signed-off-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm tools: Fix required boot protocol version
Pekka Enberg [Sun, 3 Apr 2011 09:42:12 +0000 (12:42 +0300)]
kvm tools: Fix required boot protocol version

Cyrill has an old bzImage that SIGSEGVs when running under KVM because
'cmdline_size' is bogus. Reading Documentation/x86/boot.txt, it turns out
32-bit 'cmdline_size' requires boot protocol 2.06 or later so fix up
BOOT_PROTOCOL_REQUIRED.

Reported-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm tools: Fix E820 map on x86-64
Pekka Enberg [Sun, 3 Apr 2011 08:25:14 +0000 (11:25 +0300)]
kvm tools: Fix E820 map on x86-64

We must not define '-D__x86_64__' for all the code because the BIOS emulation
code is actually real mode 16-bite code. This fixes E820 map regression on
x86-64 caused by commit e227ea5 ("kvm tools: Fix compilation on x86_64").

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm tools: Fix compilation on x86_64
Paul Bolle [Thu, 31 Mar 2011 20:33:02 +0000 (22:33 +0200)]
kvm tools: Fix compilation on x86_64

Compilation on x86_64 failed with:
[...]
In file included from /usr/include/features.h:386:0,
                 from /usr/include/stdint.h:26,
                 from
/usr/lib/gcc/x86_64-redhat-linux/4.5.1/include/stdint.h:3,
                 from include/kvm/e820.h:4,
                 from bios/e820.c:1:
/usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such file
or directory
compilation terminated.
make: *** [bios/bios-rom.bin] Error 1

This is caused by a typo in the Makefile and because gnu/stubs.h (and
friends) expect to see __x86_64__. That's trivial to fix.

Acked-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm tools: Fix large disk images on 32-bit
Pekka Enberg [Thu, 31 Mar 2011 08:50:09 +0000 (11:50 +0300)]
kvm tools: Fix large disk images on 32-bit

Use read()/write() instead of mmap() for virtio block device emulation to
support large disk images on 32-bit.

Reported-and-tested-by: Asias He <asias.hejun@gmail.com>
Tested-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm tools, 8250: Don't set the UART_LSR_OE bit
Pekka Enberg [Thu, 24 Mar 2011 16:56:02 +0000 (18:56 +0200)]
kvm tools, 8250: Don't set the UART_LSR_OE bit

User input is buffered anyway, so it's pointless to set the UART_LSR_OE bit.
Instead, wait for the guest kernel to consume the current input and send a new
character when the guest is ready.

This fixes the following warnings in guest kernels:

[  207.485000] ttyS0: 1 input overrun(s)

Reported-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agotools/kvm: Exit gracefully upon KVM_EXIT_SHUTDOWN
Pekka Enberg [Tue, 22 Mar 2011 19:32:46 +0000 (21:32 +0200)]
tools/kvm: Exit gracefully upon KVM_EXIT_SHUTDOWN

This patch changes the userspace hypervisor to exit gracefully upon
KVM_EXIT_SHUTDOWN which is triggered when guest userspace is shut down.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm,virtio: add scatter-gather support v2
Asias He [Sat, 26 Feb 2011 02:11:52 +0000 (10:11 +0800)]
kvm,virtio: add scatter-gather support v2

The size of the virtqueue(16) was smaller than scatter-gather(128)
which hypervisor tells the guest.  Under some circumstances,
if the guest uses scatter-gather which larger than 16 - 2, kernel panics.
That is why the scatter-gather support v1 breaks Cyrill's kernel boot.

Two descriptors are used as the header and status descriptors.
The remaining descriptors can be used as the real disk data descriptors.
So DISK_SEG_MAX should be VIRTIO_BLK_QUEUE_SIZE - 2.
VIRTIO_BLK_QUEUE_SIZE is 128 and DISK_SEG_MAX is 126 in this patch.

Tested-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm tools: Cleanup virtqueue handling
Pekka Enberg [Sun, 23 Jan 2011 19:21:58 +0000 (21:21 +0200)]
kvm tools: Cleanup virtqueue handling

This patch introduces some virtqueue handling helper functions and converts the
blk virtio device to use them.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm,8250: Fix device initial state
Pekka Enberg [Sun, 23 Jan 2011 09:49:39 +0000 (11:49 +0200)]
kvm,8250: Fix device initial state

This patch fixes 8250 device initial state for registers and IRQ based on what
Qemu does.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm tools: Cleanup termios handling
Pekka Enberg [Tue, 18 Jan 2011 21:05:06 +0000 (23:05 +0200)]
kvm tools: Cleanup termios handling

This patch cleans up the confused termios handling to do what Lguest does.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm: Remove duplicate headers
Pekka Enberg [Sun, 16 Jan 2011 21:09:01 +0000 (23:09 +0200)]
kvm: Remove duplicate headers

We're in the kernel source tree now so remove duplicate headers.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agoRevert "kvm,virtio: add scatter-gather support"
Pekka Enberg [Sun, 16 Jan 2011 21:06:42 +0000 (23:06 +0200)]
Revert "kvm,virtio: add scatter-gather support"

This reverts commit 87a53e99dad8b70decbc4d9744c3d272e51c3ceb.  It breaks
Cyrill's kernel boot.

13 years agovirtio, block: Rename IOPORT_VIRTIO to IOPORT_VIRTIO_BLK
Cyrill Gorcunov [Thu, 13 Jan 2011 16:56:17 +0000 (18:56 +0200)]
virtio, block: Rename IOPORT_VIRTIO to IOPORT_VIRTIO_BLK

Since that is its only purpose, not the whole virtio
stuff.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm,virtio: add scatter-gather support
Asias He [Thu, 13 Jan 2011 11:56:05 +0000 (19:56 +0800)]
kvm,virtio: add scatter-gather support

Publish VIRTIO_BLK_F_SEG_MAX feature to guest.

In disk I/O request, guest can use multiple buffers which are not physicall
contiguousy as the I/O request buffer.

[ penberg@kernel.org: cleanups ]
Signed-off-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm: Cleanup interrupt timer logic
Pekka Enberg [Tue, 11 Jan 2011 21:56:22 +0000 (23:56 +0200)]
kvm: Cleanup interrupt timer logic

This patch moves the interrupt timer logic to kvm.c and cleans it up.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm,serial: Implement 16550A FIFO support
Pekka Enberg [Tue, 11 Jan 2011 18:52:06 +0000 (20:52 +0200)]
kvm,serial: Implement 16550A FIFO support

This patch implements 16550A FIFO support to the serial console emulation
layer. There's still a bug lurking somewhere which the hypervisor in some busy
loop taking up 100% of CPU. However, this patch is a definite improvement over
the previous hacks.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm,8250: Implement missing register emulation
Pekka Enberg [Tue, 11 Jan 2011 15:52:22 +0000 (17:52 +0200)]
kvm,8250: Implement missing register emulation

This patch implements missing register emulation as per "UART register to port
conversion table" here:

  http://www.lammertbies.nl/comm/info/serial-uart.html

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years ago8250-serial: Emulate 8250 behaviour on autoprobing
Cyrill Gorcunov [Tue, 11 Jan 2011 06:08:15 +0000 (08:08 +0200)]
8250-serial: Emulate 8250 behaviour on autoprobing

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm,8250: Cleanup receive emulation
Pekka Enberg [Mon, 10 Jan 2011 22:06:28 +0000 (00:06 +0200)]
kvm,8250: Cleanup receive emulation

This patch cleans up receive emulation by separating the stdin polling and
reading logic from the interrupt logic. The patch also fixes the interrupt
injection code to inject one type of interrupt at a time.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm,8250: Fix ->counter clearing
Pekka Enberg [Mon, 10 Jan 2011 20:20:06 +0000 (22:20 +0200)]
kvm,8250: Fix ->counter clearing

We need to reset the counter to zero before we inject an interrupt to the
guest.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm,8250: Fix "too much work for irq4" problems
Pekka Enberg [Mon, 10 Jan 2011 19:46:37 +0000 (21:46 +0200)]
kvm,8250: Fix "too much work for irq4" problems

This patch fixes the "too much work for irq4" problems caused by the fact that
we never set the UART_IIR_NO_INT flag in the emulation layer. This makes the
interrupt handler in the guest kernel process as much as possible which
triggers a warning.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm,8250: Make ttyS1 and ttyS2 disabled
Pekka Enberg [Mon, 10 Jan 2011 19:21:06 +0000 (21:21 +0200)]
kvm,8250: Make ttyS1 and ttyS2 disabled

This patch fixes the 8250 serial emulation to not have undefined ioports but
rather make them explicitly disabled.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm: Support for more than one serial ttys
Pekka Enberg [Mon, 10 Jan 2011 19:12:03 +0000 (21:12 +0200)]
kvm: Support for more than one serial ttys

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm: Improve 8250 serial console interrupt handling
Pekka Enberg [Mon, 10 Jan 2011 18:28:37 +0000 (20:28 +0200)]
kvm: Improve 8250 serial console interrupt handling

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm: Use disk name for mounting root
Pekka Enberg [Mon, 10 Jan 2011 17:44:50 +0000 (19:44 +0200)]
kvm: Use disk name for mounting root

Use disk name for kernel "root=" parameter rather than the dynamic major and
minor numbers that vary from system to system.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agoMerge branch 'master' of /home/penberg/kvm into kvm/core
Pekka Enberg [Tue, 11 Jan 2011 14:49:41 +0000 (16:49 +0200)]
Merge branch 'master' of /home/penberg/kvm into kvm/core

13 years ago8250-serial: Make transmitter being always ready to send data
Cyrill Gorcunov [Mon, 10 Jan 2011 13:22:27 +0000 (16:22 +0300)]
8250-serial: Make transmitter being always ready to send data

Otherwise it causes kernel to do additional timeout
waiting for THR being empty.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
13 years ago8250-serial: Use linux/serial-reg.h with predefined constants
Cyrill Gorcunov [Mon, 10 Jan 2011 13:20:10 +0000 (16:20 +0300)]
8250-serial: Use linux/serial-reg.h with predefined constants

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
13 years ago8250-serial: Simplify is_readable function
Cyrill Gorcunov [Sun, 9 Jan 2011 23:06:10 +0000 (02:06 +0300)]
8250-serial: Simplify is_readable function

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
13 years agokvm: save/restore std ttys
Cyrill Gorcunov [Sun, 9 Jan 2011 21:30:32 +0000 (00:30 +0300)]
kvm: save/restore std ttys

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
13 years agokvm: Put terminal in canonical mode
Pekka Enberg [Sun, 9 Jan 2011 20:15:04 +0000 (22:15 +0200)]
kvm: Put terminal in canonical mode

As suggested by Ingo Molnar, put terminal in canonical mode. This makes poll()
on stdin to react to keystrokes insted of return key and fixes the double
echo'd character problem for input.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm,8250: Implement serial input support
Pekka Enberg [Sun, 9 Jan 2011 19:26:48 +0000 (21:26 +0200)]
kvm,8250: Implement serial input support

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agomake: Add TAGS, tags targets and tune cscope
Cyrill Gorcunov [Sun, 9 Jan 2011 17:12:43 +0000 (20:12 +0300)]
make: Add TAGS, tags targets and tune cscope

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
13 years agokvm: Use serial console by default
Pekka Enberg [Sun, 9 Jan 2011 16:32:38 +0000 (18:32 +0200)]
kvm: Use serial console by default

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm,8250: Inject interrupts to guest
Pekka Enberg [Sun, 9 Jan 2011 16:28:03 +0000 (18:28 +0200)]
kvm,8250: Inject interrupts to guest

This patch fixes 8250 emulation to inject interrupts to guest so we actually
see what's sent to the serial console.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm: Rename early_printk.c to 8250-serial.c
Pekka Enberg [Sun, 9 Jan 2011 11:02:04 +0000 (13:02 +0200)]
kvm: Rename early_printk.c to 8250-serial.c

The 8250 emulation is no longer there to just support early_printk() so rename
the source file to reflect that.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm: Implement support interrupt injection
Pekka Enberg [Sat, 8 Jan 2011 22:46:07 +0000 (00:46 +0200)]
kvm: Implement support interrupt injection

This patch implement support for injecting interrupts from the userspace
hypervisor to the guest.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm: Add rw to default kernel command line parameters
Asias He [Sun, 9 Jan 2011 08:48:40 +0000 (16:48 +0800)]
kvm: Add rw to default kernel command line parameters

As reported by Asias He, guest kernels mount filesystems as readonly under our
hypervisor:

  without rw:
  [    0.909000] EXT3-fs: mounted filesystem with writeback data mode.
  [    0.909000] VFS: Mounted root (ext3 filesystem) readonly on device 253:1.

  /dev/root on / type ext3 (ro,relatime,errors=continue,data=writeback)

by passing the "rw" kernel parameter, guest kernels are able to mount as
read-write:

  [    0.891000] EXT3 FS on vda1, internal journal
  [    0.891000] EXT3-fs: recovery complete.
  [    0.892000] EXT3-fs: mounted filesystem with writeback data mode.
  [    0.892000] VFS: Mounted root (ext3 filesystem) on device 253:1.

  /dev/root on / type ext3 (rw,relatime,errors=continue,data=writeback)

There's some real problem hiding here but as we've done with other parts of the
kernel (PCI, SMP), just bypass the problem for now.

Signed-off-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm,virtio: do not publish read only feature to guest
Asias He [Sun, 9 Jan 2011 08:48:39 +0000 (16:48 +0800)]
kvm,virtio: do not publish read only feature to guest

We support write operations now.

Signed-off-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm,virtio: move SECTOR_SHIFT and SECTOR_SIZE to disk-image.h
Asias He [Sun, 9 Jan 2011 08:01:40 +0000 (16:01 +0800)]
kvm,virtio: move SECTOR_SHIFT and SECTOR_SIZE to disk-image.h

Suggested-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm,serial: Enable THRI bit in IIR register
Pekka Enberg [Sat, 8 Jan 2011 20:56:25 +0000 (22:56 +0200)]
kvm,serial: Enable THRI bit in IIR register

This patch enables the THRI ("transmission holding register empty") bit in the
IIR register to make sure the guest doesn't think we have data waiting for it.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm: Fix magic numbers in 8250 support
Pekka Enberg [Sat, 8 Jan 2011 20:51:10 +0000 (22:51 +0200)]
kvm: Fix magic numbers in 8250 support

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm: Improve 8250 serial console support
Pekka Enberg [Sat, 8 Jan 2011 17:29:23 +0000 (19:29 +0200)]
kvm: Improve 8250 serial console support

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm: Redirect serial console to stdout, not stderr
Pekka Enberg [Sat, 8 Jan 2011 12:50:32 +0000 (14:50 +0200)]
kvm: Redirect serial console to stdout, not stderr

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm: Implement virtio block device write support
Pekka Enberg [Sat, 8 Jan 2011 12:28:59 +0000 (14:28 +0200)]
kvm: Implement virtio block device write support

This patch implement virtio block device write support. The writes are not
persistent because we map the disk image with MAP_PRIVATE.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm: Kill debug logging from blk-virtio.c
Pekka Enberg [Sat, 8 Jan 2011 11:24:49 +0000 (13:24 +0200)]
kvm: Kill debug logging from blk-virtio.c

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm: Support MSR register for serial console
Pekka Enberg [Sat, 8 Jan 2011 11:20:56 +0000 (13:20 +0200)]
kvm: Support MSR register for serial console

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm: Fix virtio block device support some more
Pekka Enberg [Sat, 8 Jan 2011 10:06:47 +0000 (12:06 +0200)]
kvm: Fix virtio block device support some more

This patch fixes the following issues in virtio block device support:

- Handle all requests in the virtqueue before signaling an interrupt.

- Initialize ->used vring elements properly.

- Handle non-read requests by injecting an I/O error to the guest.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm: Fix virtqueue ring index check
Pekka Enberg [Sat, 8 Jan 2011 10:18:44 +0000 (12:18 +0200)]
kvm: Fix virtqueue ring index check

This patch fixes the virtqueu ring index check that was totally wrong. The
->last_avail_idx is the index we've last seen but it doesn't need to match with
avail->idx.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agovirtio: capacity should be in 512-byte sectors
Asias He [Sat, 8 Jan 2011 02:28:26 +0000 (10:28 +0800)]
virtio: capacity should be in 512-byte sectors

struct virtio_blk_config {
        /* The capacity (in 512-byte sectors). */
        uint64_t capacity;
...
}

Signed-off-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm: Fail if user specifies a QCOW disk image
Pekka Enberg [Fri, 7 Jan 2011 19:25:24 +0000 (21:25 +0200)]
kvm: Fail if user specifies a QCOW disk image

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm: Improve kvm__init() error message
Pekka Enberg [Fri, 7 Jan 2011 19:17:59 +0000 (21:17 +0200)]
kvm: Improve kvm__init() error message

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm: Enable virtio block device if disk image specified
Pekka Enberg [Fri, 7 Jan 2011 19:06:27 +0000 (21:06 +0200)]
kvm: Enable virtio block device if disk image specified

This patch removes the "--enable-virtion" command line option and enable virtio
block device when a disk image is specified.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agoMerge branch 'master' of git://github.com/cyrillos/vm
Pekka Enberg [Thu, 6 Jan 2011 09:58:36 +0000 (11:58 +0200)]
Merge branch 'master' of git://github.com/cyrillos/vm

13 years agovirtio-blk: Leave disk geometry to compute in kernel
Cyrill Gorcunov [Thu, 6 Jan 2011 09:55:32 +0000 (12:55 +0300)]
virtio-blk: Leave disk geometry to compute in kernel

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
13 years agokvm: Introduce a list of known BUGS
Pekka Enberg [Thu, 6 Jan 2011 09:48:45 +0000 (11:48 +0200)]
kvm: Introduce a list of known BUGS

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm: Cleanup disk geometry setup code
Pekka Enberg [Thu, 6 Jan 2011 08:22:09 +0000 (10:22 +0200)]
kvm: Cleanup disk geometry setup code

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm: Setup disk geometry if needed
Cyrill Gorcunov [Wed, 5 Jan 2011 22:37:29 +0000 (01:37 +0300)]
kvm: Setup disk geometry if needed

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
13 years agokvm: Use disk image API from virtio block device
Pekka Enberg [Wed, 5 Jan 2011 20:47:28 +0000 (22:47 +0200)]
kvm: Use disk image API from virtio block device

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm: Add support for disk images
Pekka Enberg [Wed, 5 Jan 2011 17:54:48 +0000 (19:54 +0200)]
kvm: Add support for disk images

This patch implements "--image" command line option that can be used to specify
a disk image. It supports raw images and it needs to be integrated to the
hypervisor block layer.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm: Kill stale interrupt configuration comment
Pekka Enberg [Wed, 5 Jan 2011 16:11:15 +0000 (18:11 +0200)]
kvm: Kill stale interrupt configuration comment

Yes, our interrupt configuration is OK. We can see the guest interrupt trapping
to our hypervisor.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm: Implement virtio blk device vring lookup
Pekka Enberg [Wed, 5 Jan 2011 16:00:52 +0000 (18:00 +0200)]
kvm: Implement virtio blk device vring lookup

This patch changes VIRTIO_PCI_QUEUE_NOTIFY handler to look up the actual I/O
request from the vring. We don't inject anything back to the guest yet.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agoLinux 2.6.37 v2.6.37
Linus Torvalds [Wed, 5 Jan 2011 00:50:19 +0000 (16:50 -0800)]
Linux 2.6.37

13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Tue, 4 Jan 2011 21:55:49 +0000 (13:55 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  ipv4/route.c: respect prefsrc for local routes
  bridge: stp: ensure mac header is set
  bridge: fix br_multicast_ipv6_rcv for paged skbs
  atl1: fix oops when changing tx/rx ring params
  drivers/atm/atmtcp.c: add missing atm_dev_put
  starfire: Fix dma_addr_t size test for MIPS
  tg3: fix return value check in tg3_read_vpd()
  Broadcom CNIC core network driver: fix mem leak on allocation failures in cnic_alloc_uio_rings()
  ISDN, Gigaset: Fix memory leak in do_disconnect_req()
  CAN: Use inode instead of kernel address for /proc file
  skfp: testing the wrong variable in skfp_driver_init()
  ppp: allow disabling multilink protocol ID compression
  ehea: Avoid changing vlan flags
  ueagle-atm: fix PHY signal initialization race

13 years agokvm: Implement virtqueues for virtio block device
Pekka Enberg [Tue, 4 Jan 2011 19:07:30 +0000 (21:07 +0200)]
kvm: Implement virtqueues for virtio block device

This patch implements virtqueues for virtio block device. It doesn't handle the
I/O requests on the vring yet, though.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agoipv4/route.c: respect prefsrc for local routes
Joel Sing [Mon, 3 Jan 2011 20:24:20 +0000 (20:24 +0000)]
ipv4/route.c: respect prefsrc for local routes

The preferred source address is currently ignored for local routes,
which results in all local connections having a src address that is the
same as the local dst address. Fix this by respecting the preferred source
address when it is provided for local routes.

This bug can be demonstrated as follows:

 # ifconfig dummy0 192.168.0.1
 # ip route show table local | grep local.*dummy0
 local 192.168.0.1 dev dummy0  proto kernel  scope host  src 192.168.0.1
 # ip route change table local local 192.168.0.1 dev dummy0 \
     proto kernel scope host src 127.0.0.1
 # ip route show table local | grep local.*dummy0
 local 192.168.0.1 dev dummy0  proto kernel  scope host  src 127.0.0.1

We now establish a local connection and verify the source IP
address selection:

 # nc -l 192.168.0.1 3128 &
 # nc 192.168.0.1 3128 &
 # netstat -ant | grep 192.168.0.1:3128.*EST
 tcp        0      0 192.168.0.1:3128        192.168.0.1:33228 ESTABLISHED
 tcp        0      0 192.168.0.1:33228       192.168.0.1:3128  ESTABLISHED

Signed-off-by: Joel Sing <jsing@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoremove trim_fs method from Documentation/filesystems/Locking
Christoph Hellwig [Tue, 4 Jan 2011 06:14:24 +0000 (07:14 +0100)]
remove trim_fs method from Documentation/filesystems/Locking

The ->trim_fs has been removed meanwhile, so remove it from the documentation
as well.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reported-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agokvm: Add ->queue_selector and ->queue_pfn to struct device
Pekka Enberg [Tue, 4 Jan 2011 18:41:25 +0000 (20:41 +0200)]
kvm: Add ->queue_selector and ->queue_pfn to struct device

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm: Make virtio block device read-only
Pekka Enberg [Tue, 4 Jan 2011 17:30:06 +0000 (19:30 +0200)]
kvm: Make virtio block device read-only

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm: Implement virtio blk device config space
Pekka Enberg [Tue, 4 Jan 2011 16:21:21 +0000 (18:21 +0200)]
kvm: Implement virtio blk device config space

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agoRevert "kvm: Fix virtio block PCI device IRQ configuration"
Pekka Enberg [Tue, 4 Jan 2011 16:21:35 +0000 (18:21 +0200)]
Revert "kvm: Fix virtio block PCI device IRQ configuration"

This reverts commit 00b793d98754629f833d5a3003554f841e64ec45.

13 years agokvm: Remove bogus #include directive
Pekka Enberg [Tue, 4 Jan 2011 15:22:57 +0000 (17:22 +0200)]
kvm: Remove bogus #include directive

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm: Don't use VIRTIO_BLK_F_SEG_MAX in the hypervisor
Pekka Enberg [Tue, 4 Jan 2011 15:20:23 +0000 (17:20 +0200)]
kvm: Don't use VIRTIO_BLK_F_SEG_MAX in the hypervisor

We don't actually support VIRTIO_BLK_F_SEG_MAX so disable it from host
features. This fixes the following error during virtio block device probe in
the guest kernel which is caused by bogus "sg_elems" in virtblk_probe():

  ------------[ cut here ]------------
  WARNING: at mm/page_alloc.c:1968 __alloc_pages_nodemask+0x5b4/0x6c0()
  Modules linked in:
  Pid: 1, comm: swapper Not tainted 2.6.35-rc3 #48
  Call Trace:
   [<ffffffff81081e7f>] warn_slowpath_common+0x7f/0xc0
   [<ffffffff81081eda>] warn_slowpath_null+0x1a/0x20
   [<ffffffff8110a6e4>] __alloc_pages_nodemask+0x5b4/0x6c0
   [<ffffffff8124f860>] ? idr_get_empty_slot+0x110/0x2c0
   [<ffffffff8124f860>] ? idr_get_empty_slot+0x110/0x2c0
   [<ffffffff81138795>] alloc_page_interleave+0x45/0xa0
   [<ffffffff811395d9>] alloc_pages_current+0xb9/0xe0
   [<ffffffff8110993e>] __get_free_pages+0xe/0x50
   [<ffffffff8114191e>] __kmalloc+0x14e/0x1c0
   [<ffffffff8137dbf7>] ? virtio_config_buf+0x57/0x80
   [<ffffffff81671e15>] virtblk_probe+0x78/0x498

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm: Cleanup virtio block device I/O functions
Pekka Enberg [Tue, 4 Jan 2011 15:14:56 +0000 (17:14 +0200)]
kvm: Cleanup virtio block device I/O functions

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agokvm: Implement "host features" for virtio blk device
Pekka Enberg [Tue, 4 Jan 2011 15:13:19 +0000 (17:13 +0200)]
kvm: Implement "host features" for virtio blk device

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Tue, 4 Jan 2011 00:37:01 +0000 (16:37 -0800)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

* master.kernel.org:/home/rmk/linux-2.6-arm:
  ARM: pxa: fix page table corruption on resume
  ARM: it8152: add IT8152_LAST_IRQ definition to fix build error
  ARM: pxa: PXA_ESERIES depends on FB_W100.
  ARM: 6605/1: Add missing include "asm/memory.h"
  ARM: 6540/1: Stop irqsoff trace on return to user
  ARM: 6537/1: update Nomadik, U300 and Ux500 maintainers
  ARM: 6536/1: Add missing SZ_{32,64,128}
  ARM: fix cache-feroceon-l2 after stack based kmap_atomic()
  ARM: fix cache-xsc3l2 after stack based kmap_atomic()
  ARM: get rid of kmap_high_l1_vipt()
  ARM: smp: avoid incrementing mm_users on CPU startup
  ARM: pxa: PXA_ESERIES depends on FB_W100.

13 years agoarch/mn10300/kernel/irq.c: fix build
Andrew Morton [Mon, 3 Jan 2011 22:59:11 +0000 (14:59 -0800)]
arch/mn10300/kernel/irq.c: fix build

Addresses https://bugzilla.kernel.org/show_bug.cgi?id=25702

Reported-by: Martin Ettl <ettl.martin@gmx.de>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoima: fix add LSM rule bug
Mimi Zohar [Mon, 3 Jan 2011 22:59:10 +0000 (14:59 -0800)]
ima: fix add LSM rule bug

If security_filter_rule_init() doesn't return a rule, then not everything
is as fine as the return code implies.

This bug only occurs when the LSM (eg. SELinux) is disabled at runtime.

Adding an empty LSM rule causes ima_match_rules() to always succeed,
ignoring any remaining rules.

 default IMA TCB policy:
  # PROC_SUPER_MAGIC
  dont_measure fsmagic=0x9fa0
  # SYSFS_MAGIC
  dont_measure fsmagic=0x62656572
  # DEBUGFS_MAGIC
  dont_measure fsmagic=0x64626720
  # TMPFS_MAGIC
  dont_measure fsmagic=0x01021994
  # SECURITYFS_MAGIC
  dont_measure fsmagic=0x73636673

  < LSM specific rule >
  dont_measure obj_type=var_log_t

  measure func=BPRM_CHECK
  measure func=FILE_MMAP mask=MAY_EXEC
  measure func=FILE_CHECK mask=MAY_READ uid=0

Thus without the patch, with the boot parameters 'tcb selinux=0', adding
the above 'dont_measure obj_type=var_log_t' rule to the default IMA TCB
measurement policy, would result in nothing being measured.  The patch
prevents the default TCB policy from being replaced.

Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
Cc: James Morris <jmorris@namei.org>
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Cc: David Safford <safford@watson.ibm.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMerge branch 'fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6
Russell King [Mon, 3 Jan 2011 22:55:21 +0000 (22:55 +0000)]
Merge branch 'fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6

13 years agobridge: stp: ensure mac header is set
Florian Westphal [Mon, 3 Jan 2011 04:16:28 +0000 (04:16 +0000)]
bridge: stp: ensure mac header is set

commit bf9ae5386bca8836c16e69ab8fdbe46767d7452a
(llc: use dev_hard_header) removed the
skb_reset_mac_header call from llc_mac_hdr_init.

This seems fine itself, but br_send_bpdu() invokes ebtables LOCAL_OUT.

We oops in ebt_basic_match() because it assumes eth_hdr(skb) returns
a meaningful result.

Cc: acme@ghostprotocols.net
References: https://bugzilla.kernel.org/show_bug.cgi?id=24532
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Mon, 3 Jan 2011 19:51:22 +0000 (11:51 -0800)]
Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  perf: Fix callchain hit bad cast on ascii display
  arch/x86/oprofile/op_model_amd.c: Perform initialisation on a single CPU
  watchdog: Improve initialisation error message and documentation

13 years agoMerge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Mon, 3 Jan 2011 19:50:26 +0000 (11:50 -0800)]
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6:
  [media] em28xx: radio_fops should also use unlocked_ioctl
  [media] wm8775: Revert changeset fcb9757333 to avoid a regression
  [media] cx25840: Prevent device probe failure due to volume control ERANGE error

13 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx
Linus Torvalds [Mon, 3 Jan 2011 19:48:54 +0000 (11:48 -0800)]
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx:
  dmaengine: provide dummy functions for DMA_ENGINE=n
  mv_xor: fix race in tasklet function

13 years agoname_to_dev_t() must not call __init code
Jan Beulich [Mon, 3 Jan 2011 15:07:02 +0000 (15:07 +0000)]
name_to_dev_t() must not call __init code

The function can't be __init itself (being called from some sysfs
handler), and hence none of the functions it calls can be either.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agobridge: fix br_multicast_ipv6_rcv for paged skbs
Tomas Winkler [Mon, 3 Jan 2011 19:26:08 +0000 (11:26 -0800)]
bridge: fix br_multicast_ipv6_rcv for paged skbs

use pskb_may_pull to access ipv6 header correctly for paged skbs
It was omitted in the bridge code leading to crash in blind
__skb_pull

since the skb is cloned undonditionally we also simplify the
the exit path

this fixes bug https://bugzilla.kernel.org/show_bug.cgi?id=25202

Dec 15 14:36:40 User-PC hostapd: wlan0: STA 00:15:00:60:5d:34 IEEE 802.11: authenticated
Dec 15 14:36:40 User-PC hostapd: wlan0: STA 00:15:00:60:5d:34 IEEE 802.11: associated (aid 2)
Dec 15 14:36:40 User-PC hostapd: wlan0: STA 00:15:00:60:5d:34 RADIUS: starting accounting session 4D0608A3-00000005
Dec 15 14:36:41 User-PC kernel: [175576.120287] ------------[ cut here ]------------
Dec 15 14:36:41 User-PC kernel: [175576.120452] kernel BUG at include/linux/skbuff.h:1178!
Dec 15 14:36:41 User-PC kernel: [175576.120609] invalid opcode: 0000 [#1] SMP
Dec 15 14:36:41 User-PC kernel: [175576.120749] last sysfs file: /sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/uevent
Dec 15 14:36:41 User-PC kernel: [175576.121035] Modules linked in: approvals binfmt_misc bridge stp llc parport_pc ppdev arc4 iwlagn snd_hda_codec_realtek iwlcore i915 snd_hda_intel mac80211 joydev snd_hda_codec snd_hwdep snd_pcm snd_seq_midi drm_kms_helper snd_rawmidi drm snd_seq_midi_event snd_seq snd_timer snd_seq_device cfg80211 eeepc_wmi usbhid psmouse intel_agp i2c_algo_bit intel_gtt uvcvideo agpgart videodev sparse_keymap snd shpchp v4l1_compat lp hid video serio_raw soundcore output snd_page_alloc ahci libahci atl1c
Dec 15 14:36:41 User-PC kernel: [175576.122712]
Dec 15 14:36:41 User-PC kernel: [175576.122769] Pid: 0, comm: kworker/0:0 Tainted: G        W   2.6.37-rc5-wl+ #3 1015PE/1016P
Dec 15 14:36:41 User-PC kernel: [175576.123012] EIP: 0060:[<f83edd65>] EFLAGS: 00010283 CPU: 1
Dec 15 14:36:41 User-PC kernel: [175576.123193] EIP is at br_multicast_rcv+0xc95/0xe1c [bridge]
Dec 15 14:36:41 User-PC kernel: [175576.123362] EAX: 0000001c EBX: f5626318 ECX: 00000000 EDX: 00000000
Dec 15 14:36:41 User-PC kernel: [175576.123550] ESI: ec512262 EDI: f5626180 EBP: f60b5ca0 ESP: f60b5bd8
Dec 15 14:36:41 User-PC kernel: [175576.123737]  DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
Dec 15 14:36:41 User-PC kernel: [175576.123902] Process kworker/0:0 (pid: 0, ti=f60b4000 task=f60a8000 task.ti=f60b0000)
Dec 15 14:36:41 User-PC kernel: [175576.124137] Stack:
Dec 15 14:36:41 User-PC kernel: [175576.124181]  ec556500 f6d06800 f60b5be8 c01087d8 ec512262 00000030 00000024 f5626180
Dec 15 14:36:41 User-PC kernel: [175576.124181]  f572c200 ef463440 f5626300 3affffff f6d06dd0 e60766a4 000000c4 f6d06860
Dec 15 14:36:41 User-PC kernel: [175576.124181]  ffffffff ec55652c 00000001 f6d06844 f60b5c64 c0138264 c016e451 c013e47d
Dec 15 14:36:41 User-PC kernel: [175576.124181] Call Trace:
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c01087d8>] ? sched_clock+0x8/0x10
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c0138264>] ? enqueue_entity+0x174/0x440
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c016e451>] ? sched_clock_cpu+0x131/0x190
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c013e47d>] ? select_task_rq_fair+0x2ad/0x730
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c0524fc1>] ? nf_iterate+0x71/0x90
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<f83e4914>] ? br_handle_frame_finish+0x184/0x220 [bridge]
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<f83e4790>] ? br_handle_frame_finish+0x0/0x220 [bridge]
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<f83e46e9>] ? br_handle_frame+0x189/0x230 [bridge]
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<f83e4790>] ? br_handle_frame_finish+0x0/0x220 [bridge]
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<f83e4560>] ? br_handle_frame+0x0/0x230 [bridge]
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c04ff026>] ? __netif_receive_skb+0x1b6/0x5b0
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c04f7a30>] ? skb_copy_bits+0x110/0x210
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c0503a7f>] ? netif_receive_skb+0x6f/0x80
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<f82cb74c>] ? ieee80211_deliver_skb+0x8c/0x1a0 [mac80211]
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<f82cc836>] ? ieee80211_rx_handlers+0xeb6/0x1aa0 [mac80211]
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c04ff1f0>] ? __netif_receive_skb+0x380/0x5b0
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c016e242>] ? sched_clock_local+0xb2/0x190
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c012b688>] ? default_spin_lock_flags+0x8/0x10
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c05d83df>] ? _raw_spin_lock_irqsave+0x2f/0x50
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<f82cd621>] ? ieee80211_prepare_and_rx_handle+0x201/0xa90 [mac80211]
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<f82ce154>] ? ieee80211_rx+0x2a4/0x830 [mac80211]
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<f815a8d6>] ? iwl_update_stats+0xa6/0x2a0 [iwlcore]
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<f8499212>] ? iwlagn_rx_reply_rx+0x292/0x3b0 [iwlagn]
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c05d83df>] ? _raw_spin_lock_irqsave+0x2f/0x50
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<f8483697>] ? iwl_rx_handle+0xe7/0x350 [iwlagn]
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<f8486ab7>] ? iwl_irq_tasklet+0xf7/0x5c0 [iwlagn]
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c01aece1>] ? __rcu_process_callbacks+0x201/0x2d0
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c0150d05>] ? tasklet_action+0xc5/0x100
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c0150a07>] ? __do_softirq+0x97/0x1d0
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c05d910c>] ? nmi_stack_correct+0x2f/0x34
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c0150970>] ? __do_softirq+0x0/0x1d0
Dec 15 14:36:41 User-PC kernel: [175576.124181]  <IRQ>
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c01508f5>] ? irq_exit+0x65/0x70
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c05df062>] ? do_IRQ+0x52/0xc0
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c01036b0>] ? common_interrupt+0x30/0x38
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c03a1fc2>] ? intel_idle+0xc2/0x160
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c04daebb>] ? cpuidle_idle_call+0x6b/0x100
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c0101dea>] ? cpu_idle+0x8a/0xf0
Dec 15 14:36:41 User-PC kernel: [175576.124181]  [<c05d2702>] ? start_secondary+0x1e8/0x1ee

Cc: David Miller <davem@davemloft.net>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoatl1: fix oops when changing tx/rx ring params
J. K. Cliburn [Sat, 1 Jan 2011 05:02:12 +0000 (05:02 +0000)]
atl1: fix oops when changing tx/rx ring params

Commit 3f5a2a713aad28480d86b0add00c68484b54febc zeroes out the statistics
message block (SMB) and coalescing message block (CMB) when adapter ring
resources are freed.  This is desirable behavior, but, as a side effect,
the commit leads to an oops when atl1_set_ringparam() attempts to alter
the number of rx or tx elements in the ring buffer (by using ethtool
-G, for example).  We don't want SMB or CMB to change during this
operation.

Modify atl1_set_ringparam() to preserve SMB and CMB when changing ring
parameters.

Cc: stable@kernel.org
Signed-off-by: Jay Cliburn <jcliburn@gmail.com>
Reported-by: Tõnu Raitviir <jussuf@linux.ee>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic...
Ingo Molnar [Mon, 3 Jan 2011 18:59:24 +0000 (19:59 +0100)]
Merge branch 'perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing into perf/urgent

13 years agobios: Use proper grep syntax
Cyrill Gorcunov [Mon, 3 Jan 2011 16:37:36 +0000 (19:37 +0300)]
bios: Use proper grep syntax

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
13 years agokvm: Fix virtio block PCI device IRQ configuration
Pekka Enberg [Mon, 3 Jan 2011 16:21:11 +0000 (18:21 +0200)]
kvm: Fix virtio block PCI device IRQ configuration

This patch fixes up hang when guest kernel tries to setup virtio block device.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
13 years agoARM: pxa: fix page table corruption on resume
Aric D. Blumer [Wed, 29 Dec 2010 16:18:29 +0000 (11:18 -0500)]
ARM: pxa: fix page table corruption on resume

Before this patch, the following error would sometimes occur after a
resume on pxa3xx:

    /path/to/mm/memory.c:144: bad pmd 8040542e.

The problem was that a temporary page table mapping was being improperly
restored.

The PXA3xx resume code creates a temporary mapping of resume_turn_on_mmu
to avoid a prefetch abort.  The pxa3xx_resume_after_mmu code requires
that the r1 register holding the address of this mapping not be
modified, however, resume_turn_on_mmu does modify it. It is mostly
correct in that r1 receives the base table address, but it may also
get other bits in 13:0.  This results in pxa3xx_resume_after_mmu
restoring the original mapping to the wrong place, corrupting memory
and leaving the temporary mapping in place.

Signed-off-by: Matt Reimer <mreimer@sdgsystems.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
13 years agoARM: it8152: add IT8152_LAST_IRQ definition to fix build error
Mike Rapoport [Wed, 29 Dec 2010 07:06:26 +0000 (09:06 +0200)]
ARM: it8152: add IT8152_LAST_IRQ definition to fix build error

The commit 6ac6b817f3f4c23c5febd960d8deb343e13af5f3 (ARM: pxa: encode
IRQ number into .nr_irqs) removed definition of ITE_LAST_IRQ which
caused the following build error:

CC      arch/arm/common/it8152.o
arch/arm/common/it8152.c: In function 'it8152_init_irq':
arch/arm/common/it8152.c:86: error: 'IT8152_LAST_IRQ' undeclared (first use in this function)
arch/arm/common/it8152.c:86: error: (Each undeclared identifier is reported only once
arch/arm/common/it8152.c:86: error: for each function it appears in.)
make[2]: *** [arch/arm/common/it8152.o] Error 1

Defining the IT8152_LAST_IRQ in the arch/arm/include/hardware/it8152.c
fixes the build.

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
13 years agoARM: pxa: PXA_ESERIES depends on FB_W100.
Lennert Buytenhek [Tue, 14 Dec 2010 23:20:16 +0000 (07:20 +0800)]
ARM: pxa: PXA_ESERIES depends on FB_W100.

As arch/arm/mach-pxa/eseries.c references w100fb_gpio_{read,write}()
directly.

Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
13 years agoperf: Fix callchain hit bad cast on ascii display
Frederic Weisbecker [Mon, 3 Jan 2011 15:13:11 +0000 (16:13 +0100)]
perf: Fix callchain hit bad cast on ascii display

ipchain__fprintf_graph() casts the number of hits in a branch as an
int, which means we lose its highests bits.

This results in meaningless number of callchain hits in perf.data
that have a high number of hits recorded, typically those that have
callchain branches hits appearing more than INT_MAX. This happens
easily as those are pondered by the event period.

Reported-by: Nick Piggin <npiggin@kernel.dk>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
13 years agoarch/x86/oprofile/op_model_amd.c: Perform initialisation on a single CPU
Robert Richter [Mon, 3 Jan 2011 11:15:14 +0000 (12:15 +0100)]
arch/x86/oprofile/op_model_amd.c: Perform initialisation on a single CPU

Disable preemption in init_ibs(). The function only checks the
ibs capabilities and sets up pci devices (if necessary). It runs
only on one cpu but operates with the local APIC and some MSRs,
thus it is better to disable preemption.

[    7.034377] BUG: using smp_processor_id() in preemptible [00000000] code: modprobe/483
[    7.034385] caller is setup_APIC_eilvt+0x155/0x180
[    7.034389] Pid: 483, comm: modprobe Not tainted 2.6.37-rc1-20101110+ #1
[    7.034392] Call Trace:
[    7.034400]  [<ffffffff812a2b72>] debug_smp_processor_id+0xd2/0xf0
[    7.034404]  [<ffffffff8101e985>] setup_APIC_eilvt+0x155/0x180
[ ... ]

Addresses https://bugzilla.kernel.org/show_bug.cgi?id=22812

Reported-by: <atswartz@gmail.com>
Signed-off-by: Robert Richter <robert.richter@amd.com>
Cc: oprofile-list@lists.sourceforge.net <oprofile-list@lists.sourceforge.net>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Dan Carpenter <error27@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: <stable@kernel.org> [2.6.37.x]
LKML-Reference: <20110103111514.GM4739@erda.amd.com>
[ small cleanups ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
13 years ago[media] em28xx: radio_fops should also use unlocked_ioctl
Hans Verkuil [Sat, 18 Dec 2010 12:59:51 +0000 (09:59 -0300)]
[media] em28xx: radio_fops should also use unlocked_ioctl

em28xx uses core assisted locking, so it shouldn't use .ioctl.
The .ioctl callback was replaced by .unlocked_ioctl for video nodes,
but not for radio nodes. This is now corrected.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] wm8775: Revert changeset fcb9757333 to avoid a regression
Mauro Carvalho Chehab [Mon, 3 Jan 2011 11:09:56 +0000 (09:09 -0200)]
[media] wm8775: Revert changeset fcb9757333 to avoid a regression

It seems that cx88 and ivtv use wm8775 on some different modes. The
patch that added support for a board with wm8775 broke ivtv boards with
this device. As we're too close to release 2.6.37, let's just revert
it.

Reported-by: Andy Walls <awalls@md.metrocast.net>
Reported-by: Eric Sharkey <eric@lisaneric.org>
Reported-by: Auric <auric@aanet.com.au>
Reported by: David Gesswein <djg@pdp8online.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] cx25840: Prevent device probe failure due to volume control ERANGE error
Andy Walls [Sun, 5 Dec 2010 22:42:30 +0000 (19:42 -0300)]
[media] cx25840: Prevent device probe failure due to volume control ERANGE error

This patch fixes a regression that crept into 2.6.36.

The volume control scale in the cx25840 driver has an unusual mapping
from register values to v4l2 volume control values.  Enforce the mapping
limits, so that the default volume control setting does not fall out of
bounds to prevent the cx25840 module device probe from failing.

Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>