Arnaldo Carvalho de Melo [Thu, 29 Apr 2010 21:58:32 +0000 (18:58 -0300)]
perf test: Initial regression testing command
First an example with the first internal test:
[acme@doppio linux-2.6-tip]$ perf test
1: vmlinux symtab matches kallsyms: Ok
So it run just one test, that is "vmlinux symtab matches kallsyms", and it was
successful.
If we run it in verbose mode, we'll see details about errors and extra warnings
for non-fatal problems:
[acme@doppio linux-2.6-tip]$ perf test -v
1: vmlinux symtab matches kallsyms:
--- start ---
Looking at the vmlinux_path (5 entries long)
No build_id in vmlinux, ignoring it
No build_id in /boot/vmlinux, ignoring it
No build_id in /boot/vmlinux-2.6.34-rc4-tip+, ignoring it
Using /lib/modules/2.6.34-rc4-tip+/build/vmlinux for symbols
Maps only in vmlinux:
ffffffff81cb81b1-
ffffffff81e1149b 0 [kernel].init.text
ffffffff81e1149c-
ffffffff9fffffff 0 [kernel].exit.text
ffffffffff600000-
ffffffffff6000ff 0 [kernel].vsyscall_0
ffffffffff600100-
ffffffffff6003ff 0 [kernel].vsyscall_fn
ffffffffff600400-
ffffffffff6007ff 0 [kernel].vsyscall_1
ffffffffff600800-
ffffffffffffffff 0 [kernel].vsyscall_2
Maps in vmlinux with a different name in kallsyms:
ffffffffff600000-
ffffffffff6000ff 0 [kernel].vsyscall_0 in kallsyms as [kernel].0
ffffffffff600100-
ffffffffff6003ff 0 [kernel].vsyscall_fn in kallsyms as:
*
ffffffffff600100-
ffffffffff60012f 0 [kernel].2
ffffffffff600400-
ffffffffff6007ff 0 [kernel].vsyscall_1 in kallsyms as [kernel].6
ffffffffff600800-
ffffffffffffffff 0 [kernel].vsyscall_2 in kallsyms as [kernel].8
Maps only in kallsyms:
ffffffffff600130-
ffffffffff6003ff 0 [kernel].4
---- end ----
vmlinux symtab matches kallsyms: Ok
[acme@doppio linux-2.6-tip]$
In the above case we only know the name of the non contiguous kernel ranges in
the address space when reading the symbol information from the ELF symtab in
vmlinux.
The /proc/kallsyms file lack this, we only notice they are separate because
there are modules after the kernel and after that more kernel functions, so we
need to have a module rbtree backed by the module .ko path to get symtabs in
the vmlinux case.
The tool uses it to match by address to emit appropriate warning, but don't
considers this fatal.
The .init.text and .exit.text ines, of course, aren't in kallsyms, so I left
these cases just as extra info in verbose mode.
The end of the sections also aren't in kallsyms, so we the symbols layer does
another pass and sets the end addresses as the next map start minus one, which
sometimes pads, causing harmless mismatches.
But at least the symbols match, tested it by copying /proc/kallsyms to
/tmp/kallsyms and doing changes to see if they were detected.
This first test also should serve as a first stab at documenting the
symbol library by providing a self contained example that exercises it
together with comments about what is being done.
More tests to check if actions done on a monitored app, like doing mmaps, etc,
makes the kernel generate the expected events should be added next.
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Arnaldo Carvalho de Melo [Thu, 29 Apr 2010 18:25:23 +0000 (15:25 -0300)]
perf symbols: Add machine helper routines
Created when writing the first 'perf test' regression testing routine.
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Arnaldo Carvalho de Melo [Wed, 28 Apr 2010 01:26:51 +0000 (22:26 -0300)]
perf tools: Create $(OUTPUT)arch/$(ARCH)/util/ directory
So that "make -C tools/perf O=/tmp/some/path" works again.
Problem introduced in:
cd932c5 "perf: Move arch specific code into separate arch director"
Cc: Ian Munsie <imunsie@au.ibm.com>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Arnaldo Carvalho de Melo [Wed, 28 Apr 2010 00:22:44 +0000 (21:22 -0300)]
perf machines: Make the machines class adopt the dsos__fprintf methods
Now those methods don't operate on a global list of dsos, but on lists
of machines, so make this clear by renaming the functions.
Cc: Avi Kivity <avi@redhat.com>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Zhang, Yanmin <yanmin_zhang@linux.intel.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Arnaldo Carvalho de Melo [Wed, 28 Apr 2010 00:20:43 +0000 (21:20 -0300)]
perf machine: Adopt some map_groups functions
Those functions operated on members now grouped in 'struct machine', so
move those methods to this new class.
The changes made to 'perf probe' shows that using this abstraction
inserting probes on guests almost got supported for free.
Cc: Avi Kivity <avi@redhat.com>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Zhang, Yanmin <yanmin_zhang@linux.intel.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Arnaldo Carvalho de Melo [Wed, 28 Apr 2010 00:19:05 +0000 (21:19 -0300)]
perf machine: Pass buffer size to machine__mmap_name
Don't blindly assume that the size of the buffer is enough, use
snprintf.
Cc: Avi Kivity <avi@redhat.com>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Zhang, Yanmin <yanmin_zhang@linux.intel.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Arnaldo Carvalho de Melo [Wed, 28 Apr 2010 00:17:50 +0000 (21:17 -0300)]
perf tools: Rename "kernel_info" to "machine"
struct kernel_info and kerninfo__ are too vague, what they really
describe are machines, virtual ones or hosts.
There are more changes to introduce helpers to shorten function calls
and to make more clear what is really being done, but I left that for
subsequent patches.
Cc: Avi Kivity <avi@redhat.com>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Zhang, Yanmin <yanmin_zhang@linux.intel.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Ingo Molnar [Tue, 27 Apr 2010 09:16:54 +0000 (11:16 +0200)]
Merge branch 'perf' of git://git./linux/kernel/git/acme/linux-2.6 into perf/core
Stefan Hajnoczi [Mon, 26 Apr 2010 18:39:54 +0000 (15:39 -0300)]
perf tools: Fix libdw-dev package name in error message
The headers required for DWARF support are provided by the libdw-dev
package in Debian-based distros. This patch corrects the elfutils-dev
package name to libdw-dev in the Makefile error message when libdw.h is
not found.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <
1272292023-9869-1-git-send-email-stefanha@linux.vnet.ibm.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Masami Hiramatsu [Wed, 21 Apr 2010 19:56:40 +0000 (15:56 -0400)]
perf probe: Add --max-probes option
Add --max-probes option to change the maximum limit of
findable probe points per event, since inlined function can be
expanded into thousands of probe points. Default value is 128.
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Suggested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
LKML-Reference: <
20100421195640.24664.62984.stgit@localhost6.localdomain6>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Masami Hiramatsu [Wed, 21 Apr 2010 19:56:32 +0000 (15:56 -0400)]
perf probe: Fix to exit callback soon after finding too many probe points
Fix to exit callback soon after finding too many probe points.
Don't try to continue searching because it already failed.
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Reported-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
LKML-Reference: <
20100421195632.24664.42598.stgit@localhost6.localdomain6>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Masami Hiramatsu [Wed, 21 Apr 2010 19:56:24 +0000 (15:56 -0400)]
perf probe: Fix to use symtab only if no debuginfo
Fix perf probe to use symtab only if there is no debuginfo, because debuginfo
has more information than symtab.
If we can't find a function in debuginfo, we never find it in symtab.
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Reported-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
LKML-Reference: <
20100421195624.24664.46214.stgit@localhost6.localdomain6>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Masami Hiramatsu [Wed, 21 Apr 2010 19:56:16 +0000 (15:56 -0400)]
perf tools: Initialize dso->node member in dso__new
If dso->node member is not initialized, it causes a segmentation fault when
adding to other lists.
It should be initilized in dso__new().
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
LKML-Reference: : <
20100421195616.24664.89980.stgit@localhost6.localdomain6>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
William Cohen [Fri, 23 Apr 2010 20:36:21 +0000 (16:36 -0400)]
perf: Some perf-kvm documentation edits
asciidoc does not allow the "===" to be longer than the line
above it.
Also fix a couple types and formatting errors.
Signed-off-by: William Cohen <wcohen@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ingo Molnar <mingo@elte.hu>
LKML-Reference: <
4BD204C5.9000504@redhat.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Frederic Weisbecker [Fri, 23 Apr 2010 23:55:09 +0000 (01:55 +0200)]
perf: Add a perf trace option to check samples ordering reliability
To ensure sample events time reordering is reliable, add a -d option
to perf trace to check that automatically.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
Frederic Weisbecker [Fri, 23 Apr 2010 23:18:48 +0000 (01:18 +0200)]
perf: Use generic sample reordering in perf timechart
Use the new generic sample events reordering from perf timechart,
this drops the ad hoc sample reordering it was using before.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Frederic Weisbecker [Fri, 23 Apr 2010 22:38:33 +0000 (00:38 +0200)]
perf: Use generic sample reordering in perf trace
Use the new generic sample events reordering from perf trace.
Before that, the displayed traces were ordered as they were
in the input as recorded by perf record (not time ordered).
This makes eventually perf trace displaying the events as beeing
time ordered.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
Frederic Weisbecker [Fri, 23 Apr 2010 22:34:53 +0000 (00:34 +0200)]
perf: Use generic sample reordering in perf kmem
Use the new generic sample events reordering from perf kmem,
this drops the need of multiplexing the buffers on record time,
improving the scalability of perf kmem.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Frederic Weisbecker [Fri, 23 Apr 2010 22:29:40 +0000 (00:29 +0200)]
perf: Use generic sample reordering in perf sched
Use the new generic sample events reordering from perf sched,
this drops the need of multiplexing the buffers on record time,
improving the scalability of perf sched.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
Frederic Weisbecker [Fri, 23 Apr 2010 22:04:12 +0000 (00:04 +0200)]
perf: Generalize perf lock's sample event reordering to the session layer
The sample events recorded by perf record are not time ordered
because we have one buffer per cpu for each event (even demultiplexed
per task/per cpu for task bound events). But when we read trace events
we want them to be ordered by time because many state machines are
involved.
There are currently two ways perf tools deal with that:
- use -M to multiplex every buffers (perf sched, perf kmem)
But this creates a lot of contention in SMP machines on
record time.
- use a post-processing time reordering (perf timechart, perf lock)
The reordering used by timechart is simple but doesn't scale well
with huge flow of events, in terms of performance and memory use
(unusable with perf lock for example).
Perf lock has its own samples reordering that flushes its memory
use in a regular basis and that uses a sorting based on the
previous event queued (a new event to be queued is close to the
previous one most of the time).
This patch proposes to export perf lock's samples reordering facility
to the session layer that reads the events. So if a tool wants to
get ordered sample events, it needs to set its
struct perf_event_ops::ordered_samples to true and that's it.
This prepares tracing based perf tools to get rid of the need to
use buffers multiplexing (-M) or to implement their own
reordering.
Also lower the flush period to 2 as it's sufficient already.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
Stephane Eranian [Wed, 21 Apr 2010 16:06:01 +0000 (18:06 +0200)]
perf: Fix initialization bug in parse_single_tracepoint_event()
The parse_single_tracepoint_event() was setting some attributes
before it validated the event was indeed a tracepoint event. This
caused problems with other initialization routines like in the
builtin-top.c module whereby sample_period is not set if not 0.
Signed-off-by: Stephane Eranian <eranian@google.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ingo Molnar <mingo@elte.hu>
LKML-Reference: <
4bcf232b.
698fd80a.6fbe.
ffffb737@mx.google.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Hitoshi Mitake [Wed, 21 Apr 2010 12:23:54 +0000 (21:23 +0900)]
perf lock: Fix state machine to recognize lock sequence
Previous state machine of perf lock was really broken.
This patch improves it a little.
This patch prepares the list of state machine that represents
lock sequences for each threads.
These state machines can be one of these sequences:
1) acquire -> acquired -> release
2) acquire -> contended -> acquired -> release
3) acquire (w/ try) -> release
4) acquire (w/ read) -> release
The case of 4) is a little special.
Double acquire of read lock is allowed, so the state machine
counts read lock number, and permits double acquire and release.
But, things are not so simple. Something in my model is still wrong.
I counted the number of lock instances with bad sequence,
and ratio is like this (case of tracing whoami): bad:233, total:2279
version 2:
* threads are now identified with tid, not pid
* prepared SEQ_STATE_READ_ACQUIRED for read lock.
* bunch of struct lock_seq_stat is now linked list
* debug information enhanced (this have to be removed someday)
e.g.
| === output for debug===
|
| bad:233, total:2279
| bad rate:0.000000
| histogram of events caused bad sequence
| acquire: 165
| acquired: 0
| contended: 0
| release: 68
Signed-off-by: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Jason Baron <jbaron@redhat.com>
Cc: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Cc: Ingo Molnar <mingo@elte.hu>
LKML-Reference: <
1271852634-9351-1-git-send-email-mitake@dcl.info.waseda.ac.jp>
[rename SEQ_STATE_UNINITED to SEQ_STATE_UNINITIALIZED]
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Ingo Molnar [Fri, 23 Apr 2010 09:11:38 +0000 (11:11 +0200)]
Merge branch 'master' of git://git./linux/kernel/git/paulus/perf into perf/core
Ingo Molnar [Fri, 23 Apr 2010 09:10:28 +0000 (11:10 +0200)]
Merge branch 'linus' into perf/core
Merge reason: merge the latest fixes, update to latest -rc.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Linus Torvalds [Fri, 23 Apr 2010 02:46:29 +0000 (19:46 -0700)]
Merge branch 'upstream-linus' of git://git./linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
libata: ensure NCQ error result taskfile is fully initialized before returning it via qc->result_tf.
libata: fix docs, RE port and device of libata.force ID separated by point
pata_pcmcia/ide-cs: add IDs for transcend and kingston cards
libata: fix locking around blk_abort_request()
Jeff Garzik [Fri, 23 Apr 2010 01:59:13 +0000 (21:59 -0400)]
libata: ensure NCQ error result taskfile is fully initialized
before returning it via qc->result_tf.
Cc: stable@kernel.org
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Roman Fietze [Wed, 21 Apr 2010 10:17:12 +0000 (12:17 +0200)]
libata: fix docs, RE port and device of libata.force ID separated by point
According to libata-core correctly around line 6572:
/* parse id */
p = strchr(id, '.');
...
the optional device is separated from the port in the libata.force ID
by a point or dot instead of by a colon.
Fix documentation to reflect this.
Signed-off-by: Roman Fietze <roman.fietze@telemotive.de>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Kristoffer Ericson [Mon, 19 Apr 2010 17:54:11 +0000 (19:54 +0200)]
pata_pcmcia/ide-cs: add IDs for transcend and kingston cards
This patch adds idstrings for Kingston 1GB/4GB and Transcend 4GB/8GB.
Signed-off-by: Kristoffer Ericson <kristoffer.ericson@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Tejun Heo [Wed, 14 Apr 2010 23:57:37 +0000 (08:57 +0900)]
libata: fix locking around blk_abort_request()
blk_abort_request() expectes queue lock to be held by the caller.
Grab it before calling the function.
Lack of this synchronization led to infinite loop on corrupt
q->timeout_list.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: stable@kernel.org
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Linus Torvalds [Fri, 23 Apr 2010 01:24:37 +0000 (18:24 -0700)]
Merge git://git./linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
usb: Increase timeout value for device reset
USB: put claimed interfaces in the "suspended" state
USB: EHCI: defer reclamation of siTDs
USB: fix remote wakeup settings during system sleep
USB: pl2303: add AdLink ND-6530 USB IDs
USB: Add id for HP ev2210 a.k.a Sierra MC5725 miniPCI-e Cell Modem.
USB: OHCI: DA8xx/OMAP-L1x: fix up macro rename
USB: qcaux: add LG Rumor and Sanyo Katana LX device IDs
usb: wusb: don't overflow the Keep Alive IE buffer
USB: ehci: omap: fix kernel panic with rmmod
USB: fixed bug in usbsevseg using USB autosuspend incorrectly
USB: ti_usb_3410_5052: adding multitech dialup fax/modem devices
Linus Torvalds [Fri, 23 Apr 2010 01:24:27 +0000 (18:24 -0700)]
Merge git://git./linux/kernel/git/gregkh/driver-core-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
sysfs: use sysfs_attr_init in ASUS atk0110 driver
Documentation/HOWTO: update git home URL
Documentation: -stable rules: upstream commit ID requirement reworded
Linus Torvalds [Fri, 23 Apr 2010 01:24:06 +0000 (18:24 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/anholt/drm-intel
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel:
drm/i915: use PIPE_CONTROL instruction on Ironlake and Sandy Bridge
drm/i915: cleanup FBC buffers at unload time
drm/i915: fix tiling limits for i915 class hw v2
drm/i915: set DIDL using the ACPI video output device _ADR method return.
drm/i915: Fix 82854 PCI ID, and treat it like other 85X
drm/i915: Attempt to fix watermark setup on 85x (v2)
Linus Torvalds [Fri, 23 Apr 2010 01:21:38 +0000 (18:21 -0700)]
Merge branch 'for-linus' of git://neil.brown.name/md
* 'for-linus' of git://neil.brown.name/md:
md/raid5: fix previous patch.
Jiri Kosina [Thu, 15 Apr 2010 00:45:25 +0000 (02:45 +0200)]
sysfs: use sysfs_attr_init in ASUS atk0110 driver
Annotate dynamic sysfs attribute in atk_create_files(). This gets
rid of the following lockdep warning:
BUG: key
ffff8800379ca670 not in .data!
------------[ cut here ]------------
WARNING: at kernel/lockdep.c:2696 lockdep_init_map+0xd2/0x108()
Hardware name: P5K PRO
Modules linked in: asus_atk0110(+) pata_acpi firewire_ohci ata_generic
dm_multipath firewire_core crc_itu_t pata_marvell floppy
Pid: 599, comm: modprobe Not tainted 2.6.34-rc4 #27
Call Trace:
[<
ffffffff8104cdb0>] warn_slowpath_common+0x7c/0x94
[<
ffffffff8104cddc>] warn_slowpath_null+0x14/0x16
[<
ffffffff81077c4d>] lockdep_init_map+0xd2/0x108
[<
ffffffff81165873>] sysfs_add_file_mode+0x66/0xa2
[<
ffffffff811658c0>] sysfs_add_file+0x11/0x13
[<
ffffffff8116594b>] sysfs_create_file+0x2a/0x2c
[<
ffffffff812c1f9c>] device_create_file+0x19/0x1b
[<
ffffffffa005b4fd>] atk_add+0x58b/0x72e [asus_atk0110]
[<
ffffffff812572a1>] acpi_device_probe+0x50/0x122
[<
ffffffff812c46af>] driver_probe_device+0xa2/0x127
[<
ffffffff812c4783>] __driver_attach+0x4f/0x6b
[<
ffffffff812c4734>] ? __driver_attach+0x0/0x6b
[<
ffffffff812c3c94>] bus_for_each_dev+0x59/0x8e
[<
ffffffff812c4519>] driver_attach+0x1e/0x20
[<
ffffffff812c4152>] bus_add_driver+0xb9/0x207
[<
ffffffff812c4a5f>] driver_register+0x9d/0x10e
[<
ffffffffa005f000>] ? atk0110_init+0x0/0x31 [asus_atk0110]
[<
ffffffff81257c7c>] acpi_bus_register_driver+0x43/0x45
[<
ffffffffa005f015>] atk0110_init+0x15/0x31 [asus_atk0110]
[<
ffffffffa005f000>] ? atk0110_init+0x0/0x31 [asus_atk0110]
[<
ffffffff81002069>] do_one_initcall+0x5e/0x15e
[<
ffffffff81085075>] sys_init_module+0xd8/0x239
[<
ffffffff81009cf2>] system_call_fastpath+0x16/0x1b
---[ end trace
4d0c84007055efb9 ]---
BUG: key
ffff8800379ca638 not in .data!
BUG: key
ffff8800379ca6a8 not in .data!
BUG: key
ffff8800379ca6e0 not in .data!
BUG: key
ffff880036f73670 not in .data!
BUG: key
ffff880036f73638 not in .data!
BUG: key
ffff880036f736a8 not in .data!
BUG: key
ffff880036f736e0 not in .data!
BUG: key
ffff880036f76c70 not in .data!
BUG: key
ffff880036f76c38 not in .data!
BUG: key
ffff880036f76ca8 not in .data!
BUG: key
ffff880036f76ce0 not in .data!
BUG: key
ffff8800368e7670 not in .data!
BUG: key
ffff8800368e7638 not in .data!
BUG: key
ffff8800368e76a8 not in .data!
BUG: key
ffff8800368e76e0 not in .data!
BUG: key
ffff880036ef7670 not in .data!
BUG: key
ffff880036ef7638 not in .data!
BUG: key
ffff880036ef76a8 not in .data!
BUG: key
ffff880036ef76e0 not in .data!
BUG: key
ffff8800373ccc70 not in .data!
BUG: key
ffff8800373ccc38 not in .data!
BUG: key
ffff8800373ccca8 not in .data!
BUG: key
ffff8800373ccce0 not in .data!
BUG: key
ffff880037a60870 not in .data!
BUG: key
ffff880037a60838 not in .data!
BUG: key
ffff880037a608a8 not in .data!
BUG: key
ffff880037a608e0 not in .data!
BUG: key
ffff880037355070 not in .data!
BUG: key
ffff880037355038 not in .data!
BUG: key
ffff8800373550a8 not in .data!
BUG: key
ffff8800373550e0 not in .data!
BUG: key
ffff8800378c2670 not in .data!
BUG: key
ffff8800378c2638 not in .data!
BUG: key
ffff8800378c26a8 not in .data!
BUG: key
ffff8800378c26e0 not in .data!
BUG: key
ffff880036ef7e70 not in .data!
BUG: key
ffff880036ef7e38 not in .data!
BUG: key
ffff880036ef7ea8 not in .data!
BUG: key
ffff880036ef7ee0 not in .data!
Cc: Eric W. Biederman <ebiederm@xmission.com>
Reported-by: Dhaval Giani <dhaval.giani@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Tested-by: Dhaval Giani <dhaval.giani@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Randy Dunlap [Tue, 6 Apr 2010 23:16:59 +0000 (16:16 -0700)]
Documentation/HOWTO: update git home URL
Update git home page info.
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Stefan Richter [Thu, 1 Apr 2010 20:01:52 +0000 (22:01 +0200)]
Documentation: -stable rules: upstream commit ID requirement reworded
It is a hard requirement to include the upstream commit ID in the
changelog of a -stable submission, not just a courtesy to the stable
team. This concerns only mail submission though, which is no longer
the only way into stable. (Also, fix a double "the".)
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Dinh Nguyen [Tue, 13 Apr 2010 16:13:15 +0000 (11:13 -0500)]
usb: Increase timeout value for device reset
It seems that for USB IP on Freescale MX5x processors, it needs >750
usec for the reset to complete. This change should not hurt any other
EHCI hardware.
Signed-off-by: Dinh Nguyen <Dinh.Nguyen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Stern [Fri, 9 Apr 2010 20:03:43 +0000 (16:03 -0400)]
USB: put claimed interfaces in the "suspended" state
This patch (as1370) fixes a bug in the USB runtime power management
code. When a driver claims an interface, it doesn't expect to need to
call usb_autopm_get_interface() or usb_autopm_put_interface() for
runtime PM to work. Runtime PM can be controlled by the driver's
primary interface; the additional interfaces it claims shouldn't
interfere. As things stand, the claimed interfaces will prevent the
device from autosuspending.
To fix this problem, the patch sets interfaces to the suspended state
when they are claimed.
Also, although in theory this shouldn't matter, the patch changes the
suspend code so that interfaces are suspended in reverse order from
detection and resuming. This is how the PM core works, and we ought
to use the same approach.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Debugged-and-tested-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Stern [Thu, 8 Apr 2010 20:56:37 +0000 (16:56 -0400)]
USB: EHCI: defer reclamation of siTDs
This patch (as1369) fixes a problem in ehci-hcd. Some controllers
occasionally run into trouble when the driver reclaims siTDs too
quickly. This can happen while streaming audio; it causes the
controller to crash.
The patch changes siTD reclamation to work the same way as iTD
reclamation: Completed siTDs are stored on a list and not reused until
at least one frame has passed.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Nate Case <ncase@xes-inc.com>
CC: <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Stern [Fri, 2 Apr 2010 17:20:11 +0000 (13:20 -0400)]
USB: fix remote wakeup settings during system sleep
This patch (as1363) changes the way USB remote wakeup is handled
during system sleeps. It won't be enabled unless an interface driver
specifically needs it. Also, it won't be enabled during the FREEZE or
QUIESCE phases of hibernation, when the system doesn't respond to
wakeup events anyway. Finally, if the device is already
runtime-suspended with remote wakeup enabled, but wakeup is supposed
to be disabled for the system sleep, the device gets woken up so that
it can be suspended again with the proper wakeup setting.
This will fix problems people have reported with certain USB webcams
that generate wakeup requests when they shouldn't, and as a result
cause system suspends to fail. See
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/515109
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Erik Andrén <erik.andren@gmail.com>
CC: <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Manuel Jander [Mon, 29 Mar 2010 21:51:57 +0000 (23:51 +0200)]
USB: pl2303: add AdLink ND-6530 USB IDs
I read a rumor that the AdLink ND6530 USB RS232, RS422 and RS485
isolated adapter is actually a PL2303 based usb serial adapter. I
tried it out, and as far as I can tell it works.
Signed-off-by: Manuel Jander <manuel.jander@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
William Lightning [Fri, 26 Mar 2010 17:51:20 +0000 (10:51 -0700)]
USB: Add id for HP ev2210 a.k.a Sierra MC5725 miniPCI-e Cell Modem.
Signed-off-by: William Lightning <kassah@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sergei Shtylyov [Fri, 26 Mar 2010 14:37:14 +0000 (17:37 +0300)]
USB: OHCI: DA8xx/OMAP-L1x: fix up macro rename
It appears that the DA8xx/OMAP-L1x glue layer went into the kernel uncompilable:
commit
1960e693ac12ae5fe518309d6a63a44c93fad9e7 (davinci: da8xx/omapl1: add
support for the second sysconfig module) has renamed DA8XX_SYSCFG_* macros to
DA8XX_SYSCFG0_* and it's been committed before the glue layer...
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Dan Williams [Tue, 23 Mar 2010 10:08:48 +0000 (03:08 -0700)]
USB: qcaux: add LG Rumor and Sanyo Katana LX device IDs
These phones also have the familiar ttyACM0/ttyUSB0 schizophrenia when
placed into "Dial-up Networking" mode after connecting a USB cable.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David Vrabel [Mon, 22 Mar 2010 14:50:14 +0000 (14:50 +0000)]
usb: wusb: don't overflow the Keep Alive IE buffer
The Keep Alive IE only has space for WUIE_ELT_MAX (== 4) device addresses.
Signed-off-by: David Vrabel <david.vrabel@csr.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Ajay Kumar Gupta [Thu, 18 Mar 2010 11:28:35 +0000 (16:58 +0530)]
USB: ehci: omap: fix kernel panic with rmmod
Sets the regulator values to NULL if they are not defined. This
is required to fix the kernel panic in exit path when EHCI module
is removed on the platforms where EHCI regulator are not set.
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Harrison Metzger [Tue, 9 Mar 2010 20:12:10 +0000 (15:12 -0500)]
USB: fixed bug in usbsevseg using USB autosuspend incorrectly
This patch fixes a bug with the usbsevseg driver which assumed that USB
autosuspend will always be used.
Signed-off-by: Harrison Metzger <harrisonmetz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alex Manoussakis [Thu, 22 Apr 2010 22:18:20 +0000 (15:18 -0700)]
USB: ti_usb_3410_5052: adding multitech dialup fax/modem devices
The following patch adds support for Multitech Systems' MT9234MU and
MT9234ZBA usb dialup fax modems. It is based on a patch and firmware
provided to me by Multitech Systems' support, after I reported to them
that my MT9234MU modem was not working with recent linux kernels.
Signed-off-by: Alex Manoussakis <alex@juniper.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jesse Barnes [Wed, 21 Apr 2010 18:39:23 +0000 (11:39 -0700)]
drm/i915: use PIPE_CONTROL instruction on Ironlake and Sandy Bridge
Since 965, the hardware has supported the PIPE_CONTROL command, which
provides fine grained GPU cache flushing control. On recent chipsets,
this instruction is required for reliable interrupt and sequence number
reporting in the driver.
So add support for this instruction, including workarounds, on Ironlake
and Sandy Bridge hardware.
https://bugs.freedesktop.org/show_bug.cgi?id=27108
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Tested-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
NeilBrown [Thu, 22 Apr 2010 21:08:28 +0000 (07:08 +1000)]
md/raid5: fix previous patch.
Previous patch changes stripe and chunk_number to sector_t but
mistakenly did not update all of the divisions to use sector_dev().
This patch changes all the those divisions (actually the '%' operator)
to sector_div.
Signed-off-by: NeilBrown <neilb@suse.de>
Cc: stable@kernel.org
Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Jesse Barnes [Wed, 21 Apr 2010 18:39:22 +0000 (11:39 -0700)]
drm/i915: cleanup FBC buffers at unload time
This keeps the memory manager from complaining when we take it down.
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Linus Torvalds [Thu, 22 Apr 2010 19:54:54 +0000 (12:54 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/ieee1394/linux1394-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
firewire: ohci: wait for local CSR lock access to finish
firewire: ohci: prevent aliasing of locally handled register addresses
firewire: core: fw_iso_resource_manage: return -EBUSY when out of resources
firewire: core: fix retries calculation in iso manage_channel()
firewire: cdev: fix cut+paste mistake in disclaimer
Valdis.Kletnieks@vt.edu [Thu, 22 Apr 2010 18:29:10 +0000 (14:29 -0400)]
dri-devel mailing list moved - update MAINTAINERS
I posted to dri-devel@lists.sourceforge.net, and got a bounce back:
The dri-devel list has moved to freedesktop.org (see
http://lists.freedesktop.org/mailman/listinfo/dri-devel). If you were
subscribed to the list here, the subscription should have been
transferred to the new location.
Please only post to the new list.
Fix MAINTAINERS to correspond.
Signed-off-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Thu, 22 Apr 2010 18:15:33 +0000 (11:15 -0700)]
Merge branch 'slabh' of git://git./linux/kernel/git/tj/misc
* 'slabh' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc:
uml: Fix build breakage after slab.h changes
Randy Dunlap [Thu, 22 Apr 2010 18:02:14 +0000 (11:02 -0700)]
scsi: fix operator precedence warning
Fix operator precedence warning (from sparse), which results in the
data value always being 0:
drivers/scsi/qla4xxx/ql4_mbx.c:470:66: warning: right shift by bigger than source value
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Ravi Anand <ravi.anand@qlogic.com>
Cc: David C Somayajulu <david.somayajulu@qlogic.com>
Cc: Karen Higgins <karen.higgins@qlogic.com>
Cc: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Thu, 22 Apr 2010 15:43:59 +0000 (08:43 -0700)]
Merge branch 'for-linus' of git://git390.marist.edu/linux-2.6
* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
[S390] zcore: Fix reipl device detection
[S390] vdso: use ntp adjusted clock multiplier
[S390] cio: use exception-save stsch
[S390] add hook to reenable mss after hibernation
[S390] cio: allow enable_facility from outside init functions
[S390] dasd: fix endless loop in erp
Michael Holzheu [Thu, 22 Apr 2010 15:17:07 +0000 (17:17 +0200)]
[S390] zcore: Fix reipl device detection
The reipl device information is passed from the kernel to zfcpdump
using a pointer in the lowcore (0xe00) that points to the reipl
information Currently if that pointer is not zero, we copy the reipl
information. If the pointer is not initialized and points outside
the accessible memory, it can happen that the memory copy fails.
In that case we currently stop the initialization of zcore which leads
to a failing kernel dump. The correct behavior is to disable the reipl
after dump and continue with zcore intialization.
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Hendrik Brueckner [Thu, 22 Apr 2010 15:17:06 +0000 (17:17 +0200)]
[S390] vdso: use ntp adjusted clock multiplier
Commit "timekeeping: Fix clock_gettime vsyscall time warp" (
0696b711e)
introduced the new parameter "mult" to update_vsyscall(). This parameter
contains the internal NTP adjusted clock multiplier.
The s390x vdso did not use this adjusted multiplier. Instead, it used
the constant clock multiplier for gettimeofday() and clock_gettime()
variants. This may result in observable time warps as explained in
commit
0696b711e.
Make the NTP adjusted clock multiplier available to the s390x vdso
implementation and use it for time calculations.
Cc: <stable@kernel.org>
Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Sebastian Ott [Thu, 22 Apr 2010 15:17:05 +0000 (17:17 +0200)]
[S390] cio: use exception-save stsch
Using stsch on schids with ssid != 0 can lead to an operand
exception. Use stsch_err to handle potential exceptions
if we fail to reenable mss after hibernation.
Cc: <stable@kernel.org>
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Sebastian Ott [Thu, 22 Apr 2010 15:17:04 +0000 (17:17 +0200)]
[S390] add hook to reenable mss after hibernation
Reenable multiple subchannel sets after hibernation,
prior to the device callbacks.
Cc: <stable@kernel.org>
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Sebastian Ott [Thu, 22 Apr 2010 15:17:03 +0000 (17:17 +0200)]
[S390] cio: allow enable_facility from outside init functions
Prepare chsc_enable_facility to be used from outside init functions.
Use static memory for the chsc call and protect its access by a
spinlock (although there is no concurrent usage).
Cc: <stable@kernel.org>
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Stefan Haberland [Thu, 22 Apr 2010 15:17:02 +0000 (17:17 +0200)]
[S390] dasd: fix endless loop in erp
If not enough memory is available to build a new erp request it ended
up in an endless loop trying to build erp requests. Fixed the loop to
proceed the next request instead.
Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Linus Torvalds [Thu, 22 Apr 2010 14:50:11 +0000 (07:50 -0700)]
Merge git://git./linux/kernel/git/jejb/scsi-rc-fixes-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
[SCSI] bnx2i: Bug fixes related to MTU change issue when there are active iscsi sessions
[SCSI] ibmvscsi: fix DMA API misuse
[SCSI] wd7000: fix reset handler typo spin_unlock_irq() => spin_lock_irq()
[SCSI] zfcp: Fix tracing of requests with error status
[SCSI] zfcp: Update MAINTAINERS entry
[SCSI] iscsi_tcp: fix relogin/shutdown hang
[SCSI] qla2xxx: fix lock imbalance
[SCSI] lpfc: fix lock imbalances
[SCSI] be2iscsi: fix lock imbalance
[SCSI] dpt_i2o: several use after free issues
Balbir Singh [Thu, 22 Apr 2010 02:52:34 +0000 (12:22 +0930)]
virtio: Fix GFP flags passed from the virtio balloon driver
The virtio balloon driver can dig into the reservation pools of the OS
to satisfy a balloon request. This is not advisable and other balloon
drivers (drivers/xen/balloon.c) avoid this as well.
The patch also adds changes to avoid printing a warning if allocation
fails, since we retry after sometime anyway.
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: kvm <kvm@vger.kernel.org>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Thu, 22 Apr 2010 14:20:30 +0000 (07:20 -0700)]
Merge branch 'for-linus/i2c' of git://git.fluff.org/bjdooks/linux
* 'for-linus/i2c' of git://git.fluff.org/bjdooks/linux:
i2c-stu300: off by one issue
i2c-pnx: Add stop conditions for end of transfer
i2c-pnx: Limit maximum divider to 1023
i2c-omap: fix OOPS in omap_i2c_unidle() during probe
i2c-imx: fix error handling
Randy Dunlap [Wed, 21 Apr 2010 21:32:47 +0000 (14:32 -0700)]
staging: fix dt3155 build
When the dt3155 driver is built-in (not as a loadable module),
these build errors happen:
drivers/staging/dt3155/dt3155_drv.c:1047: error: implicit declaration of function 'request_irq'
drivers/staging/dt3155/dt3155_drv.c:1048: error: 'IRQF_SHARED' undeclared (first use in this function)
drivers/staging/dt3155/dt3155_drv.c:1048: error: 'IRQF_DISABLED' undeclared (first use in this function)
drivers/staging/dt3155/dt3155_drv.c:1091: error: implicit declaration of function 'free_irq'
so remove the #ifdef MODULE check since it's not needed. Also remove
the CONFIG_PCI check since the Kconfig file already requires that.
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Scott Smedley <ss@aao.gov.au>
Tested-by: Jan III Sobieski <jan3sobi3ski@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Thu, 22 Apr 2010 14:17:09 +0000 (07:17 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jmorris/security-testing-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
security: testing the wrong variable in create_by_name()
CRED: Fix a race in creds_are_invalid() in credentials debugging
CRED: Fix double free in prepare_usermodehelper_creds() error handling
Dan Carpenter [Thu, 22 Apr 2010 10:05:35 +0000 (12:05 +0200)]
security: testing the wrong variable in create_by_name()
There is a typo here. We should be testing "*dentry" instead of
"dentry". If "*dentry" is an ERR_PTR, it gets dereferenced in either
mkdir() or create() which would cause an OOPs.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: James Morris <jmorris@namei.org>
Ian Munsie [Tue, 20 Apr 2010 06:58:33 +0000 (16:58 +1000)]
perf probe: Add PowerPC DWARF register number mappings
This adds mappings from the register numbers from DWARF to the
register names used in the PowerPC Regs and Stack Access API. This
allows perf probe to be used to record variable contents on PowerPC.
This requires the functionality represented by the config symbol
HAVE_REGS_AND_STACK_ACCESS_API in order to function, although it will
compile without it. That functionality is added for PowerPC in commit
359e4284 ("powerpc: Add kprobe-based event tracer").
Signed-off-by: Ian Munsie <imunsie@au.ibm.com>
Acked-by: Masami Hiramatsu <mhiramat@redhat.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Ian Munsie [Tue, 20 Apr 2010 06:58:32 +0000 (16:58 +1000)]
perf: Move arch specific code into separate arch directory
The perf userspace tool included some architecture specific code to map
registers from the DWARF register number into the names used by the regs
and stack access API.
This moves the architecture specific code out into a separate
arch/x86 directory along with the infrastructure required to use it.
Signed-off-by: Ian Munsie <imunsie@au.ibm.com>
Acked-by: Masami Hiramatsu <mhiramat@redhat.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
David Howells [Wed, 21 Apr 2010 09:28:25 +0000 (10:28 +0100)]
CRED: Fix a race in creds_are_invalid() in credentials debugging
creds_are_invalid() reads both cred->usage and cred->subscribers and then
compares them to make sure the number of processes subscribed to a cred struct
never exceeds the refcount of that cred struct.
The problem is that this can cause a race with both copy_creds() and
exit_creds() as the two counters, whilst they are of atomic_t type, are only
atomic with respect to themselves, and not atomic with respect to each other.
This means that if creds_are_invalid() can read the values on one CPU whilst
they're being modified on another CPU, and so can observe an evolving state in
which the subscribers count now is greater than the usage count a moment
before.
Switching the order in which the counts are read cannot help, so the thing to
do is to remove that particular check.
I had considered rechecking the values to see if they're in flux if the test
fails, but I can't guarantee they won't appear the same, even if they've
changed several times in the meantime.
Note that this can only happen if CONFIG_DEBUG_CREDENTIALS is enabled.
The problem is only likely to occur with multithreaded programs, and can be
tested by the tst-eintr1 program from glibc's "make check". The symptoms look
like:
CRED: Invalid credentials
CRED: At include/linux/cred.h:240
CRED: Specified credentials:
ffff88003dda5878 [real][eff]
CRED: ->magic=
43736564, put_addr=(null)
CRED: ->usage=766, subscr=766
CRED: ->*uid = { 0,0,0,0 }
CRED: ->*gid = { 0,0,0,0 }
CRED: ->security is
ffff88003d72f538
CRED: ->security {359, 359}
------------[ cut here ]------------
kernel BUG at kernel/cred.c:850!
...
RIP: 0010:[<
ffffffff81049889>] [<
ffffffff81049889>] __invalid_creds+0x4e/0x52
...
Call Trace:
[<
ffffffff8104a37b>] copy_creds+0x6b/0x23f
Note the ->usage=766 and subscr=766. The values appear the same because
they've been re-read since the check was made.
Reported-by: Roland McGrath <roland@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
Linus Torvalds [Wed, 21 Apr 2010 19:33:12 +0000 (12:33 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/gerg/m68knommu
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
m68knommu: allow 4 coldfire serial ports
m68knommu: fix coldfire tcdrain
m68knommu: remove a duplicate vector setting line for 68360
Fix m68k-uclinux's rt_sigreturn trampoline
m68knommu: correct the CC flags for Coldfire M5272 targets
uclinux: error message when FLAT reloc symbol is invalid, v2
Linus Torvalds [Wed, 21 Apr 2010 19:31:52 +0000 (12:31 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/lrg/voltage-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6:
mc13783-regulator: fix a memory leak in mc13783_regulator_remove
regulator: Let drivers know when they use the stub API
Linus Torvalds [Wed, 21 Apr 2010 19:31:12 +0000 (12:31 -0700)]
Merge git://git./linux/kernel/git/joern/logfs
* git://git.kernel.org/pub/scm/linux/kernel/git/joern/logfs:
[LogFS] Split large truncated into smaller chunks
[LogFS] Set s_bdi
[LogFS] Prevent mempool_destroy NULL pointer dereference
[LogFS] Move assertion
[LogFS] Plug 8 byte information leak
[LogFS] Prevent memory corruption on large deletes
[LogFS] Remove unused method
Fix trivial conflict with added header includes in fs/logfs/super.c
Linus Torvalds [Wed, 21 Apr 2010 19:30:07 +0000 (12:30 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/shaggy/jfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6:
jfs: add jfs specific ->setattr call
jfs: fix diAllocExt error in resizing filesystem
jfs_dmap.[ch]: trivial typo fix: s/heigth/height/g
Linus Torvalds [Wed, 21 Apr 2010 19:29:46 +0000 (12:29 -0700)]
Merge branch 'kvm-updates/2.6.34' of git://git./virt/kvm/kvm
* 'kvm-updates/2.6.34' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
KVM: x86: Fix TSS size check for 16-bit tasks
KVM: Add missing srcu_read_lock() for kvm_mmu_notifier_release()
KVM: Increase NR_IOBUS_DEVS limit to 200
KVM: fix the handling of dirty bitmaps to avoid overflows
KVM: MMU: fix kvm_mmu_zap_page() and its calling path
KVM: VMX: Save/restore rflags.vm correctly in real mode
KVM: allow bit 10 to be cleared in MSR_IA32_MC4_CTL
KVM: Don't spam kernel log when injecting exceptions due to bad cr writes
KVM: SVM: Fix memory leaks that happen when svm_create_vcpu() fails
KVM: take srcu lock before call to complete_pio()
Linus Torvalds [Wed, 21 Apr 2010 19:28:44 +0000 (12:28 -0700)]
Merge branch 'for-linus' of git://neil.brown.name/md
* 'for-linus' of git://neil.brown.name/md:
md/raid5: allow for more than 2^31 chunks.
David Howells [Wed, 21 Apr 2010 11:01:23 +0000 (12:01 +0100)]
AFS: Don't pass error value to page_cache_release() in error handling
In the error handling in afs_mntpt_do_automount(), we pass an error
pointer to page_cache_release() if read_mapping_page() failed. Instead,
we should extend the gotos around the error handling we don't need.
Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jan Kiszka [Wed, 14 Apr 2010 14:57:11 +0000 (16:57 +0200)]
KVM: x86: Fix TSS size check for 16-bit tasks
A 16-bit TSS is only 44 bytes long. So make sure to test for the correct
size on task switch.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Lai Jiangshan [Tue, 20 Apr 2010 06:29:29 +0000 (14:29 +0800)]
KVM: Add missing srcu_read_lock() for kvm_mmu_notifier_release()
I got this dmesg due to srcu_read_lock() is missing in
kvm_mmu_notifier_release().
===================================================
[ INFO: suspicious rcu_dereference_check() usage. ]
---------------------------------------------------
arch/x86/kvm/x86.h:72 invoked rcu_dereference_check() without protection!
other info that might help us debug this:
rcu_scheduler_active = 1, debug_locks = 0
2 locks held by qemu-system-x86/3100:
#0: (rcu_read_lock){.+.+..}, at: [<
ffffffff810d73dc>] __mmu_notifier_release+0x38/0xdf
#1: (&(&kvm->mmu_lock)->rlock){+.+...}, at: [<
ffffffffa0130a6a>] kvm_mmu_zap_all+0x21/0x5e [kvm]
stack backtrace:
Pid: 3100, comm: qemu-system-x86 Not tainted 2.6.34-rc3-22949-gbc8a97a-dirty #2
Call Trace:
[<
ffffffff8106afd9>] lockdep_rcu_dereference+0xaa/0xb3
[<
ffffffffa0123a89>] unalias_gfn+0x56/0xab [kvm]
[<
ffffffffa0119600>] gfn_to_memslot+0x16/0x25 [kvm]
[<
ffffffffa012ffca>] gfn_to_rmap+0x17/0x6e [kvm]
[<
ffffffffa01300c1>] rmap_remove+0xa0/0x19d [kvm]
[<
ffffffffa0130649>] kvm_mmu_zap_page+0x109/0x34d [kvm]
[<
ffffffffa0130a7e>] kvm_mmu_zap_all+0x35/0x5e [kvm]
[<
ffffffffa0122870>] kvm_arch_flush_shadow+0x16/0x22 [kvm]
[<
ffffffffa01189e0>] kvm_mmu_notifier_release+0x15/0x17 [kvm]
[<
ffffffff810d742c>] __mmu_notifier_release+0x88/0xdf
[<
ffffffff810d73dc>] ? __mmu_notifier_release+0x38/0xdf
[<
ffffffff81040848>] ? exit_mm+0xe0/0x115
[<
ffffffff810c2cb0>] exit_mmap+0x2c/0x17e
[<
ffffffff8103c472>] mmput+0x2d/0xd4
[<
ffffffff81040870>] exit_mm+0x108/0x115
[...]
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Frederic Weisbecker [Wed, 21 Apr 2010 00:01:05 +0000 (02:01 +0200)]
perf: Fix perf probe build error
When we run into dry run mode, we want to make
write_kprobe_trace_event to succeed on writing the event. Let's
initialize it to 0.
Fixes the following build error:
util/probe-event.c:1266: attention : «ret» may be used uninitialized in this function
util/probe-event.c:1266: note: «ret» was declared here
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Acked-by: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <
1271808065-25290-1-git-send-regression-fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Philippe De Muyter [Thu, 18 Mar 2010 10:37:13 +0000 (11:37 +0100)]
m68knommu: allow 4 coldfire serial ports
Fix driver/serial/mcf.c for 4-ports coldfire's (e.g. MCF5484).
Signed-off-by: Philippe De Muyter <phdm@macqel.be>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Philippe De Muyter [Fri, 2 Apr 2010 15:56:08 +0000 (17:56 +0200)]
m68knommu: fix coldfire tcdrain
Fix tcdrain on coldfire uarts.
Currently with coldfire uarts tcdrain returns without waiting for txempty,
because (tx)fifosize is 0. Fix that and call uart_update_timeout when
setting the baud rate, otherwise tcdrain will wait for an half our :)
Also constify mcf_uart_ops.
Signed-off-by: Philippe De Muyter <phdm@macqel.be>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Greg Ungerer [Fri, 19 Feb 2010 01:27:37 +0000 (11:27 +1000)]
m68knommu: remove a duplicate vector setting line for 68360
Remove a duplicate vector setting line for the 68360 interrupt
setup. Pointed out by Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Maxim Kuvyrkov [Tue, 22 Sep 2009 21:25:44 +0000 (01:25 +0400)]
Fix m68k-uclinux's rt_sigreturn trampoline
Signed-off-by: Maxim Kuvyrkov <maxim@codesourcery.com>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Philip Nye [Tue, 12 Jan 2010 00:18:03 +0000 (10:18 +1000)]
m68knommu: correct the CC flags for Coldfire M5272 targets
Signed-off-by: Philip Nye <philipn@engarts.com>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Jun Sun [Fri, 1 Jan 2010 01:28:52 +0000 (17:28 -0800)]
uclinux: error message when FLAT reloc symbol is invalid, v2
This patch fixes a cosmetic error in printk. Text segment and data/bss
segment are allocated from two different areas. It is not meaningful to
give the diff between them in the error reporting messages.
Signed-off-by: Jun Sun <jsun@junsun.net>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
David Howells [Tue, 20 Apr 2010 21:41:18 +0000 (22:41 +0100)]
CRED: Fix double free in prepare_usermodehelper_creds() error handling
Patch
570b8fb505896e007fd3bb07573ba6640e51851d:
Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Date: Tue Mar 30 00:04:00 2010 +0100
Subject: CRED: Fix memory leak in error handling
attempts to fix a memory leak in the error handling by making the offending
return statement into a jump down to the bottom of the function where a
kfree(tgcred) is inserted.
This is, however, incorrect, as it does a kfree() after doing put_cred() if
security_prepare_creds() fails. That will result in a double free if 'error'
is jumped to as put_cred() will also attempt to free the new tgcred record by
virtue of it being pointed to by the new cred record.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
Joern Engel [Tue, 20 Apr 2010 19:44:10 +0000 (21:44 +0200)]
[LogFS] Split large truncated into smaller chunks
Truncate would do an almost limitless amount of work without invoking
the garbage collector in between. Split it up into more manageable,
though still large, chunks.
Signed-off-by: Joern Engel <joern@logfs.org>
Linus Torvalds [Tue, 20 Apr 2010 16:39:40 +0000 (09:39 -0700)]
Merge branch 'for_linus' of git://git./linux/kernel/git/jack/linux-fs-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6:
quota: Convert __DQUOT_PARANOIA symbol to standard config option
Jan Kara [Mon, 19 Apr 2010 14:47:20 +0000 (16:47 +0200)]
quota: Convert __DQUOT_PARANOIA symbol to standard config option
Make __DQUOT_PARANOIA define from the old days a standard config option
and turn it off by default.
This gets rid of a quota warning about writes before quota is turned on
for systems with ext4 root filesystem. Currently there's no way to legally
solve this because /etc/mtab has to be written before quota is turned on
on most systems.
Signed-off-by: Jan Kara <jack@suse.cz>
Linus Torvalds [Tue, 20 Apr 2010 16:21:19 +0000 (09:21 -0700)]
Merge branch 'urgent' of git://git./linux/kernel/git/brodo/pcmcia-2.6
* 'urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6:
pcmcia: fix error handling in cm4000_cs.c
drivers/pcmcia: Add missing local_irq_restore
serial_cs: MD55x support (PCMCIA GPRS/EDGE modem) (kernel 2.6.33)
pcmcia: avoid late calls to pccard_validate_cis
pcmcia: fix ioport size calculation in rsrc_nonstatic
pcmcia: re-start on MFC override
pcmcia: fix io_probe due to parent (PCI) resources
pcmcia: use previously assigned IRQ for all card functions
Linus Torvalds [Tue, 20 Apr 2010 16:20:55 +0000 (09:20 -0700)]
Merge git://git./linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
sparc64: Fix hardirq tracing in trap return path.
sparc64: Use correct pt_regs in decode_access_size() error paths.
sparc64: Fix PREEMPT_ACTIVE value.
sparc64: Run NMIs on the hardirq stack.
sparc64: Allocate sufficient stack space in ftrace stubs.
sparc: Fix forgotten kmemleak headers inclusion
Linus Torvalds [Tue, 20 Apr 2010 16:20:23 +0000 (09:20 -0700)]
Merge branch 'perf-fixes-for-linus' of git://git./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 unsafe frame rewinding with hot regs fetching
Linus Torvalds [Tue, 20 Apr 2010 16:20:11 +0000 (09:20 -0700)]
Merge branch 'drm-linus' of git://git./linux/kernel/git/airlied/drm-2.6
* 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
drm: delay vblank cleanup until after driver unload
Christoph Hellwig [Tue, 20 Apr 2010 03:31:02 +0000 (05:31 +0200)]
x86: correctly wire up the newuname system call
Before commit
e28cbf22933d0c0ccaf3c4c27a1a263b41f73859 ("improve
sys_newuname() for compat architectures") 64-bit x86 had a private
implementation of sys_uname which was just called sys_uname, which other
architectures used for the old uname.
Due to some merge issues with the uname refactoring patches we ended up
calling the old uname version for both the old and new system call
slots, which lead to the domainname filed never be set which caused
failures with libnss_nis.
Reported-and-tested-by: Andy Isaacson <adi@hexapodia.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Sridhar Samudrala [Tue, 30 Mar 2010 23:48:25 +0000 (16:48 -0700)]
KVM: Increase NR_IOBUS_DEVS limit to 200
This patch increases the current hardcoded limit of NR_IOBUS_DEVS
from 6 to 200. We are hitting this limit when creating a guest with more
than 1 virtio-net device using vhost-net backend. Each virtio-net
device requires 2 such devices to service notifications from rx/tx queues.
Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Takuya Yoshikawa [Mon, 12 Apr 2010 10:35:35 +0000 (19:35 +0900)]
KVM: fix the handling of dirty bitmaps to avoid overflows
Int is not long enough to store the size of a dirty bitmap.
This patch fixes this problem with the introduction of a wrapper
function to calculate the sizes of dirty bitmaps.
Note: in mark_page_dirty(), we have to consider the fact that
__set_bit() takes the offset as int, not long.
Signed-off-by: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Xiao Guangrong [Fri, 16 Apr 2010 08:34:42 +0000 (16:34 +0800)]
KVM: MMU: fix kvm_mmu_zap_page() and its calling path
This patch fix:
- calculate zapped page number properly in mmu_zap_unsync_children()
- calculate freeed page number properly kvm_mmu_change_mmu_pages()
- if zapped children page it shoud restart hlist walking
KVM-Stable-Tag.
Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Avi Kivity [Thu, 8 Apr 2010 15:19:35 +0000 (18:19 +0300)]
KVM: VMX: Save/restore rflags.vm correctly in real mode
Currently we set eflags.vm unconditionally when entering real mode emulation
through virtual-8086 mode, and clear it unconditionally when we enter protected
mode. The means that the following sequence
KVM_SET_REGS (rflags.vm=1)
KVM_SET_SREGS (cr0.pe=1)
Ends up with rflags.vm clear due to KVM_SET_SREGS triggering enter_pmode().
Fix by shadowing rflags.vm (and rflags.iopl) correctly while in real mode:
reads and writes to those bits access a shadow register instead of the actual
register.
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>