aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-10-24KVM: x86 emulator: convert some push instructions to direct decodeAvi Kivity1-9/+9
Signed-off-by: Avi Kivity <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2010-10-24KVM: x86 emulator: allow repeat macro arguments to contain commasAvi Kivity1-8/+8
Needed for repeating instructions with execution functions. Signed-off-by: Avi Kivity <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2010-10-24KVM: x86 emulator: move decode tables downwardsAvi Kivity1-236/+236
So they can reference execution functions. Signed-off-by: Avi Kivity <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2010-10-24KVM: x86 emulator: move x86_decode_insn() downwardsAvi Kivity1-372/+372
No code changes. Signed-off-by: Avi Kivity <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2010-10-24KVM: x86 emulator: allow storing emulator execution function in decode tablesAvi Kivity2-0/+13
Instead of looking up the opcode twice (once for decode flags, once for the big execution switch) look up both flags and function in the decode tables. Signed-off-by: Avi Kivity <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2010-10-24KVM: x86 emulator: store x86_emulate_ops in emulation contextAvi Kivity3-11/+13
It doesn't ever change, so we don't need to pass it around everywhere. Signed-off-by: Avi Kivity <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2010-10-24KVM: x86 emulator: move ByteOp and Dst back to bits 0:3Avi Kivity1-8/+8
Now that the group index no longer exists, the space is free. Signed-off-by: Avi Kivity <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2010-10-24KVM: x86 emulator: drop support for old-style groupsAvi Kivity1-25/+7
Signed-off-by: Avi Kivity <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2010-10-24KVM: x86 emulator: convert group 9 to new styleAvi Kivity1-6/+8
Signed-off-by: Avi Kivity <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2010-10-24KVM: x86 emulator: convert group 8 to new styleAvi Kivity1-4/+6
Signed-off-by: Avi Kivity <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2010-10-24KVM: x86 emulator: convert group 7 to new styleAvi Kivity1-8/+10
Signed-off-by: Avi Kivity <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2010-10-24KVM: x86 emulator: convert group 5 to new styleAvi Kivity1-4/+6
Signed-off-by: Avi Kivity <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2010-10-24KVM: x86 emulator: convert group 4 to new styleAvi Kivity1-4/+6
Signed-off-by: Avi Kivity <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2010-10-24KVM: x86 emulator: convert group 3 to new styleAvi Kivity1-4/+6
Signed-off-by: Avi Kivity <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2010-10-24KVM: x86 emulator: convert group 1A to new styleAvi Kivity1-4/+6
Signed-off-by: Avi Kivity <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2010-10-24KVM: x86 emulator: convert group 1 to new styleAvi Kivity1-7/+9
Signed-off-by: Avi Kivity <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2010-10-24KVM: x86 emulator: allow specifying group directly in opcodeAvi Kivity1-9/+38
Instead of having a group number, store the group table pointer directly in the opcode. Signed-off-by: Avi Kivity <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2010-10-24KVM: x86 emulator: reserve group code 0Avi Kivity1-1/+1
We'll be using that to distinguish between new-style and old-style groups. Signed-off-by: Avi Kivity <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2010-10-24KVM: x86 emulator: move group tables to topAvi Kivity1-38/+38
No code changes. Signed-off-by: Avi Kivity <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2010-10-24KVM: x86 emulator: Add wrappers for easily defining opcodesAvi Kivity1-144/+150
Once 'struct opcode' grows, its initializer will become more complicated. Wrap the simple initializers in a D() macro, and replace the empty initializers with an even simpler N macro. Signed-off-by: Avi Kivity <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2010-10-24KVM: x86 emulator: introduce 'struct opcode'Avi Kivity1-8/+12
This will hold all the information known about the opcode. Currently, this is just the decode flags. Signed-off-by: Avi Kivity <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2010-10-24KVM: x86 emulator: drop parentheses in repreat macrosAvi Kivity1-3/+3
The parenthese make is impossible to use the macros with initializers that require braces. Signed-off-by: Avi Kivity <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2010-10-24KVM: x86 emulator: Add IRET instructionMohammed Gamal1-0/+81
Ths patch adds IRET instruction (opcode 0xcf). Currently, only IRET in real mode is emulated. Protected mode support is to be added later if needed. Signed-off-by: Mohammed Gamal <[email protected]> Reviewed-by: Avi Kivity <[email protected]> Reviewed-by: Paolo Bonzini <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2010-10-24KVM: SVM: Emulate next_rip svm featureJoerg Roedel1-1/+7
This patch implements the emulations of the svm next_rip feature in the nested svm implementation in kvm. Signed-off-by: Joerg Roedel <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2010-10-24KVM: SVM: Sync efer back into nested vmcbJoerg Roedel1-0/+1
This patch fixes a bug in a nested hypervisor that heavily switches between real-mode and long-mode. The problem is fixed by syncing back efer into the guest vmcb on emulated vmexit. Signed-off-by: Joerg Roedel <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2010-10-24KVM: MMU: remove valueless output messageXiao Guangrong1-6/+5
After commit 53383eaad08d, the '*spte' has updated before call rmap_remove()(in most case it's 'shadow_trap_nonpresent_pte'), so remove this information from error message Signed-off-by: Xiao Guangrong <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2010-10-24KVM: VMX: Use host_gdt variable wherever we need the host gdtAvi Kivity1-9/+6
Now that we have the host gdt conveniently stored in a variable, make use of it instead of querying the cpu. Signed-off-by: Avi Kivity <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2010-10-24KVM: x86 emulator: unify the two Group 3 variantsAvi Kivity1-8/+3
Use just one group table for byte (F6) and word (F7) opcodes. Signed-off-by: Avi Kivity <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2010-10-24KVM: x86 emulator: Allow LOCK prefix for NEG and NOTAvi Kivity1-2/+2
Opcodes F6/2, F6/3, F7/2, F7/3. Signed-off-by: Avi Kivity <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2010-10-24KVM: x86 emulator: simplify Group 1 decodingAvi Kivity1-40/+7
Move operand decoding to the opcode table, keep lock decoding in the group table. This allows us to get consolidate the four variants of Group 1 into one group. Signed-off-by: Avi Kivity <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2010-10-24KVM: x86 emulator: mix decode bits from opcode and group decode tablesAvi Kivity1-4/+6
Allow bits that are common to all members of a group to be specified in the opcode table instead of the group table. This allows some simplification of the decode tables. Signed-off-by: Avi Kivity <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2010-10-24KVM: x86 emulator: add Undefined decode flagAvi Kivity1-1/+2
Add a decode flag to indicate the instruction is invalid. Will come in useful later, when we mix decode bits from the opcode and group table. Signed-off-by: Avi Kivity <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2010-10-24KVM: x86 emulator: Make group storage bits separate from operand bitsAvi Kivity1-9/+9
Currently group bits are stored in bits 0:7, where operand bits are stored. Make group bits be 0:3, and move the existing bits 0:3 to 16:19, so we can mix group and operand bits. Signed-off-by: Avi Kivity <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2010-10-24KVM: x86 emulator: consolidate Jcc rel32 decodingAvi Kivity1-2/+1
Signed-off-by: Avi Kivity <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2010-10-24KVM: x86 emulator: consolidate CMOVcc decodingAvi Kivity1-10/+2
Signed-off-by: Avi Kivity <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2010-10-24KVM: x86 emulator: consolidate MOV reg, imm decodingAvi Kivity1-8/+2
Signed-off-by: Avi Kivity <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2010-10-24KVM: x86 emulator: consolidate Jcc rel8 decodingAvi Kivity1-6/+2
Signed-off-by: Avi Kivity <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2010-10-24KVM: x86 emulator: consolidate push/pop reg decodingAvi Kivity1-4/+2
Signed-off-by: Avi Kivity <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2010-10-24KVM: x86 emulator: consolidate inc/dec reg decodingAvi Kivity1-4/+2
Signed-off-by: Avi Kivity <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2010-10-24KVM: x86 emulator: add macros for repetitive instructionsAvi Kivity1-0/+9
Some instructions are repetitive in the opcode space, add macros for consolidating them. Signed-off-by: Avi Kivity <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2010-10-24KVM: x86 emulator: fix handling for unemulated instructionsAvi Kivity1-0/+4
If an instruction is present in the decode tables but not in the execution switch, it will be emulated as a NOP. An example is IRET (0xcf). Fix by adding default: labels to the execution switches. Signed-off-by: Avi Kivity <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2010-10-23HID: fix mismerge in hid-lgJiri Kosina1-1/+1
Fix wrong merge in hid-lg -- report fixup functions now get pointer to rdesc. Signed-off-by: Jiri Kosina <[email protected]>
2010-10-23Merge branch 'waltop' into for-linusJiri Kosina6-6/+1118
2010-10-23Merge branch 'uc-logic' into for-linusJiri Kosina23-58/+715
Conflicts: drivers/hid/hid-ids.h drivers/hid/hid-lg.c drivers/hid/usbhid/hid-quirks.c
2010-10-23Merge branches '3m', 'egalax', 'logitech', 'magicmouse', 'ntrig' and ↵Jiri Kosina20-213/+1928
'roccat' into for-linus
2010-10-23Merge branches 'upstream' and 'upstream-fixes' into for-linusJiri Kosina13-98/+174
2010-10-23Merge branch 'for-2.6.37/core' of git://git.kernel.dk/linux-2.6-blockLinus Torvalds2-2/+2
* 'for-2.6.37/core' of git://git.kernel.dk/linux-2.6-block: block: fix use-after-free bug in blk throttle code
2010-10-23Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6Linus Torvalds1341-83259/+156508
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1699 commits) bnx2/bnx2x: Unsupported Ethtool operations should return -EINVAL. vlan: Calling vlan_hwaccel_do_receive() is always valid. tproxy: use the interface primary IP address as a default value for --on-ip tproxy: added IPv6 support to the socket match cxgb3: function namespace cleanup tproxy: added IPv6 support to the TPROXY target tproxy: added IPv6 socket lookup function to nf_tproxy_core be2net: Changes to use only priority codes allowed by f/w tproxy: allow non-local binds of IPv6 sockets if IP_TRANSPARENT is enabled tproxy: added tproxy sockopt interface in the IPV6 layer tproxy: added udp6_lib_lookup function tproxy: added const specifiers to udp lookup functions tproxy: split off ipv6 defragmentation to a separate module l2tp: small cleanup nf_nat: restrict ICMP translation for embedded header can: mcp251x: fix generation of error frames can: mcp251x: fix endless loop in interrupt handler if CANINTF_MERRF is set can-raw: add msg_flags to distinguish local traffic 9p: client code cleanup rds: make local functions/variables static ... Fix up conflicts in net/core/dev.c, drivers/net/pcmcia/smc91c92_cs.c and drivers/net/wireless/ath/ath9k/debug.c as per David
2010-10-23block: fix use-after-free bug in blk throttle codeJens Axboe2-2/+2
blk_throtl_exit() frees the throttle data hanging off the queue in blk_cleanup_queue(), but blk_put_queue() will indirectly dereference this data when calling blk_sync_queue() which in turns calls throtl_shutdown_timer_wq(). Fix this by moving the freeing of the throttle data to when the queue is truly being released, and post the call to blk_sync_queue(). Reported-by: Ingo Molnar <[email protected]> Tested-by: Ingo Molnar <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2010-10-23Merge branches 'softirq-for-linus', 'x86-debug-for-linus', ↵Linus Torvalds15-94/+100
'x86-numa-for-linus', 'x86-quirks-for-linus', 'x86-setup-for-linus', 'x86-uv-for-linus' and 'x86-vm86-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'softirq-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: softirqs: Make wakeup_softirqd static * 'x86-debug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86, asm: Restore parentheses around one pushl_cfi argument x86, asm: Fix ancient-GAS workaround x86, asm: Fix CFI macro invocations to deal with shortcomings in gas * 'x86-numa-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86, numa: Assign CPUs to nodes in round-robin manner on fake NUMA * 'x86-quirks-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86: HPET force enable for CX700 / VIA Epia LT * 'x86-setup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86, setup: Use string copy operation to optimze copy in kernel compression * 'x86-uv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86, UV: Use allocated buffer in tlb_uv.c:tunables_read() * 'x86-vm86-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86, vm86: Fix preemption bug for int1 debug and int3 breakpoint handlers.