[PATCH] Merge commit 'qemu-svn/trunk'

2009-04-06 Thread Avi Kivity
From: Avi Kivity a...@redhat.com * commit 'qemu-svn/trunk': Fix wrong return value Remove dead AIO code for win32 target-mips: optimize gen_movcf_*() target-mips: optimize gen_movci() target-mips: optimize gen_compute_branch1() Misc scsi disk/cdrom fixes/improvements 4/4 misc scsi

[PATCH] kvm: configure: pass --with-patched-kernel to kernel/configure

2009-04-06 Thread Avi Kivity
From: Mark McLoughlin mar...@redhat.com We need to know this so that we can avoid doing things that are specific to building kvm.ko - e.g. when we are only doing header-sync. Signed-off-by: Mark McLoughlin mar...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/configure

[PATCH] kvm: configure: run kernel configure even with --with-patched-kernel

2009-04-06 Thread Avi Kivity
From: Mark McLoughlin mar...@redhat.com We still run header-sync in this case, which requires configure to have been run. Signed-off-by: Mark McLoughlin mar...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/configure b/configure index a2aad59..49c4419 100755 --- a/configure

[PATCH] kvm: external module: only hack tsc_khz in kvm_arch_init

2009-04-06 Thread Avi Kivity
From: Avi Kivity a...@redhat.com We now hack it to a function call, so all hell breaks loose if we change local variables names tsc_khz. Signed-off-by: Avi Kivity a...@redhat.com diff --git a/kernel/x86/hack-module.awk b/kernel/x86/hack-module.awk index a05c0c3..260eeef 100644 ---

[PATCH] kvm: external module: backward compatibility for ia64 msidef.h

2009-04-06 Thread Avi Kivity
From: Zhang, Yang yang.zh...@intel.com when using make in kernel, it can not find msidef.h. This patch fix this. Signed-off-by: Yang Zhang yang.zh...@intel.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/kernel/include-compat/asm-ia64/msidef.h

[PATCH] kvm: external module: backward compatibility for PAGE_KERNEL_UC on ia64

2009-04-06 Thread Avi Kivity
From: Yang Zhang Yang Zhang Signed-off-by: Yang Zhang Yang Zhang Signed-off-by: Avi Kivity a...@redhat.com diff --git a/kernel/ia64/external-module-compat.h b/kernel/ia64/external-module-compat.h index 592733c..bc78c3d 100644 --- a/kernel/ia64/external-module-compat.h +++

[PATCH] kvm: qemu: Do not use log dirty on ia64

2009-04-06 Thread Avi Kivity
From: Zhang, Yang yang.zh...@intel.com ia64 does not support log dirty. Signed-off-by: Yang Zhang yang.zh...@intel.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c index 4164368..ed76367 100644 --- a/qemu/qemu-kvm.c +++ b/qemu/qemu-kvm.c @@ -1374,7

[PATCH] kvm: testsuite: add tests for short/near Jcc and call instruction emulation

2009-04-06 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/user/test/x86/realmode.c b/user/test/x86/realmode.c index f6d5326..336ba1c 100644 --- a/user/test/x86/realmode.c +++ b/user/test/x86/realmode.c @@ -361,14 +361,94

[PATCH] kvm: qemu: improve pci host device address parsing

2009-04-06 Thread Avi Kivity
From: Han, Weidong weidong@intel.com pci_parse_devaddr parses [[domain:][bus:]slot, it's valid when even enter only slot, whereas it must be bus:slot.func in device assignment command (-pcidevice host=bus:slot.func). So I implemented a dedicated function to parse device bdf in device

[PATCH] kvm: configure: --with-patched-kernel doesn't need kernelversion

2009-04-06 Thread Avi Kivity
From: Mark McLoughlin mar...@redhat.com DEPMOD_VERSION is only used for kvm.ko, not for e.g. header-sync. Signed-off-by: Mark McLoughlin mar...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/kernel/configure b/kernel/configure index 3fd0c94..7a222e4 100755 ---

[PATCH] kvm: extboot: silence compiler warning

2009-04-06 Thread Avi Kivity
From: Jan Kiszka jan.kis...@web.de Signed-off-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/qemu/hw/extboot.c b/qemu/hw/extboot.c index 32e6226..13ffafa 100644 --- a/qemu/hw/extboot.c +++ b/qemu/hw/extboot.c @@ -77,8 +77,8 @@ static void

[PATCH] kvm: testsuite: test long JMP emulation

2009-04-06 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/user/test/x86/realmode.c b/user/test/x86/realmode.c index 336ba1c..755b5d1 100644 --- a/user/test/x86/realmode.c +++ b/user/test/x86/realmode.c @@ -451,6 +451,23

[PATCH] kvm: Update .gitignore

2009-04-06 Thread Avi Kivity
From: Jan Kiszka jan.kis...@web.de Signed-off-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/.gitignore b/.gitignore index fcdc357..22a8200 100644 --- a/.gitignore +++ b/.gitignore @@ -53,10 +53,14 @@ kernel/x86/coalesced_mmio.[ch]

[PATCH] kvm: qemu: fixup 4GB+ memslot large page alignment

2009-04-06 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com Need to align the 4GB+ memslot after we know its address, not before. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/qemu/hw/pc.c b/qemu/hw/pc.c index d4a4320..cc84772 100644 --- a/qemu/hw/pc.c

[PATCH] KVM: VMX: Fix handling of a fault during NMI unblocked due to IRET

2009-04-06 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com Bit 12 is undefined in any of the following cases: If the VM exit sets the valid bit in the IDT-vectoring information field. If the VM exit is due to a double fault. Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff

[PATCH] KVM: Use rsvd_bits_mask in load_pdptrs()

2009-04-06 Thread Avi Kivity
From: Dong, Eddie eddie.d...@intel.com Also remove bit 5-6 from rsvd_bits_mask per latest SDM. Signed-off-by: Eddie Dong eddie.d...@intel.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index e0f63b6..76dd43c 100644 --- a/arch/x86/kvm/mmu.c +++

[PATCH] KVM: VMX: Fix feature testing

2009-04-06 Thread Avi Kivity
From: Sheng Yang sh...@linux.intel.com The testing of feature is too early now, before vmcs_config complete initialization. Signed-off-by: Sheng Yang sh...@linux.intel.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 1caa1fc..7d7b0d6

[PATCH] Merge commit 'qemu-svn/trunk'

2009-04-06 Thread Avi Kivity
From: Avi Kivity a...@redhat.com * commit 'qemu-svn/trunk': (38 commits) Remove WIN32 guard around -k Add new command line option -singlestep for tcg single stepping. tcg/x86_64: optimize register allocation order stop dirty tracking just at the end of migration (Glauber Costa) create

[PATCH] KVM: VMX: Rewrite vmx_complete_interrupt()'s twisted maze of if() statements

2009-04-06 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com ...with a more straightforward switch(). Also fix a bug when NMI could be dropped on exit. Although this should never happen in practice, since NMIs can only be injected, never triggered internally by the guest like exceptions. Signed-off-by: Gleb Natapov

[PATCH] KVM: Fix task switch back link handling.

2009-04-06 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com Back link is written to a wrong TSS now. Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 0dcf95b..a13fa70 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c

[PATCH] KVM: VMX: Do not zero idt_vectoring_info in vmx_complete_interrupts().

2009-04-06 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com We will need it later in task_switch(). Code in handle_exception() is dead. is_external_interrupt(vect_info) will always be false since idt_vectoring_info is zeroed in vmx_complete_interrupts(). Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Avi

[PATCH] KVM: Fix unneeded instruction skipping during task switching.

2009-04-06 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com There is no need to skip instruction if the reason for a task switch is a task gate in IDT and access to it is caused by an external even. The problem is currently solved only for VMX since there is no reliable way to skip an instruction in SVM. We should

[PATCH] KVM: VMX: Clean up Flex Priority related

2009-04-06 Thread Avi Kivity
From: Sheng Yang sh...@linux.intel.com And clean paranthes on returns. Signed-off-by: Sheng Yang sh...@linux.intel.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index aba41ae..1caa1fc 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c

[PATCH] KVM: MMU: Discard reserved bits checking on PDE bit 7-8

2009-04-06 Thread Avi Kivity
From: Sheng Yang sh...@linux.intel.com 1. It's related to a Linux kernel bug which fixed by Ingo on 07a66d7c53a538e1a9759954a82bb6c07365eff9. The original code exists for quite a long time, and it would convert a PDE for large page into a normal PDE. But it fail to fit normal PDE well. With the

[PATCH] KVM: x86 emulator: fix call near emulation

2009-04-06 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com The length of pushed on to the stack return address depends on operand size not address size. Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c index