[COMMIT master] Cleanup kvm cpu loop

2009-06-25 Thread Avi Kivity
From: Gleb Natapov Rearrange cpu loop to be more readable. Put difference between kernel/userspace irqchip in one place. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity diff --git a/qemu-kvm.c b/qemu-kvm.c index 3105753..2d0015c 100644 --- a/qemu-kvm.c +++ b/qemu-kvm.c @@ -1751,15 +1751

[COMMIT master] device assignment: Add PCI option ROM support

2009-06-25 Thread Avi Kivity
From: Alex Williamson The PCI code already knows about option ROMs, so we just need to mmap some space for it, load it with a copy of the contents, and complete the plubming to the generic code. With this a Linux guest can get access to the ROM contents via /sys/bus/pci/devices//rom. This might

[COMMIT master] Fix condition for native_read_msr_safe wrapping on i386

2009-06-25 Thread Avi Kivity
From: Jan Kiszka For i386, native_read_msr_safe was already introduced in 2.6.22. Signed-off-by: Jan Kiszka Signed-off-by: Avi Kivity diff --git a/x86/external-module-compat.h b/x86/external-module-compat.h index 881602e..8436e43 100644 --- a/x86/external-module-compat.h +++ b/x86/external-mo

[COMMIT master] Backwards compatibility for alloc_pages_exact_node()

2009-06-25 Thread Avi Kivity
From: Avi Kivity Signed-off-by: Avi Kivity diff --git a/external-module-compat-comm.h b/external-module-compat-comm.h index 8270418..026fee1 100644 --- a/external-module-compat-comm.h +++ b/external-module-compat-comm.h @@ -898,3 +898,9 @@ struct trace_print_flags { }; #endif + +#if LINUX_V

[COMMIT master] Update source link

2009-06-25 Thread Avi Kivity
From: Avi Kivity Signed-off-by: Avi Kivity diff --git a/linux-2.6 b/linux-2.6 index 4631e09..5a886c0 16 --- a/linux-2.6 +++ b/linux-2.6 @@ -1 +1 @@ -Subproject commit 4631e094c00446f4e0ace8bcb4d60306ac8156c1 +Subproject commit 5a886c095bf0d270f5e1325634be0114a9298089 -- To unsubscribe from

[COMMIT master] Backwards compatiblity for trace_print_flags

2009-06-25 Thread Avi Kivity
From: Avi Kivity Signed-off-by: Avi Kivity diff --git a/external-module-compat-comm.h b/external-module-compat-comm.h index c0ae66c..8270418 100644 --- a/external-module-compat-comm.h +++ b/external-module-compat-comm.h @@ -887,3 +887,14 @@ struct tracepoint; #define tracepoint_synchronize_unr

[COMMIT master] KVM: Allow emulation of syscalls instructions on #UD

2009-06-25 Thread Avi Kivity
From: Andre Przywara Add the opcodes for syscall, sysenter and sysexit to the list of instructions handled by the undefined opcode handler. Signed-off-by: Christoph Egger Signed-off-by: Amit Shah Signed-off-by: Andre Przywara Signed-off-by: Avi Kivity diff --git a/arch/x86/kvm/x86.c b/arch/

[COMMIT master] KVM: x86 emulator: Add missing EFLAGS bit definitions

2009-06-25 Thread Avi Kivity
From: Andre Przywara Signed-off-by: Christoph Egger Signed-off-by: Amit Shah Signed-off-by: Andre Przywara Signed-off-by: Avi Kivity diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c index ef4dfca..67af33a 100644 --- a/arch/x86/kvm/x86_emulate.c +++ b/arch/x86/kvm/x86_emul

[COMMIT master] KVM: x86 emulator: Prepare for emulation of syscall instructions

2009-06-25 Thread Avi Kivity
From: Andre Przywara Add the flags needed for syscall, sysenter and sysexit to the opcode table. Catch (but for now ignore) the opcodes in the emulation switch/case. Signed-off-by: Andre Przywara Signed-off-by: Amit Shah Signed-off-by: Christoph Egger Signed-off-by: Avi Kivity diff --git a/

[COMMIT master] KVM: x86 emulator: Add sysenter emulation

2009-06-25 Thread Avi Kivity
From: Andre Przywara Handle #UD intercept of the sysenter instruction in 32bit compat mode on an AMD host. Setup the segment descriptors for CS and SS and the EIP/ESP registers according to the manual. Signed-off-by: Christoph Egger Signed-off-by: Amit Shah Signed-off-by: Andre Przywara Signe

[COMMIT master] KVM: x86 emulator: add syscall emulation

2009-06-25 Thread Avi Kivity
From: Andre Przywara Handle #UD intercept of the syscall instruction in 32bit compat mode on an Intel host. Setup the segment descriptors for CS and SS and the EIP/ESP registers according to the manual. Save the RIP and EFLAGS to the correct registers. [avi: fix build on i386 due to missing R11]

[COMMIT master] KVM: ignore AMDs HWCR register access to set the FFDIS bit

2009-06-25 Thread Avi Kivity
From: Andre Przywara Linux tries to disable the flush filter on all AMD K8 CPUs. Since KVM does not handle the needed MSR, the injected #GP will panic the Linux kernel. Ignore setting of the HWCR.FFDIS bit in this MSR to let Linux boot with an AMD K8 family guest CPU. Signed-off-by: Andre Przywa

[COMMIT master] KVM: x86: verify MTRR/PAT validity

2009-06-25 Thread Avi Kivity
From: Marcelo Tosatti Do not allow invalid memory types in MTRR/PAT (generating a #GP otherwise). Signed-off-by: Marcelo Tosatti Signed-off-by: Avi Kivity diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index b978a18..82e44f0 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -7

[COMMIT master] KVM: x86 emulator: Add sysexit emulation

2009-06-25 Thread Avi Kivity
From: Andre Przywara Handle #UD intercept of the sysexit instruction in 64bit mode returning to 32bit compat mode on an AMD host. Setup the segment descriptors for CS and SS and the EIP/ESP registers according to the manual. Signed-off-by: Christoph Egger Signed-off-by: Amit Shah Signed-off-by

[COMMIT master] KVM: s390: Fix memslot initialization for userspace_addr != 0

2009-06-25 Thread Avi Kivity
From: Christian Borntraeger Since commit 854b5338196b1175706e99d63be43a4f8d8ab607 Author: Christian Ehrhardt KVM: s390: streamline memslot handling s390 uses the values of the memslot instead of doing everything in the arch ioctl handler of the KVM_SET_USER_MEMORY_REGION. Unfortunately we m

[COMMIT master] KVM: Protect irq tracing with KVM_HAVE_IOAPIC and KVM_HAVE_PIT

2009-06-25 Thread Avi Kivity
From: =?utf-8?q?Christian=20Borntr=C3=A4ger?= commit acb57be20f6b600848a99796d8f115ec079b8b08 Author: Marcelo Tosatti Date: Wed Jun 17 09:22:14 2009 -0300 KVM: convert custom marker based tracing to event traces causes the following compile error on s390: CC [M] arch/s390/kvm/../../..

[COMMIT master] hugetlbfs: export vma_kernel_pagsize to modules

2009-06-25 Thread Avi Kivity
From: Joerg Roedel This function is required by KVM. Signed-off-by: Joerg Roedel Signed-off-by: Avi Kivity diff --git a/mm/hugetlb.c b/mm/hugetlb.c index e83ad2c..e2016ef 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -234,6 +234,7 @@ unsigned long vma_kernel_pagesize(struct vm_area_struct

[COMMIT master] KVM: x86: missing locking in PIT/IRQCHIP/SET_BSP_CPU ioctl paths

2009-06-25 Thread Avi Kivity
From: Marcelo Tosatti Correct missing locking in a few places in x86's vm_ioctl handling path. Signed-off-by: Marcelo Tosatti Signed-off-by: Avi Kivity diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c index 331705f..6e0a203 100644 --- a/arch/x86/kvm/i8254.c +++ b/arch/x86/kvm/i8254.c

[COMMIT master] KVM: s390: Allow stfle instruction in the guest

2009-06-25 Thread Avi Kivity
From: Christian Borntraeger 2.6.31-rc introduced an architecture level set checker based on facility bits. e.g. if the kernel is compiled to run only on z9, several facility bits are checked very early and the kernel refuses to boot if a z9 specific facility is missing. Until now kvm on s390 did

[COMMIT master] KVM: s390: Remove some unused variables

2009-06-25 Thread Avi Kivity
From: Christian Borntraeger This patch fixes the following warnings that were introduced by commit 2921292f45733bccdb53e426bcf65ceb13f53d94 Author: Gleb Natapov KVM: Use macro to iterate over vcpus. arch/s390/kvm/kvm-s390.c: In function 'kvm_arch_set_memory_region': arch/s390/kvm/kvm-s390.c

[COMMIT master] KVM: Prepare memslot data structures for multiple hugepage sizes

2009-06-25 Thread Avi Kivity
From: Joerg Roedel Signed-off-by: Joerg Roedel Signed-off-by: Avi Kivity diff --git a/arch/ia64/include/asm/kvm_host.h b/arch/ia64/include/asm/kvm_host.h index 9cf1c4b..d9b6325 100644 --- a/arch/ia64/include/asm/kvm_host.h +++ b/arch/ia64/include/asm/kvm_host.h @@ -235,7 +235,8 @@ struct kvm_v

[COMMIT master] KVM: ignore reads from AMDs C1E enabled MSR

2009-06-25 Thread Avi Kivity
From: Andre Przywara If the Linux kernel detects an C1E capable AMD processor (K8 RevF and higher), it will access a certain MSR on every attempt to go to halt. Explicitly handle this read and return 0 to let KVM run a Linux guest with the native AMD host CPU propagated to the guest. Signed-off-

[COMMIT master] KVM: Avoid large page unusued variable warning if no large page support

2009-06-25 Thread Avi Kivity
From: Avi Kivity Signed-off-by: Avi Kivity diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 7f59367..09057b7 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -1174,6 +1174,9 @@ int __kvm_set_memory_region(struct kvm *kvm, for (i = 0; i < KVM_NR_PAGE_SIZES - 1; +

[COMMIT master] KVM: Define vendor-specific tracepoints in common code

2009-06-25 Thread Avi Kivity
From: Avi Kivity Now that the vendor-specific tracepoints have been commonalized, we can define them in common code and export them to vendor modules. This fixes CONFIG_KVM_INTEL=y CONFIG_KVM_AMD=y builds. Signed-off-by: Avi Kivity diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index ef

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

2009-06-25 Thread Avi Kivity
From: Avi Kivity Signed-off-by: Avi Kivity -- To unsubscribe from this list: send the line "unsubscribe kvm-commits" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[COMMIT master] KVM: Fold trace-arch.h into trace.h

2009-06-25 Thread Avi Kivity
From: Avi Kivity trace-arch.h is only included in one point, and isn't any different from trace.h. Fold the one into the other. Signed-off-by: Avi Kivity diff --git a/arch/x86/kvm/trace-arch.h b/arch/x86/kvm/trace-arch.h deleted file mode 100644 index 03a3394..000 --- a/arch/x86/kvm/trace

[COMMIT master] KVM: ftrace: remove vendor exit reasons string macro

2009-06-25 Thread Avi Kivity
From: Avi Kivity The vendor exit reason strings macro is the only thing that differs beween vmx ftrace and svm ftrace, and since it is a macro, multiple definitions cannot coexist, breaking KVM_INTEL=Y KVM_AMD=Y builds. Replace the macro by a pointer in kvm_x86_ops. Signed-off-by: Avi Kivity

[COMMIT master] KVM: s390: Fix for multiple large page size preparations

2009-06-25 Thread Avi Kivity
From: Avi Kivity Signed-off-by: Avi Kivity diff --git a/arch/s390/include/asm/kvm_host.h b/arch/s390/include/asm/kvm_host.h index 75535d4..78e07a6 100644 --- a/arch/s390/include/asm/kvm_host.h +++ b/arch/s390/include/asm/kvm_host.h @@ -40,7 +40,11 @@ struct sca_block { struct sca_entry

[COMMIT master] KVM: introduce module parameter for ignoring unknown MSRs accesses

2009-06-25 Thread Avi Kivity
From: Andre Przywara KVM will inject a #GP into the guest if that tries to access unhandled MSRs. This will crash many guests. Although it would be the correct way to actually handle these MSRs, we introduce a runtime switchable module param called "ignore_msrs" (defaults to 0). If this is Y, unk

[COMMIT master] Merge branch 'upstream-merge'

2009-06-25 Thread Avi Kivity
From: Avi Kivity * upstream-merge: (53 commits) add sparc64-softmmu to default configure targets list sparc64 follow pci_nic_init change microblaze: Support the latest mmu-kernel stat64 ABI. target-ppc: permit linux-user to read PVR cris: Remove unused internal flag. Win32: Reduce sec