aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-05-22KVM: mmio_fault_cr2 is not usedGleb Natapov2-2/+1
Remove unused variable mmio_fault_cr2. Signed-off-by: Gleb Natapov <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
2011-05-22KVM: x86 emulator: consolidate group handlingAvi Kivity1-40/+40
Move all groups into a single field and handle them in a single place. This saves bits when we add more group types (3 bits -> 7 groups types). Signed-off-by: Avi Kivity <[email protected]>
2011-05-22KVM: MMU: Add unlikely() annotations to walk_addr_generic()Avi Kivity1-13/+15
walk_addr_generic() is a hot path and is also hard for the cpu to predict - some of the parameters (fetch_fault in particular) vary wildly from invocation to invocation. Add unlikely() annotations where appropriate; all walk failures are considered unlikely, as are cases where we have to mark the accessed or dirty bit, as they are slow paths both in kvm and on real processors. Signed-off-by: Avi Kivity <[email protected]>
2011-05-22KVM: x86 emulator: Use opcode::execute for PUSHF/POPF (9C/9D)Takuya Yoshikawa1-11/+20
For this, em_pushf/popf() are introduced. Signed-off-by: Takuya Yoshikawa <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
2011-05-22KVM: x86 emulator: Use opcode::execute for PUSHA/POPA (60/61)Takuya Yoshikawa1-11/+5
For this, emulate_pusha/popa() are converted to em_pusha/popa(). Signed-off-by: Takuya Yoshikawa <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
2011-05-22KVM: x86 emulator: Use opcode::execute for POP reg (58-5F)Takuya Yoshikawa1-6/+10
In addition, the RET emulation is changed to call em_pop() to remove the pop_instruction label. Signed-off-by: Takuya Yoshikawa <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
2011-05-22KVM: x86 emulator: Use opcode::execute for Group 1, CMPS and SCASTakuya Yoshikawa1-72/+89
The following instructions are changed to use opcode::execute. Group 1 (80-83) ADD (00-05), OR (08-0D), ADC (10-15), SBB (18-1D), AND (20-25), SUB (28-2D), XOR (30-35), CMP (38-3D) CMPS (A6-A7), SCAS (AE-AF) The last two do the same as CMP in the emulator, so em_cmp() is used. Signed-off-by: Takuya Yoshikawa <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
2011-05-22KVM: MMU: Optimize guest page table walkTakuya Yoshikawa1-3/+20
This patch optimizes the guest page table walk by using get_user() instead of copy_from_user(). With this patch applied, paging64_walk_addr_generic() has become about 0.5us to 1.0us faster on my Phenom II machine with NPT on. Signed-off-by: Takuya Yoshikawa <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
2011-05-22KVM: SVM: Get rid of x86_intercept_map::validAvi Kivity2-8/+5
By reserving 0 as an invalid x86_intercept_stage, we no longer need to store a valid flag in x86_intercept_map. Signed-off-by: Avi Kivity <[email protected]>
2011-05-22KVM: x86 emulator: Use opcode::execute for 0F 01 opcodeAvi Kivity1-43/+13
Signed-off-by: Avi Kivity <[email protected]>
2011-05-22KVM: x86 emulator: Don't force #UD for 0F 01 /5Avi Kivity1-3/+0
While it isn't defined, no need to force a #UD. If it becomes defined in the future this can cause wierd problems for the guest. Signed-off-by: Avi Kivity <[email protected]>
2011-05-22KVM: x86 emulator: move 0F 01 sub-opcodes into their own functionsAvi Kivity1-47/+99
Signed-off-by: Avi Kivity <[email protected]>
2011-05-22KVM: x86 emulator: fix const value warning on i386 in svm insn RAX checkRandy Dunlap1-1/+1
arch/x86/kvm/emulate.c:2598: warning: integer constant is too large for 'long' type Signed-off-by: Randy Dunlap <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
2011-05-22KVM: x86 emulator: avoid calling wbinvd() macroClemens Noss1-1/+1
Commit 0b56652e33c72092956c651ab6ceb9f0ad081153 fails to build: CC [M] arch/x86/kvm/emulate.o arch/x86/kvm/emulate.c: In function 'x86_emulate_insn': arch/x86/kvm/emulate.c:4095:25: error: macro "wbinvd" passed 1 arguments, but takes just 0 arch/x86/kvm/emulate.c:4095:3: warning: statement with no effect make[2]: *** [arch/x86/kvm/emulate.o] Error 1 make[1]: *** [arch/x86/kvm] Error 2 make: *** [arch/x86] Error 2 Work around this for now. Signed-off-by: Clemens Noss <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
2011-05-22KVM: ioapic: Fix an error field referenceLiu Yuan1-1/+1
Function ioapic_debug() in the ioapic_deliver() misnames one filed by reference. This patch correct it. Signed-off-by: Liu Yuan <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
2011-05-22KVM: MMU: Make cmpxchg_gpte aware of nesting tooRoedel, Joerg1-7/+23
This patch makes the cmpxchg_gpte() function aware of the difference between l1-gfns and l2-gfns when nested virtualization is in use. This fixes a potential data-corruption problem in the l1-guest and makes the code work correct (at least as correct as the hardware which is emulated in this code) again. Cc: [email protected] Signed-off-by: Joerg Roedel <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
2011-05-22KVM: x86 emulator: drop x86_emulate_ctxt::vcpuAvi Kivity2-3/+0
No longer used. Signed-off-by: Avi Kivity <[email protected]>
2011-05-22KVM: Avoid using x86_emulate_ctxt.vcpuAvi Kivity1-1/+1
We can use container_of() instead. Signed-off-by: Avi Kivity <[email protected]>
2011-05-22KVM: x86 emulator: add new ->wbinvd() callbackAvi Kivity3-1/+8
Instead of calling kvm_emulate_wbinvd() directly. Signed-off-by: Avi Kivity <[email protected]>
2011-05-22KVM: x86 emulator: add ->fix_hypercall() callbackAvi Kivity4-5/+8
Artificial, but needed to remove direct calls to KVM. Signed-off-by: Avi Kivity <[email protected]>
2011-05-22KVM: x86 emulator: add new ->halt() callbackAvi Kivity3-1/+8
Instead of reaching into vcpu internals. Signed-off-by: Avi Kivity <[email protected]>
2011-05-22KVM: x86 emulator: make emulate_invlpg() an emulator callbackAvi Kivity4-5/+5
Removing direct calls to KVM. Signed-off-by: Avi Kivity <[email protected]>
2011-05-22KVM: x86 emulator: emulate CLTS internallyAvi Kivity3-9/+11
Avoid using ctxt->vcpu; we can do everything with ->get_cr() and ->set_cr(). A side effect is that we no longer activate the fpu on emulated CLTS; but that should be very rare. Signed-off-by: Avi Kivity <[email protected]>
2011-05-22KVM: x86 emulator: Replace calls to is_pae() and is_paging with ->get_cr()Avi Kivity1-2/+2
Avoid use of ctxt->vcpu. Signed-off-by: Avi Kivity <[email protected]>
2011-05-22KVM: x86 emulator: drop use of is_long_mode()Avi Kivity1-7/+12
Requires ctxt->vcpu, which is to be abolished. Replace with open calls to get_msr(). Signed-off-by: Avi Kivity <[email protected]>
2011-05-22KVM: x86 emulator: add and use new callbacks set_idt(), set_gdt()Avi Kivity4-24/+21
Replacing direct calls to realmode_lgdt(), realmode_lidt(). Signed-off-by: Avi Kivity <[email protected]>
2011-05-22KVM: x86 emulator: avoid using ctxt->vcpu in check_perm() callbacksAvi Kivity1-2/+2
Unneeded for register access. Signed-off-by: Avi Kivity <[email protected]>
2011-05-22KVM: x86 emulator: drop vcpu argument from intercept callbackAvi Kivity3-4/+4
Making the emulator caller agnostic. Signed-off-by: Avi Kivity <[email protected]>
2011-05-22KVM: x86 emulator: drop vcpu argument from cr/dr/cpl/msr callbacksAvi Kivity3-59/+73
Making the emulator caller agnostic. Signed-off-by: Avi Kivity <[email protected]>
2011-05-22KVM: x86 emulator: drop vcpu argument from segment/gdt/idt callbacksAvi Kivity3-83/+90
Making the emulator caller agnostic. [Takuya Yoshikawa: fix typo leading to LDT failures] Signed-off-by: Takuya Yoshikawa <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
2011-05-22Merge branch 'perf/core' of ↵Ingo Molnar13-47/+138
git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing into perf/urgent Conflicts: tools/perf/builtin-top.c Semantic conflict: util/include/linux/list.h # fix prefetch.h removal fallout Signed-off-by: Ingo Molnar <[email protected]>
2011-05-22Merge branch 'topic/hda' into for-linusTakashi Iwai15-3276/+4107
2011-05-22Merge branch 'topic/asoc' into for-linusTakashi Iwai112-2596/+15215
2011-05-22Merge branch 'topic/misc' into for-linusTakashi Iwai48-1297/+1722
2011-05-22Merge branch 'topic/lola' into for-linusTakashi Iwai10-0/+3429
2011-05-22Merge branch 'flushing' into for-linusJames Bottomley8-124/+182
2011-05-22Merge branch 'topic/asoc' of ↵Mark Brown13-23/+24
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 into for-2.6.40
2011-05-22ASoC: core: Don't set "(null)" as a driver nameJarkko Nikula1-1/+1
Commit 22de71b ("ASoC: core - allow ASoC more flexible machine name") writes "(null)" to driver name string in struct snd_card if card->driver_name is NULL. This causes segmentation faults with some user space ALSA utilities like aplay and arecord. Fix this by using the card->name if no driver name is specified. Signed-off-by: Jarkko Nikula <[email protected]> Acked-by: Liam Girdwood <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2011-05-22perf tools: Propagate event parse error handlingFrederic Weisbecker4-11/+33
Better handle event parsing error by propagating the details in upper layers or by dumping some failure message. So that the user knows he has some crazy events in the batch. Signed-off-by: Frederic Weisbecker <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Stephane Eranian <[email protected]>
2011-05-22perf tools: Robustify dynamic sample content fetchFrederic Weisbecker1-0/+26
Ensure the size of the dynamic fields such as callchains or raw events don't overlap the whole event boundaries. This prevents from dereferencing junk if the given size of the callchain goes too eager. Reported-by: Linus Torvalds <[email protected]> Reported-by: Ingo Molnar <[email protected]> Signed-off-by: Frederic Weisbecker <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Stephane Eranian <[email protected]>
2011-05-22perf tools: Pre-check sample size before parsingFrederic Weisbecker7-5/+41
Check that the total size of the sample fields having a fixed size do not exceed the one of the whole event. This robustifies the sample parsing. Signed-off-by: Frederic Weisbecker <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Stephane Eranian <[email protected]>
2011-05-22perf tools: Move evlist sample helpers to evlist areaFrederic Weisbecker4-33/+34
These APIs should belong to evlist.c as they may not be exclusively tied to the headers. Signed-off-by: Frederic Weisbecker <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Stephane Eranian <[email protected]
2011-05-22perf tools: Remove junk code in mmap size handlingFrederic Weisbecker1-3/+0
size is overriden later and used only then. Those lines are only junk, probably a leftover. Signed-off-by: Frederic Weisbecker <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Stephane Eranian <[email protected]>
2011-05-22perf tools: Check we are able to read the event size on mmapFrederic Weisbecker1-0/+7
Check we have enough mmaped space to read the current event size from its headers, otherwise we may dereference some hell there. Signed-off-by: Frederic Weisbecker <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Stephane Eranian <[email protected]>
2011-05-21Merge branch 'for-linus' of ↵Linus Torvalds16-117/+140
git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6: firewire: sbp2: parallelize login, reconnect, logout firewire: sbp2: octlet AT payloads can be stack-allocated firewire: sbp2: omit Scsi_Host lock from queuecommand firewire: core: use non-reentrant workqueue with rescuer firewire: optimize iso queueing by setting wake only after the last packet firewire: octlet AT payloads can be stack-allocated firewire: ohci: optimize find_branch_descriptor() firewire: ohci: avoid separate DMA mapping for small AT payloads firewire: ohci: do not start DMA contexts before link is enabled
2011-05-21GFS2: Wait properly when flushing the ail listSteven Whitehouse1-3/+26
The ail flush code has always relied upon log flushing to prevent it from spinning needlessly. This fixes it to wait on the last I/O request submitted (we don't need to wait for all of it) instead of either spinning with io_schedule or sleeping. As a result cpu usage of gfs2_logd is much reduced with certain workloads. Reported-by: Abhijith Das <[email protected]> Tested-by: Abhijith Das <[email protected]> Signed-off-by: Steven Whitehouse <[email protected]>
2011-05-21x86: Eliminate various 'set but not used' warningsGustavo F. Padovan3-16/+5
Signed-off-by: Gustavo F. Padovan <[email protected]> Cc: Joerg Roedel <[email protected]> (supporter:AMD IOMMU (AMD-VI)) Cc: [email protected] (open list:AMD IOMMU (AMD-VI)) Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2011-05-21hwmon: (coretemp) Fix checkpatch errorsGuenter Roeck1-30/+37
Fix remaining checkpatch errors in the coretemp driver. Signed-off-by: Guenter Roeck <[email protected]> Cc: Fenghua Yu <[email protected]> Cc: Durgadoss R <[email protected]> Acked-by: Jean Delvare <[email protected]>
2011-05-21hwmon: Remove pkgtemp driverGuenter Roeck4-488/+0
After the merge of pkgtemp functionality into the coretemp driver, the pkgtemp driver is no longer necessary. Remove it. Signed-off-by: Guenter Roeck <[email protected]> Cc: Fenghua Yu <[email protected]> Acked-by: Jean Delvare <[email protected]>
2011-05-21GFS2: Wipe directory hash table metadata when deallocating a directorySteven Whitehouse2-0/+6
The deallocation code for directories in GFS2 is largely divided into two parts. The first part deallocates any directory leaf blocks and marks the directory as being a regular file when that is complete. The second stage was identical to deallocating regular files. Regular files have their data blocks in a different address space to directories, and thus what would have been normal data blocks in a regular file (the hash table in a GFS2 directory) were deallocated correctly. However, a reference to these blocks was left in the journal (assuming of course that some previous activity had resulted in those blocks being in the journal or ail list). This patch uses the i_depth as a test of whether the inode is an exhash directory (we cannot test the inode type as that has already been changed to a regular file at this stage in deallocation) The original issue was reported by Chris Hertel as an issue he encountered running bonnie++ Reported-by: Christopher R. Hertel <[email protected]> Cc: Abhijith Das <[email protected]> Signed-off-by: Steven Whitehouse <[email protected]>