Re: [PATCH] kvm-kmod: x86: Drop duplicate external-module-compat objects

2009-05-24 Thread Avi Kivity
Jan Kiszka wrote: This redundancy breaks subtly when building against recent OpenSUSE kernels. Signed-off-by: Jan Kiszka --- x86/Kbuild |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/x86/Kbuild b/x86/Kbuild index e304c79..ade87fc 100644 --- a/x86/Kbuild +++ b/x86/

Re: [PATCH] kvm-kmod: x86: Drop duplicate external-module-compat objects

2009-05-24 Thread Avi Kivity
Jan Kiszka wrote: Chris Wright wrote: * Jan Kiszka (jan.kis...@web.de) wrote: This redundancy breaks subtly when building against recent OpenSUSE kernels. What breaks? When building external-module-compat.c, linux/scripts/basic/hash somehow gets called with a multi-word m

Re: [PATCH] kvm-kmod: x86: Define CONFIG_HAVE_KVM_EVENTFD when missing

2009-05-24 Thread Avi Kivity
Jan Kiszka wrote: Signed-off-by: Jan Kiszka --- x86/external-module-compat.h |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/x86/external-module-compat.h b/x86/external-module-compat.h index a9476ff..d74 100644 --- a/x86/external-module-compat.h +++ b/x86/extern

Re: [PATCH] qemu-kvm: x86: Drop redundant tpr prototypes

2009-05-24 Thread Avi Kivity
Jan Kiszka wrote: Signed-off-by: Jan Kiszka Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.or

Re: [ANNOUNCE] kvm-86 release

2009-05-24 Thread Avi Kivity
Farkas Levente wrote: Avi Kivity wrote: There are many qcow2 and live migration fixes in this release; also noteworthy is the beginning of NUMA support. The interrupt injection code has seen some significant rework. it doesn't compile on rhel/centos-5.3 because of this

Re: kvm-86 release - USB thumbdrive

2009-05-24 Thread Avi Kivity
Denherder, Cindy wrote: Hi, I'm not having any luck getting my usb thumb drive recognized in my Windows guests via the hot plug method. I checked the wiki site and it looks like this is an issue being worked on - does anyone know the status of this? (I can get it to work by creating an img

Re: kvm-85 sometimes not starting on 2.6.30-rc5

2009-05-24 Thread Avi Kivity
Andrea Arcangeli wrote: On Sun, May 17, 2009 at 11:27:42PM +0300, Avi Kivity wrote: Andrea, looks like the mother of all locks below. eheh yes that really is the mother of all locks ;). So the thing is, like BUG says MAX_LOCK_DEPTH is too low, to fix you should rebuild after

Re: [PATCH] qemu-kvm: x86: Init pci_option_rom_offset for VGA BIOS absence

2009-05-24 Thread Avi Kivity
Jan Kiszka wrote: Signed-off-by: Jan Kiszka Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.or

Re: [Qemu-devel] [PATCH] qemu: msi irq allocation api

2009-05-24 Thread Avi Kivity
Michael S. Tsirkin wrote: kvm needs data on MSI entries: that's the interface current kernel exposes for injecting these interrupts. I think we also need to support in-kernel devices which would inject MSI interrupt directly from kernel. For these, kvm would need to know when mask bit changes an

Re: XP smp using a lot of CPU

2009-05-24 Thread Avi Kivity
Erik Rull wrote: Hi Avi, there are some .NET apps running, doing some calculations and graphic 2D display, HDD access w/ database and some TCP/IP transfer. Are you using qcow2? What is your qemu command line? -- error compiling committee.c: too many arguments to function -- To unsubscri

Re: just a dump

2009-05-24 Thread Avi Kivity
Marcelo Tosatti wrote: another one. This time the vm where booted sequentialy: [ 253.268993] kvm: 2907: cpu0 unimplemented perfctr wrmsr: 0xc0010003 data 0x0 [ 475.036542] rmap_remove: 8800cdb913b0 10 0->BUG ^^^ So 0x10 is 1 bit diffe

Re: NULL pointer dereference in kernel code, ignored parameters in libkvm

2009-05-24 Thread Avi Kivity
Gabe Black wrote: Hi. I'm a developer on the M5 simulator (m5sim.org) working on a CPU model which uses kvm as its execution engine. Neat stuff. You're using kvm to run non-x86 code on x86? I ran into a kernel "BUG" where a NULL pointer is being dereferenced in gfn_to_rmap. What's

Re: Userspace MSR handling

2009-05-24 Thread Avi Kivity
Alexander Graf wrote: On 22.05.2009, at 22:11, Ed Swierk wrote: I'm experimenting with Gerd's excellent work on integrating Xenner into Qemu (http://git.et.redhat.com/?p=qemu-kraxel.git). I'm using it to boot a FreeBSD guest that uses the Xen paravirtual network drivers. Decoupling the Xen

Re: [RFC][PATCH] qemu-kvm: x86: Refactor persistent CPU state

2009-05-24 Thread Avi Kivity
Jan Kiszka wrote: This patch reworks the KVM-related layout and encoding of the CPU state to be saved to disk or migrated. The goal is to define a format, version 9, that is also acceptable for upstream and can later be merged into QEMU. Besides unconditionally writing KVM states, this format com

Re: [PATCH] [KVM_Autotest] Fix to allow for "=" in the "value" of a config parameter.

2009-05-24 Thread Avi Kivity
Michael Goldish wrote: This makes sense, thanks. One thing though -- I don't know if it's even worth mentioning -- we always try to put a single space after a comma (I think the Python style guide recommends that but I'm not sure). Generally we try to follow the guide (http://www.python.org/d

Re: [ANNOUNCE] kvm-kmod-2.6.30-rc6

2009-05-24 Thread Avi Kivity
Farkas Levente wrote: Avi Kivity wrote: This is a package containing the kvm external module, based on the 2.6.30 series. kvm-kmod-2.6.30-rc6 contains the kvm code that is present in Linux 2.6.30-rc6, except that it can run on older kernels. It is a good companion to the qemu-kvm-0.10

Re: [patch 2/4] KVM: move coalesced_mmio locking to its own device

2009-05-24 Thread Avi Kivity
Marcelo Tosatti wrote: Get rid of kvm->lock dependency on coalesced_mmio methods. Use an atomic variable instead to guarantee only one vcpu is batching data into the ring at a given time. Signed-off-by: Marcelo Tosatti Index: kvm-irqlock/virt/kvm/coalesced_mmio.c =

Re: [patch 3/4] KVM: introduce irq_lock, use it to protect ioapic

2009-05-24 Thread Avi Kivity
Marcelo Tosatti wrote: Subject says it all. I hate those changelogs. I guess Subject never reviews code. You might put some evidence that we're suffering from contention here (I'm very willing to believe it, but hard evidence is better). Signed-off-by: Marcelo Tosatti Index: kvm-irql

Re: [PATCH 3/3] kvm-s390: streamline memslot handling

2009-05-24 Thread Avi Kivity
ehrha...@linux.vnet.ibm.com wrote: From: Christian Ehrhardt This patch relocates the variables kvm-s390 uses to track guest mem addr/size. As discussed dropping the variables at struct kvm_arch level allows to use the common vcpu->request based mechanism to reload guest memory if e.g. changes v

Re: 2.6.29.1 BUG: unable to handle kernel NULL pointer dereference at (null) -> Oops

2009-05-24 Thread Avi Kivity
Tomasz Chmielewski wrote: This system is running as a kvm-85 guest. This is a guest oops, right? -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordo

Re: [RFC] KVM-Autotest: basic parallel test execution

2009-05-24 Thread Avi Kivity
Ryan Harper wrote: I took a slightly different approach. The kvm_tests.cfg file already provides a dependency relationship between different tests. I modified the main loop in the control file to walk the entire list of jobs and pull out any jobs that don't have any dependencies (ie, install te

Re: [PATCH][KVM-AUTOTEST] Check exit status of custom install script and fail if script failed.

2009-05-24 Thread Avi Kivity
Mike Burns wrote: Signed-off-by: Mike Burns --- client/tests/kvm_runtest_2/kvm_install.py |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/client/tests/kvm_runtest_2/kvm_install.py b/client/tests/kvm_runtest_2/kvm_install.py index ebd8b7d..392ef0c 100755 --- a/cli

Re: [PATCH][KVM-AUTOTEST] Have Custom install chdir to test.bindir

2009-05-24 Thread Avi Kivity
Mike Burns wrote: If you are using custom install and load_modules=yes, then autotest needs to change to the test.bindir so that it looks for kernel modules in the right place. Signed-off-by: Mike Burns --- client/tests/kvm_runtest_2/kvm_install.py |1 + 1 files changed, 1 insertions(+), 0

Re: [patch 4/4] KVM: switch irq injection/acking to irq_lock

2009-05-24 Thread Avi Kivity
Gregory Haskins wrote: Marcelo Tosatti wrote: Switch irq injection/acking to irq_lock, and change PIO/MMIO paths so that the device search is protected by kvm->lock, but not the read/write callbacks (which is responsability of the device). Fix for http://article.gmane.org/gmane.comp.emulato

Re: [KVM-AUTOTEST PATCH] Instead of trying to remove kvm modules with rmmod, use modprobe -r, as it handles module dependencies better

2009-05-24 Thread Avi Kivity
Mike Burns wrote: Lucas Meneghel Rodrigues wrote: In certain situations, trying to do a rmmod on the kvm modules might generate errors, as there is a chain of dependencies involved. Instead, let's use modprobe -r, as it handles dependencies. Signed-off-by: Lucas Meneghel Rodrigues diff --g

Re: [PATCH v3] kvm: x86: Allow PIT emulation without speaker port

2009-05-24 Thread Avi Kivity
Jan Kiszka wrote: The in-kernel speaker emulation is only a dummy and also unneeded from the performance point of view. Rather, it takes user space support to generate sound output on the host, e.g. console beeps. To allow this, introduce KVM_CREATE_PIT2 which controls in-kernel speaker port emu

Re: [PATCH][KVM-AUTOTEST] Make code to remove kvm modules more robust

2009-05-24 Thread Avi Kivity
Mike Burns wrote: + +def __unload_modules(module): + lsmod = os.popen("lsmod | grep \"^%s \"" % module) lsmod = len([x for x in file('/proc/modules).splitlines() if x.split()[0] == module]) > 0 Sorry, I just envy python writers. + + #line_count = os

[PATCH 01/45] KVM: Remove inject_pending_vectors() callback

2009-05-24 Thread Avi Kivity
From: Gleb Natapov It is the same as inject_pending_irq() for VMX/SVM now. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity --- arch/x86/include/asm/kvm_host.h |2 -- arch/x86/kvm/svm.c |1 - arch/x86/kvm/vmx.c |1 - arch/x86/kvm/x86.c

[PATCH 03/45] KVM: sync_lapic_to_cr8() should always sync cr8 to V_TPR

2009-05-24 Thread Avi Kivity
From: Gleb Natapov Even if IRQ chip is in userspace. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity --- arch/x86/kvm/svm.c |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 2905475..143818e 100644 --- a/arch/x86

[PATCH 07/45] KVM: Fix userspace IRQ chip migration

2009-05-24 Thread Avi Kivity
From: Gleb Natapov Re-put pending IRQ vector into interrupt_bitmap before migration. Otherwise it will be lost if migration happens in the wrong time. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity --- arch/x86/kvm/x86.c | 12 ++-- 1 files changed, 6 insertions(+), 6

[PATCH 44/45] KVM: Disable CR8 intercept if tpr patching is active

2009-05-24 Thread Avi Kivity
From: Gleb Natapov Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity --- arch/x86/kvm/x86.c | 11 ++- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 7037afa..44e87a5 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm

[PATCH 42/45] KVM: inject NMI after IRET from a previous NMI, not before.

2009-05-24 Thread Avi Kivity
opens. This patch fix SVM code to open NMI window after IRET by single stepping over IRET instruction. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity --- arch/x86/include/asm/kvm_host.h |2 + arch/x86/kvm/svm.c | 62 +++--- 2 files change

[PATCH 43/45] KVM: Do not migrate pending software interrupts.

2009-05-24 Thread Avi Kivity
it simple never migrate pending soft interrupt. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity --- arch/x86/kvm/x86.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index efba9bc..7037afa 100644 --- a/arch/x86/kvm/x86.c ++

[PATCH 45/45] KVM: Move "exit due to NMI" handling into vmx_complete_interrupts()

2009-05-24 Thread Avi Kivity
From: Gleb Natapov To save us one reading of VM_EXIT_INTR_INFO. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity --- arch/x86/kvm/vmx.c | 21 ++--- 1 files changed, 10 insertions(+), 11 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 29b49f0

[PATCH 41/45] KVM: Always request IRQ/NMI window if an interrupt is pending

2009-05-24 Thread Avi Kivity
From: Gleb Natapov Currently they are not requested if there is pending exception. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity --- arch/x86/kvm/x86.c | 30 -- 1 files changed, 12 insertions(+), 18 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch

[PATCH 40/45] KVM: Do not re-execute INTn instruction.

2009-05-24 Thread Avi Kivity
From: Gleb Natapov Re-inject event instead. This is what Intel suggest. Also use correct instruction length when re-injecting soft fault/interrupt. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity --- arch/x86/include/asm/kvm_host.h |5 - arch/x86/kvm/svm.c |8

[PATCH 37/45] KVM: Do not allow interrupt injection from userspace if there is a pending event.

2009-05-24 Thread Avi Kivity
From: Gleb Natapov The exception will immediately close the interrupt window. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity --- arch/x86/kvm/x86.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 33f850b

[PATCH 36/45] KVM: Unprotect a page if #PF happens during NMI injection.

2009-05-24 Thread Avi Kivity
From: Gleb Natapov It is done for exception and interrupt already. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity --- arch/x86/kvm/svm.c |3 +-- arch/x86/kvm/vmx.c |2 +- arch/x86/kvm/x86.h |6 ++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/arch/x86

[PATCH 34/45] KVM: s390: Sanity check on validity intercept

2009-05-24 Thread Avi Kivity
this fix. Reported-by: Mijo Safradin Signed-off-by: Carsten Otte Signed-off-by: Christian Ehrhardt Signed-off-by: Avi Kivity --- arch/s390/kvm/intercept.c | 28 ++-- 1 files changed, 18 insertions(+), 10 deletions(-) diff --git a/arch/s390/kvm/intercept.c b/arch/s390

[PATCH 38/45] KVM: Remove irq_pending bitmap

2009-05-24 Thread Avi Kivity
From: Gleb Natapov Only one interrupt vector can be injected from userspace irqchip at any given time so no need to store it in a bitmap. Put it into interrupt queue directly. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity --- arch/x86/include/asm/kvm_host.h |2 -- arch/x86/kvm

[PATCH 39/45] KVM: skip_emulated_instruction() decode instruction if size is not known

2009-05-24 Thread Avi Kivity
From: Gleb Natapov Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity --- arch/x86/kvm/svm.c | 11 +-- 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index ac3d5ba..1315ce0 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm

[PATCH 35/45] KVM: s390: Verify memory in kvm run

2009-05-24 Thread Avi Kivity
From: Carsten Otte This check verifies that the guest we're trying to run in KVM_RUN has some memory assigned to it. It enters an endless exception loop if this is not the case. Reported-by: Mijo Safradin Signed-off-by: Carsten Otte Signed-off-by: Christian Ehrhardt Signed-off-by: Avi K

[PATCH 32/45] KVM: s390: optimize float int lock: spin_lock_bh --> spin_lock

2009-05-24 Thread Avi Kivity
From: Christian Borntraeger The floating interrupt lock is only taken in process context. We can replace all spin_lock_bh with standard spin_lock calls. Signed-off-by: Christian Borntraeger Signed-off-by: Christian Ehrhardt Signed-off-by: Avi Kivity --- arch/s390/kvm/interrupt.c | 20

[PATCH 00/45] KVM updates for the 2.6.31 merge window (batch 3/3)

2009-05-24 Thread Avi Kivity
Third batch of the 2.6.31 merge window submission. Please review. Andre Przywara (1): KVM: SVM: Fix cross vendor migration issue in segment segment descriptor Avi Kivity (4): KVM: Fix cpuid feature misreporting KVM: Add AMD cpuid bit: cr8_legacy, abm, misaligned sse, sse4, 3dnow

[PATCH 21/45] KVM: Update cpuid 1.ecx reporting

2009-05-24 Thread Avi Kivity
Signed-off-by: Avi Kivity --- arch/x86/kvm/x86.c |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 95a2a83..038ef77 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -1277,7 +1277,13 @@ static void do_cpuid_ent

[PATCH 33/45] KVM: s390: Unlink vcpu on destroy - v2

2009-05-24 Thread Avi Kivity
d-off-by: Christian Ehrhardt Signed-off-by: Avi Kivity --- arch/s390/kvm/kvm-s390.c | 10 -- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index 36c654d..628494a 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kv

[PATCH 28/45] KVM: x86: check for cr3 validity in mmu_alloc_roots

2009-05-24 Thread Avi Kivity
From: Marcelo Tosatti Verify the cr3 address stored in vcpu->arch.cr3 points to an existant memslot. If not, inject a triple fault. Signed-off-by: Marcelo Tosatti Signed-off-by: Avi Kivity --- arch/x86/kvm/mmu.c | 27 +++ arch/x86/kvm/x86.c |1 + 2 files chan

[PATCH 31/45] KVM: s390: use hrtimer for clock wakeup from idle - v2

2009-05-24 Thread Avi Kivity
tte Signed-off-by: Christian Ehrhardt Signed-off-by: Avi Kivity --- arch/s390/include/asm/kvm_host.h |5 - arch/s390/kvm/interrupt.c| 33 +++-- arch/s390/kvm/kvm-s390.c |7 +-- arch/s390/kvm/kvm-s390.h |4 +++- 4 files chan

[PATCH 30/45] KVM: s390: Fix memory slot versus run - v3

2009-05-24 Thread Avi Kivity
. Additionally most of the discussed special conditions for s390 like only one memslot and no user_alloc are now checked for validity in kvm_arch_set_memory_region. Reported-by: Mijo Safradin Signed-off-by: Carsten Otte Signed-off-by: Christian Ehrhardt Signed-off-by: Avi Kivity --- arch/s390

[PATCH 24/45] KVM: Replace ->drop_interrupt_shadow() by ->set_interrupt_shadow()

2009-05-24 Thread Avi Kivity
pov Signed-off-by: Avi Kivity --- arch/x86/include/asm/kvm_host.h|3 +- arch/x86/include/asm/kvm_x86_emulate.h |3 ++ arch/x86/kvm/svm.c | 32 +++- arch/x86/kvm/vmx.c | 49 +-- arch/x86/kvm/x8

[PATCH 04/45] KVM: Do not report TPR write to userspace if new value bigger or equal to a previous one.

2009-05-24 Thread Avi Kivity
From: Gleb Natapov Saves many exits to userspace in a case of IRQ chip in userspace. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity --- arch/x86/kvm/svm.c |4 arch/x86/kvm/vmx.c | 19 --- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/arch

[PATCH 18/45] KVM: Fix cpuid feature misreporting

2009-05-24 Thread Avi Kivity
MTRR, PAT, MCE, and MCA are all supported (to some extent) but not reported. Vista requires these features, so if userspace relies on kernel cpuid reporting, it loses support for Vista. Signed-off-by: Avi Kivity --- arch/x86/kvm/x86.c |7 +-- 1 files changed, 5 insertions(+), 2

[PATCH 19/45] KVM: Add AMD cpuid bit: cr8_legacy, abm, misaligned sse, sse4, 3dnow prefetch

2009-05-24 Thread Avi Kivity
Signed-off-by: Avi Kivity --- arch/x86/kvm/x86.c | 71 +++ 1 files changed, 38 insertions(+), 33 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index a403df1..95a2a83 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c

[PATCH 23/45] KVM: protect assigned dev workqueue, int handler and irq acker

2009-05-24 Thread Avi Kivity
ving the interrupt handler and work handlers run in parallel sounds like asking for trouble (could not spot any obvious problem, but better not have to, its fragile). CC: sheng.y...@intel.com Signed-off-by: Marcelo Tosatti Signed-off-by: Avi Kivity --- include/linux/kvm_host.h |1 + v

[PATCH 25/45] KVM: Deal with interrupt shadow state for emulated instructions

2009-05-24 Thread Avi Kivity
tapov Signed-off-by: Avi Kivity --- arch/x86/include/asm/kvm_x86_emulate.h |3 +++ arch/x86/kvm/x86.c |6 +- arch/x86/kvm/x86_emulate.c | 20 3 files changed, 28 insertions(+), 1 deletions(-) diff --git a/arch/x86/includ

[PATCH 16/45] KVM: SVM: Don't reinject event that caused a task switch

2009-05-24 Thread Avi Kivity
From: Gleb Natapov If a task switch caused by an event remove it from the event queue. VMX already does that. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity --- arch/x86/kvm/svm.c | 23 +-- 1 files changed, 21 insertions(+), 2 deletions(-) diff --git a/arch/x86

[PATCH 22/45] KVM: use smp_send_reschedule in kvm_vcpu_kick

2009-05-24 Thread Avi Kivity
ed with interrupts disabled. Signed-off-by: Marcelo Tosatti Signed-off-by: Avi Kivity --- arch/ia64/kernel/irq_ia64.c |3 +++ arch/ia64/kvm/kvm-ia64.c| 22 -- arch/x86/kernel/smp.c |3 +++ arch/x86/kvm/x86.c | 36 +++--

[PATCH 26/45] KVM: MMU: protect kvm_mmu_change_mmu_pages with mmu_lock

2009-05-24 Thread Avi Kivity
From: Marcelo Tosatti kvm_handle_hva, called by MMU notifiers, manipulates mmu data only with the protection of mmu_lock. Update kvm_mmu_change_mmu_pages callers to take mmu_lock, thus protecting against kvm_handle_hva. Signed-off-by: Marcelo Tosatti Signed-off-by: Avi Kivity --- arch/x86

[PATCH 29/45] KVM: Expand on "help" info to specify kvm intel and amd module names

2009-05-24 Thread Avi Kivity
From: Robert P. J. Day Signed-off-by: Robert P. J. Day Cc: Avi Kivity Signed-off-by: Andrew Morton Signed-off-by: Avi Kivity --- arch/x86/kvm/Kconfig |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig index a58504e

[PATCH 17/45] KVM: Drop request_nmi from stats

2009-05-24 Thread Avi Kivity
From: Jan Kiszka The stats entry request_nmi is no longer used as the related user space interface was dropped. So clean it up. Signed-off-by: Jan Kiszka Signed-off-by: Avi Kivity --- arch/x86/include/asm/kvm_host.h |1 - arch/x86/kvm/x86.c |1 - 2 files changed, 0

[PATCH 05/45] KVM: Get rid of arch.interrupt_window_open & arch.nmi_window_open

2009-05-24 Thread Avi Kivity
From: Gleb Natapov They are recalculated before each use anyway. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity --- arch/x86/include/asm/kvm_host.h |2 -- arch/x86/kvm/svm.c |6 +- arch/x86/kvm/vmx.c | 35 +++ 3

[PATCH 20/45] x86: Add cpu features MOVBE and POPCNT

2009-05-24 Thread Avi Kivity
Add cpu feature bit support for the MOVBE and POPCNT instructions. Signed-off-by: Avi Kivity --- arch/x86/include/asm/cpufeature.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h index bb83b1c

[PATCH 15/45] KVM: SVM: Fix cross vendor migration issue in segment segment descriptor

2009-05-24 Thread Avi Kivity
From: Andre Przywara On AMD CPUs sometimes the DB bit in the stack segment descriptor is left as 1, although the whole segment has been made unusable. Clear it here to pass an Intel VMX entry check when cross vendor migrating. Signed-off-by: Andre Przywara Signed-off-by: Avi Kivity --- arch

[PATCH 27/45] KVM: take mmu_lock when updating a deleted slot

2009-05-24 Thread Avi Kivity
From: Marcelo Tosatti kvm_handle_hva relies on mmu_lock protection to safely access the memslot structures. Signed-off-by: Marcelo Tosatti Signed-off-by: Avi Kivity --- virt/kvm/kvm_main.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt

[PATCH 02/45] KVM: Remove kvm_push_irq()

2009-05-24 Thread Avi Kivity
From: Gleb Natapov No longer used. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity --- arch/x86/kvm/x86.h |7 --- 1 files changed, 0 insertions(+), 7 deletions(-) diff --git a/arch/x86/kvm/x86.h b/arch/x86/kvm/x86.h index 2ab6791..39350b2 100644 --- a/arch/x86/kvm/x86.h +++ b

[PATCH 08/45] KVM: Get rid of get_irq() callback

2009-05-24 Thread Avi Kivity
From: Gleb Natapov It just returns pending IRQ vector from the queue for VMX/SVM. Get IRQ directly from the queue before migration and put it back after. Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity --- arch/x86/include/asm/kvm_host.h |1 - arch/x86/kvm/svm.c |8

[PATCH 06/45] KVM: SVM: Add NMI injection support

2009-05-24 Thread Avi Kivity
From: Gleb Natapov Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity --- arch/x86/include/asm/kvm_host.h |8 +++- arch/x86/kvm/svm.c | 96 --- arch/x86/kvm/vmx.c | 79 arch/x86/kvm/x86.c

[PATCH 13/45] KVM: Trivial format fix in setup_routing_entry()

2009-05-24 Thread Avi Kivity
From: Chris Wright Remove extra tab. Signed-off-by: Chris Wright Signed-off-by: Avi Kivity --- virt/kvm/irq_comm.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/virt/kvm/irq_comm.c b/virt/kvm/irq_comm.c index 4fa1f60..a8bd466 100644 --- a/virt/kvm/irq_comm.c +++ b

[PATCH 09/45] KVM: Wake up waitqueue before calling get_cpu()

2009-05-24 Thread Avi Kivity
From: Jan Blunck This moves the get_cpu() call down to be called after we wake up the waiters. Therefore the waitqueue locks can safely be rt mutex. Signed-off-by: Jan Blunck Signed-off-by: Sven-Thorsten Dietrich Signed-off-by: Marcelo Tosatti Signed-off-by: Avi Kivity --- arch/x86/kvm/x86

[PATCH 12/45] KVM: VMX: Disable VMX when system shutdown

2009-05-24 Thread Avi Kivity
From: Sheng Yang Intel TXT(Trusted Execution Technology) required VMX off for all cpu to work when system shutdown. CC: Joseph Cihula Signed-off-by: Sheng Yang Signed-off-by: Avi Kivity --- virt/kvm/kvm_main.c | 18 +- 1 files changed, 9 insertions(+), 9 deletions(-) diff

[PATCH 14/45] KVM: fix apic_debug instances

2009-05-24 Thread Avi Kivity
From: Glauber Costa Apparently nobody turned this on in a while... setting apic_debug to something compilable, generates some errors. This patch fixes it. Signed-off-by: Glauber Costa Signed-off-by: Avi Kivity --- arch/x86/kvm/lapic.c |4 ++-- 1 files changed, 2 insertions(+), 2

[PATCH 10/45] KVM: Replace get_mt_mask_shift with get_mt_mask

2009-05-24 Thread Avi Kivity
From: Sheng Yang Shadow_mt_mask is out of date, now it have only been used as a flag to indicate if TDP enabled. Get rid of it and use tdp_enabled instead. Also put memory type logical in kvm_x86_ops->get_mt_mask(). Signed-off-by: Sheng Yang Signed-off-by: Avi Kivity --- arch/x86/incl

[PATCH 11/45] KVM: Enable snooping control for supported hardware

2009-05-24 Thread Avi Kivity
type(UC/WC), which would be a conflict of host memory type then be a potential issue. Snooping control can guarantee the cache correctness of memory go through the DMA engine of VT-d. [avi: fix build on ia64] Signed-off-by: Sheng Yang Signed-off-by: Avi Kivity --- arch/ia64/include/asm

[PATCH 2/2] KVM: Make CR4 reloads also reload CR3 if paging is enabled

2009-05-25 Thread Avi Kivity
PGE. This triggered while booting an F11 PAE kernel; the futex initialization code runs before any CR3 reloads and writes to a NULL pointer; the futex subsystem ended up uninitialized, killing PI futexes and pulseaudio which uses them. Signed-off-by: Avi Kivity --- arch/x86/kvm/x86.c |6

[PATCH 0/2] KVM PDPTR reload fixes review

2009-05-25 Thread Avi Kivity
important guest. So please review it carefully. Avi Kivity (2): KVM: Make paravirt tlb flush also reload PAE PDPTEs KVM: Make CR4 reloads also reload CR3 if paging is enabled arch/x86/kvm/mmu.c |3 +-- arch/x86/kvm/x86.c |6 +- 2 files changed, 6 insertions(+), 3 deletions(-) --

[PATCH 1/2] KVM: Make paravirt tlb flush also reload PAE PDPTEs

2009-05-25 Thread Avi Kivity
The paravirt tlb flush may be used not only to flush TLBs, but also to reload the four page-directory-pointer-table entries, as it is used as a replacement for reloading CR3. Change the code to do the entire CR3 reloading dance instead of simply flushing the TLB. Signed-off-by: Avi Kivity

Re: [PATCH 0/1] x2apic implementation for kvm

2009-05-25 Thread Avi Kivity
Sheng Yang wrote: OK, you are totally talking about PV. For PV, I think let host kernel accept the modification is more important here. (And for PV, using hypercall seems more directly). Microsoft already defined their interfaces, and they use MSRs (but a different range from x2apic). --

Re: [PATCH 0/1] x2apic implementation for kvm

2009-05-25 Thread Avi Kivity
Sheng Yang wrote: I think that means the PV interface for lapic. And yes, we can support it follow MS's interface, but x2apic still seems another story as you noted... I still don't think support x2apic here would bring us more benefits. x2apic has the following benefit: - msr exits are fa

Re: [KVM-AUTOTEST PATCH] WinXP step files: add an optional barrier to deal with a closed start menu

2009-05-25 Thread Avi Kivity
Michael Goldish wrote: - "sudhir kumar" wrote: Any plans to add other windows stepfiles? Yes, we have plans to add Windows 7. We should also fix Win2008.64, which has an incomplete step file. However, we will no longer rely on step files when we start using unattended Linux and

Re: [PATCH v2] kvm-kmod: x86: Drop duplicate external-module-compat objects

2009-05-25 Thread Avi Kivity
Jan Kiszka wrote: Checked against 2.6.18 (2.6.16 doesn't build build with my gcc-4.3 and x86/x86_emulate.o sends my gcc-3.3 into some stack overflow): We only need to export kvm_smp_call_function_single. More patches to fix various old kernel build breakages are now also in my queue...

Re: [PATCH] kvm-kmod: x86: Drop duplicate external-module-compat objects

2009-05-25 Thread Avi Kivity
Jan Kiszka wrote: Can you show the call to hash? It's more interesting than the aftermath of its failure. strace said eg.: execve("./scripts/basic/hash", ["./scripts/basic/hash", "djb2", "/data/kvm-kmod/x86/..kvm", "kvm-amd", "kvm-intel"], ... Tried to look what's going on. Never

Re: [PATCH 0/1] x2apic implementation for kvm

2009-05-25 Thread Avi Kivity
Dong, Eddie wrote: x2apic has the following benefit: - msr exits are faster than mmio (no page table walk, emulation) - no need to read back ICR to look at the busy bit - one ICR write instead of two - potential to support large guests once we add interrupt remapping - shared code with the Hyper

Re: XP smp using a lot of CPU

2009-05-25 Thread Avi Kivity
Erik Rull wrote: Hi Avi, no I'm using a partition as a drive, here's my command-line: taskset 0x0002 /usr/X11R6/bin/qemu-system-x86_64 -usb -drive file=/dev/hda2,cache=off -m 1536 -net nic,macaddr=$MACADDR -net tap,script=/etc/qemu-ifup -no-acpi -monitor stdio -L /usr/X11R6/share/qemu -us

Re: [PATCH 0/1] x2apic implementation for kvm

2009-05-25 Thread Avi Kivity
Sheng Yang wrote: On Monday 25 May 2009 17:22:34 Avi Kivity wrote: Sheng Yang wrote: I think that means the PV interface for lapic. And yes, we can support it follow MS's interface, but x2apic still seems another story as you noted... I still don't think support x2apic here w

Re: Userspace MSR handling

2009-05-25 Thread Avi Kivity
Gerd Hoffmann wrote: On 05/24/09 14:07, Avi Kivity wrote: I agree however that the Xen hypercall page protocol has no business in kvm.ko. But can't we implement it in emu? Xenner conveniently places a ring 0 stub in the guest, we could trap the MSR there and emulate it entirely in the

Re: [PATCH] qemu-kvm: Flush icache after dma operations for ia64

2009-05-25 Thread Avi Kivity
Jes Sorensen wrote: +/* + * Is this correct for PPC? + */ +#define dma_flush_range(start, end) \ +do { (void) (start); (void) (end); } while (0) Correct or not, should be a function/ +#define dma_flush_range(start, end) \ +do { (void) (start); (void)

Re: Userspace MSR handling

2009-05-25 Thread Avi Kivity
Gerd Hoffmann wrote: On 05/25/09 13:20, Avi Kivity wrote: It should have been implemented as mmio. Maybe implement an ioctl that converts rdmsr/wrmsr to equivalent mmios? struct kvm_msr_mmio { __u32 msr; __u32 nr; __u64 mmio; __u32 flags; __u32 pad[3]; } Funny way to tunnel msr access

Re: NULL pointer dereference in kernel code, ignored parameters in libkvm

2009-05-25 Thread Avi Kivity
Gabe Black wrote: It would also be interesting to hear how you use kvm. Ultimately, we'd like to use KVM for at least two things. The first is as a way to fast forward simulations to the portion of interest before switching into something slower that can collect interesting statistics and

Re: potential tss trampling, assumptions about physical memory layout

2009-05-25 Thread Avi Kivity
Gabe Black wrote: While continuing to try to get KVM and our M5 simulator to work together, I ran into another issue. During VCPU bring up in x86 under VMX, the function init_rmode_tss is called which seems to be writing an initial version of a TSS into guest memory. It's not immediately

Re: [KVM-AUTOTEST PATCH] kvm_vm.py: add new function VM.clone() which returns a clone of the VM

2009-05-25 Thread Avi Kivity
Michael Goldish wrote: Signed-off-by: Michael Goldish --- client/tests/kvm_runtest_2/kvm_vm.py | 18 ++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm_runtest_2/kvm_vm.py b/client/tests/kvm_runtest_2/kvm_vm.py index af06693..9571a3b 100644 --

Need a new plan on adding kvm support to qemu

2009-05-25 Thread Avi Kivity
While I appreciate the efforts to add clean qemu/kvm integration in upstream, it's driving me mad. Every merge I'm faced with regressions (mostly due to changing code, not to upstream breakage) and need to fix things. Work done during merges is very likely to contain errors since there's no i

Re: [PATCH 2/2] KVM: Make CR4 reloads also reload CR3 if paging is enabled

2009-05-25 Thread Avi Kivity
Marcelo Tosatti wrote: On Mon, May 25, 2009 at 11:47:24AM +0300, Avi Kivity wrote: The processor is documented to reload the PDPTRs while in PAE mode if any of the CR4 bits PSE, PGE, or PAE change. Linux relies on this behaviour when zapping the low mappings of PAE kernels during boot. The

Re: [PATCH 1/2] KVM: Make paravirt tlb flush also reload PAE PDPTEs

2009-05-25 Thread Avi Kivity
Marcelo Tosatti wrote: On Mon, May 25, 2009 at 11:47:23AM +0300, Avi Kivity wrote: The paravirt tlb flush may be used not only to flush TLBs, but also to reload the four page-directory-pointer-table entries, as it is used as a replacement for reloading CR3. Change the code to do the entire

Re: [PATCH][KVM-AUTOTEST] Make code to remove kvm modules more robust

2009-05-25 Thread Avi Kivity
Lucas Meneghel Rodrigues wrote: Hi Mike, On Wed, 2009-05-20 at 16:04 -0400, Mike Burns wrote: + +def __unload_modules(module): + lsmod = os.popen("lsmod | grep \"^%s \"" % module) + line_parts = lsmod.readline().split() + if len(line_parts) == 0: +kvm_log.info("%s not loaded." % modul

[GIT PULL] KVM fixes for 2.6.30-rc7

2009-05-25 Thread Avi Kivity
pi futex subsystem. So please pull from git://git.kernel.org/pub/scm/virt/kvm/kvm.git kvm-updates/2.6.30 To get Avi Kivity (2): KVM: Make paravirt tlb flush also reload the PAE PDPTRs KVM: Fix PDPTR reloading on CR4 writes arch/x86/kvm/mmu.c |3 +-- arch/x86/kvm/x86.c |6

Re: [PATCH -v3] KVM: MCE: Add MCE support to KVM

2009-05-25 Thread Avi Kivity
Jan Kiszka wrote: Avi Kivity wrote: Huang Ying wrote: The related MSRs are emulated. MCE capability is exported via extension KVM_CAP_MCE and ioctl KVM_X86_GET_MCE_CAP_SUPPORTED. A new vcpu ioctl command KVM_X86_SETUP_MCE is used to setup MCE emulation such as the mcg_cap. MCE is

Re: [PATCH] kvm-kmod: Various compat fixes for older kernels

2009-05-26 Thread Avi Kivity
Jan Kiszka wrote: Various fixes that were required to build against a 2.6.18 kernel, but some affect newer kernels, too: - replacements for uaccess.h and relay.h - flush_work compat wrapper - fix msi_enabled hack - hack eventfd.c for INIT_WORK Please split into separate patches.

Re: [PATCH 3/3] kvm-s390: streamline memslot handling

2009-05-26 Thread Avi Kivity
Christian Ehrhardt wrote: There already exists a loop which does this, see make_all_cpus_request(). It uses an IPI (Marcelo, can't it use the reschedule interrupt?). It has a couple of optimizations -- if the request is already set, it skips the IPI, and it avoids the IPI for vcpus out of

Re: 64bit guest thinks it is 32bit in kvm-86 - Intel only

2009-05-26 Thread Avi Kivity
Josh Wilsdon wrote: the kernel refuses to boot with the error message: "This kernel requires an x86-64 CPU, but only detected an i686 CPU. Unable to boot - please use a kernel appropriate for your CPU." This should fix it: http://git.kernel.org/?p=virt/kvm/qemu-kvm.git;a=commi

Re: [PATCH] kvmtrace_format: read /usr/share/kvm/formats by default

2009-05-26 Thread Avi Kivity
Eduardo Habkost wrote: This will help distributions to package kvmtrace and kvmtrace_format, making kvmtrace_format work out-of-the-box. The directory is defined at the beginning of the script to make it easier for distributions to customize the path at install-time, depending on packaging param

  1   2   3   4   5   6   7   8   9   10   >