[COMMIT master] Merge branch 'upstream-merge'

2010-08-30 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com * upstream-merge: (60 commits) etraxfs_eth: correct use of ! and Sparc: update OpenBIOS images to r859 ppc4xx: load Bamboo kernel, initrd, and fdt at fixed addresses ppc4xx: don't unregister RAM at reset ppc4xx: correct SDRAM controller warning

[COMMIT master] KVM: x86 emulator: add LDS/LES/LFS/LGS/LSS instruction emulation

2010-08-30 Thread Avi Kivity
From: Wei Yongjun yj...@cn.fujitsu.com Add LDS/LES/LFS/LGS/LSS instruction emulation. (opcode 0xc4, 0xc5, 0x0f 0xb2, 0x0f 0xb4~0xb5) Signed-off-by: Wei Yongjun yj...@cn.fujitsu.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c

[COMMIT master] KVM: MMU: fix regression from rework mmu_shrink() code

2010-08-30 Thread Avi Kivity
From: Xiaotian Feng df...@redhat.com Latest kvm mmu_shrink code rework makes kernel changes kvm-arch.n_used_mmu_pages/ kvm-arch.n_max_mmu_pages at kvm_mmu_free_page/kvm_mmu_alloc_page, which is called by kvm_mmu_commit_zap_page. So the kvm-arch.n_used_mmu_pages or

[COMMIT master] KVM: MMU: fix missing percpu counter destroy

2010-08-30 Thread Avi Kivity
From: Wei Yongjun yj...@cn.fujitsu.com commit ad05c88266b4cce1c820928ce8a0fb7690912ba1 (KVM: create aggregate kvm_total_used_mmu_pages value) introduce percpu counter kvm_total_used_mmu_pages but never destroy it, this may cause oops when rmmod modprobe. Signed-off-by: Wei Yongjun

[COMMIT master] KVM: x86 emulator: add JrCXZ instruction emulation

2010-08-30 Thread Avi Kivity
From: Wei Yongjun yj...@cn.fujitsu.com Add JrCXZ instruction emulation (opcode 0xe3) Used by FreeBSD boot loader. Signed-off-by: Wei Yongjun yj...@cn.fujitsu.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index

[COMMIT master] KVM: x86: Move TSC reset out of vmcb_init

2010-08-30 Thread Avi Kivity
From: Zachary Amsden zams...@redhat.com The VMCB is reset whenever we receive a startup IPI, so Linux is setting TSC back to zero happens very late in the boot process and destabilizing the TSC. Instead, just set TSC to zero once at VCPU creation time. Why the separate patch? So git-bisect is

[COMMIT master] KVM: x86: Convert TSC writes to TSC offset writes

2010-08-30 Thread Avi Kivity
From: Zachary Amsden zams...@redhat.com Change svm / vmx to be the same internally and write TSC offset instead of bare TSC in helper functions. Isolated as a single patch to contain code movement. Signed-off-by: Zachary Amsden zams...@redhat.com Signed-off-by: Marcelo Tosatti

[COMMIT master] KVM: x86: Warn about unstable TSC

2010-08-30 Thread Avi Kivity
From: Zachary Amsden zams...@redhat.com If creating an SMP guest with unstable host TSC, issue a warning Signed-off-by: Zachary Amsden zams...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 3381e9c..5ad4c75 100644 ---

[COMMIT master] KVM: x86: TSC reset compensation

2010-08-30 Thread Avi Kivity
From: Zachary Amsden zams...@redhat.com Attempt to synchronize TSCs which are reset to the same value. In the case of a reliable hardware TSC, we can just re-use the same offset, but on non-reliable hardware, we can get closer by adjusting the offset to match the elapsed time. Signed-off-by:

[COMMIT master] KVM: x86: Fix deep C-state TSC desynchronization

2010-08-30 Thread Avi Kivity
From: Zachary Amsden zams...@redhat.com When CPUs with unstable TSCs enter deep C-state, TSC may stop running. This causes us to require resynchronization. Since we can't tell when this may potentially happen, we assume the worst by forcing re-compensation for it at every point the VCPU task is

[COMMIT master] KVM: x86: Move TSC offset writes to common code

2010-08-30 Thread Avi Kivity
From: Zachary Amsden zams...@redhat.com Also, ensure that the storing of the offset and the reading of the TSC are never preempted by taking a spinlock. While the lock is overkill now, it is useful later in this patch series. Signed-off-by: Zachary Amsden zams...@redhat.com Signed-off-by:

[COMMIT master] KVM: x86: Make cpu_tsc_khz updates use local CPU

2010-08-30 Thread Avi Kivity
From: Zachary Amsden zams...@redhat.com This simplifies much of the init code; we can now simply always call tsc_khz_changed, optionally passing it a new value, or letting it figure out the existing value (while interrupts are disabled, and thus, by inference from the rule, not raceful against

[COMMIT master] KVM: x86: Unify TSC logic

2010-08-30 Thread Avi Kivity
From: Zachary Amsden zams...@redhat.com Move the TSC control logic from the vendor backends into x86.c by adding adjust_tsc_offset to x86 ops. Now all TSC decisions can be done in one place. Signed-off-by: Zachary Amsden zams...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com

[COMMIT master] KVM: x86: Add helper functions for time computation

2010-08-30 Thread Avi Kivity
From: Zachary Amsden zams...@redhat.com Add a helper function to compute the kernel time and convert nanoseconds back to CPU specific cycles. Note that these must not be called in preemptible context, as that would mean the kernel could enter software suspend state, which would cause non-atomic

[COMMIT master] KVM: x86: Robust TSC compensation

2010-08-30 Thread Avi Kivity
From: Zachary Amsden zams...@redhat.com Make the match of TSC find TSC writes that are close to each other instead of perfectly identical; this allows the compensator to also work in migration / suspend scenarios. Signed-off-by: Zachary Amsden zams...@redhat.com Signed-off-by: Marcelo Tosatti

[COMMIT master] KVM: x86: Add clock sync request to hardware enable

2010-08-30 Thread Avi Kivity
From: Zachary Amsden zams...@redhat.com If there are active VCPUs which are marked as belonging to a particular hardware CPU, request a clock sync for them when enabling hardware; the TSC could be desynchronized on a newly arriving CPU, and we need to recompute guests system time relative to boot

[COMMIT master] KVM: MMU: combine guest pte read between fetch and pte prefetch

2010-08-30 Thread Avi Kivity
From: Xiao Guangrong xiaoguangr...@cn.fujitsu.com Combine guest pte read between guest pte check in the fetch path and pte prefetch Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/kvm/paging_tmpl.h

[COMMIT master] KVM: x86: Move scale_delta into common header

2010-08-30 Thread Avi Kivity
From: Zachary Amsden zams...@redhat.com The scale_delta function for shift / multiply with 31-bit precision moves to a common header so it can be used by both kernel and kvm module. Signed-off-by: Zachary Amsden zams...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git

[COMMIT master] KVM: MMU: introduce hva_to_pfn_atomic function

2010-08-30 Thread Avi Kivity
From: Xiao Guangrong xiaoguangr...@cn.fujitsu.com Introduce hva_to_pfn_atomic(), it's the fast path and can used in atomic context, the later patch will use it Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git

[COMMIT master] KVM: x86: Fix a possible backwards warp of kvmclock

2010-08-30 Thread Avi Kivity
From: Zachary Amsden zams...@redhat.com Kernel time, which advances in discrete steps may progress much slower than TSC. As a result, when kvmclock is adjusted to a new base, the apparent time to the guest, which runs at a much higher, nsec scaled rate based on the current TSC, may have already

[COMMIT master] KVM: S390: Add virtio hotplug add support

2010-08-30 Thread Avi Kivity
From: Alexander Graf ag...@suse.de The one big missing feature in s390-virtio was hotplugging. This is no more. This patch implements hotplug add support, so you can on the fly add new devices in the guest. Keep in mind that this needs a patch for qemu to actually leverage the functionality.

[COMMIT master] KVM: x86 emulator: move string instruction completion check into separate function

2010-08-30 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index c5f4761..f219803 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -2934,6

[COMMIT master] KVM: S390: Export kvm_virtio.h

2010-08-30 Thread Avi Kivity
From: Alexander Graf ag...@suse.de As suggested by Christian, we should expose headers to user space with information that might be valuable there. The s390 virtio interface is one of those cases. It defines an ABI between hypervisor and guest, so it should be exposed to user space. Reported-by:

[COMMIT master] KVM: x86: Add timekeeping documentation

2010-08-30 Thread Avi Kivity
From: Zachary Amsden zams...@redhat.com Basic informational document about x86 timekeeping and how KVM is affected. Signed-off-by: Zachary Amsden zams...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/Documentation/kvm/timekeeping.txt

[COMMIT master] KVM: x86: Perform hardware_enable in CPU_STARTING callback

2010-08-30 Thread Avi Kivity
From: Zachary Amsden zams...@redhat.com The CPU_STARTING callback was added upstream with the intention of being used for KVM, specifically for the hardware enablement that must be done before we can run in hardware virt. It had bugs on the x86_64 architecture at the time, where it was called

[COMMIT master] KVM: MMU: introduce gfn_to_page_many_atomic() function

2010-08-30 Thread Avi Kivity
From: Xiao Guangrong xiaoguangr...@cn.fujitsu.com Introduce this function to get consecutive gfn's pages, it can reduce gup's overload, used by later patch Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git

[COMMIT master] export __get_user_pages_fast() function

2010-08-30 Thread Avi Kivity
From: Xiao Guangrong xiaoguangr...@cn.fujitsu.com This function is used by KVM to pin process's page in the atomic context. Define the 'weak' function to avoid other architecture not support it Acked-by: Nick Piggin npig...@suse.de Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com

[COMMIT master] KVM: x86 emulator: simplify ALU block (opcodes 00-3F) decode flags

2010-08-30 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Use the new byte/word dual opcode decode. Signed-off-by: Avi Kivity a...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 921d265..0163150 100644 --- a/arch/x86/kvm/emulate.c +++

[COMMIT master] KVM: x86 emulator: support byte/word opcode pairs

2010-08-30 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Many x86 instructions come in byte and word variants distinguished with bit 0 of the opcode. Add macros to aid in defining them. Signed-off-by: Avi Kivity a...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/kvm/emulate.c

[COMMIT master] KVM: x86 emulator: simplify instruction decode flags for opcodes 80-8F

2010-08-30 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Use the new byte/word dual opcode decode. Signed-off-by: Avi Kivity a...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index ac76a14..204be81 100644 --- a/arch/x86/kvm/emulate.c +++

[COMMIT master] KVM: x86 emulator: add CALL FAR instruction emulation (opcode 9a)

2010-08-30 Thread Avi Kivity
From: Wei Yongjun yj...@cn.fujitsu.com Signed-off-by: Wei Yongjun yj...@cn.fujitsu.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 79d23b4..d613690 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@

[COMMIT master] KVM: x86 emulator: simplify instruction decode flags for opcodes A0-AF

2010-08-30 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Use the new byte/word dual opcode decode. Signed-off-by: Avi Kivity a...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 204be81..dd41b06 100644 --- a/arch/x86/kvm/emulate.c +++

[COMMIT master] KVM: MMU: prefetch ptes when intercepted guest #PF

2010-08-30 Thread Avi Kivity
From: Xiao Guangrong xiaoguangr...@cn.fujitsu.com Support prefetch ptes when intercept guest #PF, avoid to #PF by later access If we meet any failure in the prefetch path, we will exit it and not try other ptes to avoid become heavy path Signed-off-by: Xiao Guangrong

[COMMIT master] KVM: x86 emulator: simplify instruction decode flags for opcodes C0-DF

2010-08-30 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Use the new byte/word dual opcode decode. Signed-off-by: Avi Kivity a...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index dd41b06..ab78474 100644 --- a/arch/x86/kvm/emulate.c +++

[COMMIT master] KVM: x86 emulator: get rid of restart in emulation context.

2010-08-30 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com x86_emulate_insn() will return 1 if instruction can be restarted without re-entering a guest. Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/include/asm/kvm_emulate.h

[COMMIT master] KVM: x86 emulator: simplify instruction decode flags for opcodes E0-FF

2010-08-30 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Use the new byte/word dual opcode decode. Signed-off-by: Avi Kivity a...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index ab78474..51a2803 100644 --- a/arch/x86/kvm/emulate.c +++

[COMMIT master] KVM: x86 emulator: trap and propagate #DE from DIV and IDIV

2010-08-30 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index fe4e2cc..4ff870c 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -504,6 +504,12 @@

[COMMIT master] KVM: x86 emulator: add macros for executing instructions that may trap

2010-08-30 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Like DIV and IDIV. Signed-off-by: Avi Kivity a...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 5a39c47..fe4e2cc 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c

[COMMIT master] KVM: x86 emulator: fix regression with cmpxchg8b on i386 hosts

2010-08-30 Thread Avi Kivity
From: Avi Kivity a...@redhat.com operand::val and operand::orig_val are 32-bit on i386, whereas cmpxchg8b operands are 64-bit. Fix by adding val64 and orig_val64 union members to struct operand, and using them where needed. Signed-off-by: Avi Kivity a...@redhat.com Signed-off-by: Marcelo

[COMMIT master] KVM: x86 emulator: simplify ALU opcode block decode further

2010-08-30 Thread Avi Kivity
From: Avi Kivity a...@redhat.com The ALU opcode block is very regular; introduce D6ALU() to define decode flags for 6 instructions at a time. Suggested by Paolo Bonzini. Signed-off-by: Avi Kivity a...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git

[COMMIT master] KVM: x86 emulator: simplify instruction decode flags for opcodes 0F 00-FF

2010-08-30 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Use the new byte/word dual opcode decode. Signed-off-by: Avi Kivity a...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 51a2803..5a39c47 100644 --- a/arch/x86/kvm/emulate.c +++

[COMMIT master] KVM: x86 emulator: refuse SrcMemFAddr (e.g. LDS) with register operand

2010-08-30 Thread Avi Kivity
From: Avi Kivity a...@redhat.com SrcMemFAddr is not defined with the modrm operand designating a register instead of a memory address. Signed-off-by: Avi Kivity a...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index

[COMMIT master] KVM: pit: Do not check pending pit timer in vcpu thread

2010-08-30 Thread Avi Kivity
From: Jason Wang jasow...@redhat.com Pit interrupt injection was done by workqueue, so no need to check pending pit timer in vcpu thread which could lead unnecessary unblocking of vcpu. Signed-off-by: Jason Wang jasow...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git

[COMMIT master] Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git/

2010-08-30 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com Conflicts: arch/s390/include/asm/Kbuild arch/x86/kvm/svm.c Signed-off-by: Marcelo Tosatti mtosa...@redhat.com -- To unsubscribe from this list: send the line unsubscribe kvm-commits in the body of a message to majord...@vger.kernel.org

[COMMIT master] KVM: MMU: rewrite audit_mappings_page() function

2010-08-30 Thread Avi Kivity
From: Xiao Guangrong xiaoguangr...@cn.fujitsu.com There is a bugs in this function, we call gfn_to_pfn() and kvm_mmu_gva_to_gpa_read() in atomic context(kvm_mmu_audit() is called under the spinlock(mmu_lock)'s protection). This patch fix it by: - introduce gfn_to_pfn_atomic instead of

[COMMIT master] KVM: MMU: remove count_rmaps()

2010-08-30 Thread Avi Kivity
From: Xiao Guangrong xiaoguangr...@cn.fujitsu.com Nothing is checked in count_rmaps(), so remove it Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 0d91f60..0bff4d5 100644 ---

[COMMIT master] KVM: MMU: check rmap for every spte

2010-08-30 Thread Avi Kivity
From: Xiao Guangrong xiaoguangr...@cn.fujitsu.com The read-only spte also has reverse mapping, so fix the code to check them, also modify the function name to fit its doing Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com Signed-off-by: Avi Kivity a...@redhat.com diff --git

[COMMIT master] KVM: MMU: fix wrong not write protected sp report

2010-08-30 Thread Avi Kivity
From: Xiao Guangrong xiaoguangr...@cn.fujitsu.com The audit code reports some sp not write protected in current code, it's just the bug in audit_write_protection(), since: - the invalid sp not need write protected - using uninitialize local variable('gfn') - call kvm_mmu_audit() out of

[COMMIT master] KVM: x86 emulator: simplify string instruction decode flags

2010-08-30 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Use the new byte/word dual opcode decode. Signed-off-by: Avi Kivity a...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 0163150..ac76a14 100644 --- a/arch/x86/kvm/emulate.c +++

[COMMIT master] KVM: S390: take a full byte as ext_param indicator

2010-08-30 Thread Avi Kivity
From: Alexander Graf ag...@suse.de Currenty the ext_param field only distinguishes between config change and vring interrupt. We can do a lot more with it though, so let's enable a full byte of possible values and constants to #defines while at it. Signed-off-by: Alexander Graf ag...@suse.de

[COMMIT master] KVM: MMU: fix compile warning in audit code

2010-08-30 Thread Avi Kivity
From: Xiao Guangrong xiaoguangr...@cn.fujitsu.com fix: arch/x86/kvm/mmu.c: In function ‘kvm_mmu_unprotect_page’: arch/x86/kvm/mmu.c:1741: warning: format ‘%lx’ expects type ‘long unsigned int’, but argument 3 has type ‘gfn_t’ arch/x86/kvm/mmu.c:1745: warning: format ‘%lx’ expects type ‘long

[COMMIT master] KVM: x86: Implement getnsboottime kernel API

2010-08-30 Thread Avi Kivity
From: Zachary Amsden zams...@redhat.com Add a kernel call to get the number of nanoseconds since boot. This is generally useful enough to make it a generic call. Signed-off-by: Zachary Amsden zams...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git

[COMMIT master] Add realmode test for LDS/LES/LFS/LGS/LSS instruction

2010-08-30 Thread Avi Kivity
From: Wei Yongjun yj...@cn.fujitsu.com Signed-off-by: Wei Yongjun yj...@cn.fujitsu.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/x86/realmode.c b/x86/realmode.c index b69e474..8c771fc 100644 --- a/x86/realmode.c +++ b/x86/realmode.c @@ -1184,6 +1184,64 @@ void

[COMMIT master] Add realmode test for jcxz instruction

2010-08-30 Thread Avi Kivity
From: Wei Yongjun yj...@cn.fujitsu.com Signed-off-by: Wei Yongjun yj...@cn.fujitsu.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/x86/realmode.c b/x86/realmode.c index 8c771fc..a833829 100644 --- a/x86/realmode.c +++ b/x86/realmode.c @@ -1242,6 +1242,47 @@ void

[COMMIT master] Add DIV tests

2010-08-30 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Test divide-by-zero and normal cases. Signed-off-by: Avi Kivity a...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/x86/emulator.c b/x86/emulator.c index 5d1659f..845e7a0 100644 --- a/x86/emulator.c +++ b/x86/emulator.c @@ -577,6

[COMMIT master] Allow emulation tests to trap exceptions

2010-08-30 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Some instructions trap on execution, we need a way to see if they raise an exception as expected. Signed-off-by: Avi Kivity a...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/config-x86-common.mak b/config-x86-common.mak index

[COMMIT master] Support #DE (divide error) exception handlers

2010-08-30 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/x86/idt.c b/x86/idt.c index 590839f..4480833 100644 --- a/x86/idt.c +++ b/x86/idt.c @@ -100,6 +100,11 @@ asm (.pushsection .text \n\t pushq $13 \n\t

[COMMIT master] Do not track config.mak and kvmtrace

2010-08-30 Thread Avi Kivity
From: Jason Wang jasow...@redhat.com config.mak was generated by configure and kvmtrace were compiled throuh makefile. Signed-off-by: Jason Wang jasow...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/config.mak b/config.mak deleted file mode 100644 index

[COMMIT master] Makefile cleanup

2010-08-30 Thread Avi Kivity
From: Jason Wang jasow...@redhat.com Remove the obsoleted target and directories. Signed-off-by: Jason Wang jasow...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/Makefile b/Makefile index 5347ce8..d25e6f2 100644 --- a/Makefile +++ b/Makefile @@ -30,10 +30,6 @@

[COMMIT master] Do not check cr8 access when running in 32 bit

2010-08-30 Thread Avi Kivity
From: Jason Wang jasow...@redhat.com CR8 is only available in long mode. Signed-off-by: Jason Wang jasow...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/x86/vmexit.c b/x86/vmexit.c index 819c24b..84c384d 100644 --- a/x86/vmexit.c +++ b/x86/vmexit.c @@ -49,6 +49,7

[COMMIT master] Add realmode test for CALL FAR IMM instruction

2010-08-30 Thread Avi Kivity
From: Wei Yongjun yj...@cn.fujitsu.com Signed-off-by: Wei Yongjun yj...@cn.fujitsu.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/x86/realmode.c b/x86/realmode.c index a833829..d171a56 100644 --- a/x86/realmode.c +++ b/x86/realmode.c @@ -437,6 +437,7 @@ void test_call(void)

[COMMIT master] Do not test IA32_EFER in 32bit mode.

2010-08-30 Thread Avi Kivity
From: Jason Wang jasow...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/x86/msr.c b/x86/msr.c index 9c85369..c3e0014 100644 --- a/x86/msr.c +++ b/x86/msr.c @@ -49,9 +49,11 @@ struct msr_info msr_info[] = { .index =

[COMMIT master] Drop print.S

2010-08-30 Thread Avi Kivity
From: Jason Wang jasow...@redhat.com We've already had lib/printf.c. Signed-off-by: Jason Wang jasow...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/config-x86-common.mak b/config-x86-common.mak index 76e36c3..fdb9e3e 100644 --- a/config-x86-common.mak +++

[COMMIT master] Remove trailing whitespaces

2010-08-30 Thread Avi Kivity
From: Jason Wang jasow...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/config-x86-common.mak b/config-x86-common.mak index 0ed13e4..76e36c3 100644 --- a/config-x86-common.mak +++ b/config-x86-common.mak @@ -32,18 +32,18

[COMMIT master] Remove the duplicated rdmsr/wrmsr

2010-08-30 Thread Avi Kivity
From: Jason Wang jasow...@redhat.com They have been implemented in lib/x86/processor.h. Also rename the cpuid to cpuid_test because cpuid have been defined. Signed-off-by: Jason Wang jasow...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/x86/msr.c b/x86/msr.c index

[COMMIT master] Add 32 bit smp initialization code

2010-08-30 Thread Avi Kivity
From: Jason Wang jasow...@redhat.com Add smp initlaization codes for 32bit. This would make the 32bit smp tests available. Signed-off-by: Jason Wang jasow...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/x86/cstart.S b/x86/cstart.S index 1bdf789..ae1fdbb 100644 ---

[COMMIT master] Correct the tss size

2010-08-30 Thread Avi Kivity
From: Jason Wang jasow...@redhat.com TSS size should be 104 bytes. Signed-off-by: Jason Wang jasow...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/x86/cstart64.S b/x86/cstart64.S index 5d358ad..ef09d82 100644 --- a/x86/cstart64.S +++ b/x86/cstart64.S @@ -68,7 +68,7