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

2009-05-24 Thread Gleb Natapov
On Mon, May 25, 2009 at 02:48:03PM +0800, Sheng Yang wrote: > > > > > Yeah... x2apic is for interrupt remapping, and interrupt remapping is > > > > > for VT-d engine. So if we don't want to virtualize VT-d engine and > > > > > interrupt remapping, x2apic is useless for the guest... And VT-d > > > >

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

2009-05-24 Thread Jan Kiszka
Avi Kivity wrote: > 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 e30

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

2009-05-24 Thread Jan Kiszka
Avi Kivity wrote: > 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/scri

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

2009-05-24 Thread Jan Kiszka
Avi Kivity wrote: > 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 writi

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

2009-05-24 Thread Sheng Yang
On Monday 25 May 2009 14:38:11 Gleb Natapov wrote: > On Mon, May 25, 2009 at 02:30:05PM +0800, Sheng Yang wrote: > > On Monday 25 May 2009 14:13:23 Gleb Natapov wrote: > > > On Mon, May 25, 2009 at 02:08:26PM +0800, Sheng Yang wrote: > > > > On Friday 22 May 2009 01:37:53 Gleb Natapov wrote: > > >

Re: [KVM-AUTOTEST] [PATCH] support for remote migration

2009-05-24 Thread sudhir kumar
Michael, any updates on this patch? Are you going to commit this or you have any other plans/patch ? On Tue, May 5, 2009 at 1:12 AM, Michael Goldish wrote: > Thanks for the new patch. I'll comment on it later because I want to take > some more time to review it. > > The login prompt problem is m

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

2009-05-24 Thread Gleb Natapov
On Mon, May 25, 2009 at 02:30:05PM +0800, Sheng Yang wrote: > On Monday 25 May 2009 14:13:23 Gleb Natapov wrote: > > On Mon, May 25, 2009 at 02:08:26PM +0800, Sheng Yang wrote: > > > On Friday 22 May 2009 01:37:53 Gleb Natapov wrote: > > > > This is implementation of x2apic for KVM that I wrote a w

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

2009-05-24 Thread Sheng Yang
On Monday 25 May 2009 14:13:23 Gleb Natapov wrote: > On Mon, May 25, 2009 at 02:08:26PM +0800, Sheng Yang wrote: > > On Friday 22 May 2009 01:37:53 Gleb Natapov wrote: > > > This is implementation of x2apic for KVM that I wrote a while ago. > > > Unfortunately there is no guest that can take advant

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

2009-05-24 Thread Gleb Natapov
On Mon, May 25, 2009 at 02:08:26PM +0800, Sheng Yang wrote: > On Friday 22 May 2009 01:37:53 Gleb Natapov wrote: > > This is implementation of x2apic for KVM that I wrote a while ago. > > Unfortunately there is no guest that can take advantage of it since > > Linux doesn't (yet?) use x2apic if inte

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

2009-05-24 Thread Sheng Yang
On Friday 22 May 2009 01:37:53 Gleb Natapov wrote: > This is implementation of x2apic for KVM that I wrote a while ago. > Unfortunately there is no guest that can take advantage of it since > Linux doesn't (yet?) use x2apic if interrupt remapping is not enabled > and I don't feel like implement int

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

2009-05-24 Thread Josh Wilsdon
I have been fighting with a problem with kvm-86 now for a while and I wanted to see if this was a known issue or anyone had suggestions as to where to look. These tests are being run on an Intel Core 2 Quad Q8400 with 4GB of RAM. The host OS is Ubuntu 9.04 using the 2.6.28-11-server kernel that c

potential tss trampling, assumptions about physical memory layout

2009-05-24 Thread Gabe Black
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 clear to me why tha

Re: [ANNOUNCE] kvm-86 release

2009-05-24 Thread Farkas Levente
Avi Kivity wrote: > 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/

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

2009-05-24 Thread Gabe Black
Avi Kivity wrote: > 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? Right now we're trying to run x86 on x86 but using our device models ins

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

2009-05-24 Thread sudhir kumar
Any plans to add other windows stepfiles? On Sun, May 24, 2009 at 9:16 PM, Michael Goldish wrote: > Signed-off-by: Michael Goldish > --- >  .../kvm_runtest_2/steps/WinXP-32-setupssh.steps    |   10 -- >  client/tests/kvm_runtest_2/steps/WinXP-32.steps    |    4 +++- >  client/tests/kvm_r

Re: [KVM-AUTOTEST PATCH] kvm_vm.py: make sure the bulk of VM.create() is not executed in parallel

2009-05-24 Thread sudhir kumar
On Sun, May 24, 2009 at 9:16 PM, Michael Goldish wrote: > VM.create() does a few things (such as finding free ports) which are not safe > to execute in parallel. Use a lock file to make sure this doesn't happen. The > lock is released only after the VM is started or fails to start. > > Signed-off-

Re: [KVM-AUTOTEST PATCH] kvm_runtest_2.py: use environment filename specified by the 'env' parameter

2009-05-24 Thread sudhir kumar
good one to be in. thanks On Sun, May 24, 2009 at 9:16 PM, Michael Goldish wrote: > Do not use hardcoded environment filename 'env'. Instead use the value > specified by the 'env' parameter. If unspecified, use 'env' as the filename. > > This is important for parallel execution; it may be necess

Re: [KVM-AUTOTEST PATCH] kvm_utils.py: remote_login(): improve regular expression matching

2009-05-24 Thread sudhir kumar
The patch looks sane to me. A very good thing that can be done for remote_login() is to tune the tmeouts. I have seen especialy with windows guests or sometimes when the machine is heavily loaded the timeouts elapse and the test fails. When I increased the timeouts the test did not fail. internal_t

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

2009-05-24 Thread Tomasz Chmielewski
Avi Kivity wrote: Tomasz Chmielewski wrote: This system is running as a kvm-85 guest. This is a guest oops, right? Yes, that was a guest Oops. -- Tomasz Chmielewski http://wpkg.org -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vge

Re: Userspace MSR handling

2009-05-24 Thread Alexander Graf
On 24.05.2009, at 14:07, Avi Kivity wrote: 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

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

2009-05-24 Thread Avi Kivity
From: Sheng Yang Memory aliases with different memory type is a problem for guest. For the guest without assigned device, the memory type of guest memory would always been the same as host(WB); but for the assigned device, some part of memory may be used as DMA and then set to uncacheable memory

[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 deletions

[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/include/asm

[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 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 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 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 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/a

[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/x

[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/kvm

[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..9c63b

[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 insert

[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 fi

[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..8600a

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

2009-05-24 Thread Avi Kivity
From: Marcelo Tosatti KVM uses a function call IPI to cause the exit of a guest running on a physical cpu. For virtual interrupt notification there is no need to wait on IPI receival, or to execute any function. This is exactly what the reschedule IPI does, without the overhead of function IPI.

[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/kv

[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/k

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

2009-05-24 Thread Avi Kivity
From: Marcelo Tosatti kvm_assigned_dev_ack_irq is vulnerable to a race condition with the interrupt handler function. It does: if (dev->host_irq_disabled) { enable_irq(dev->host_irq); dev->host_irq_disabled = false; } If an interrupt triggers befo

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

2009-05-24 Thread Avi Kivity
From: Glauber Costa We currently unblock shadow interrupt state when we skip an instruction, but failing to do so when we actually emulate one. This blocks interrupts in key instruction blocks, in particular sti; hlt; sequences If the instruction emulated is an sti, we have to block shadow inter

[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 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/x8

[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 deletions

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

2009-05-24 Thread Avi Kivity
From: Glauber Costa This patch replaces drop_interrupt_shadow with the more general set_interrupt_shadow, that can either drop or raise it, depending on its parameter. It also adds ->get_interrupt_shadow() for future use. Signed-off-by: Glauber Costa CC: H. Peter Anvin CC: Gleb Natapov Signe

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

2009-05-24 Thread Avi Kivity
From: Christian Borntraeger This patch reworks the s390 clock comparator wakeup to hrtimer. The clock comparator is a per-cpu value that is compared against the TOD clock. If ckc <= TOD an external interrupt 1004 is triggered. Since the clock comparator and the TOD clock have a much higher resolu

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

2009-05-24 Thread Avi Kivity
From: Carsten Otte This patch fixes an incorrectness in the kvm backend for s390. In case virtual cpus are being created before the corresponding memory slot is being registered, we need to update the sie control blocks for the virtual cpus. *updates in v3* In consideration of the s390 memslot c

[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 changed,

[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
From: Carsten Otte This patch makes sure we do unlink a vcpu's sie control block from the system control area in kvm_arch_vcpu_destroy. This prevents illegal accesses to the sie control block from other virtual cpus after free. Reported-by: Mijo Safradin Signed-off-by: Carsten Otte Signed-off-

[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 pr

[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 Kivity

[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 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/s

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

2009-05-24 Thread Avi Kivity
From: Carsten Otte This patch adds a sanity check for the content of the guest prefix register content before faulting in the cpu lowcore that it refers to. The guest might end up in an endless loop where SIE complains about missing lowcore with incorrect content of the prefix register without th

[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/irq

[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..d9396a

[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/k

[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 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..fe

[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/x86

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

2009-05-24 Thread Avi Kivity
From: Gleb Natapov INTn will be re-executed after migration. If we wanted to migrate pending software interrupt we would need to migrate interrupt type and instruction length too, but we do not have all required info on SVM, so SVM->VMX migration would need to re-execute INTn anyway. To make it s

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

2009-05-24 Thread Avi Kivity
From: Gleb Natapov If NMI is received during handling of another NMI it should be injected immediately after IRET from previous NMI handler, but SVM intercept IRET before instruction execution so we can't inject pending NMI at this point and there is not way to request exit when NMI window opens.

[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/x

[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 deletion

[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/k

[KVM-AUTOTEST PATCH] kvm_runtest_2.py: use pickle instead of shelve when loading/saving env

2009-05-24 Thread Michael Goldish
pickle allows more control over the load/save process. Specifically, it enables us to dump the contents of an object to disk without having to unpickle it. shelve, which uses pickle, seems to pickle and unpickle every time sync() is called. This is bad for classes that need to be unpickled only onc

[KVM-AUTOTEST PATCH] kvm_vm.py: add new VM parameter 'x11_display' that controls $DISPLAY

2009-05-24 Thread Michael Goldish
If x11_display is specified, the DISPLAY environment variable is set to this value for the QEMU process. This may be useful for SDL rendering. Also add some comments. Signed-off-by: Michael Goldish --- client/tests/kvm_runtest_2/kvm_vm.py | 12 +++- 1 files changed, 11 insertions(+),

[KVM-AUTOTEST PATCH] kvm_utils.py: remote_login(): improve regular expression matching

2009-05-24 Thread Michael Goldish
1. Make the 'login:' regular expression stricter so it doesn't match 'Last login: ...' messages. 2. Make the 'password:' regular expression stricter. 3. Handle 'Connection refused' messages. Signed-off-by: Michael Goldish --- client/tests/kvm_runtest_2/kvm_utils.py | 13 + 1 files

[KVM-AUTOTEST PATCH] kvm_runtest_2.py: use environment filename specified by the 'env' parameter

2009-05-24 Thread Michael Goldish
Do not use hardcoded environment filename 'env'. Instead use the value specified by the 'env' parameter. If unspecified, use 'env' as the filename. This is important for parallel execution; it may be necessary to use a separate environment file for each process. Signed-off-by: Michael Goldish --

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

2009-05-24 Thread Michael Goldish
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 --- a/client/tests/kvm_runt

[KVM-AUTOTEST PATCH] kvm_vm.py: make sure the bulk of VM.create() is not executed in parallel

2009-05-24 Thread Michael Goldish
VM.create() does a few things (such as finding free ports) which are not safe to execute in parallel. Use a lock file to make sure this doesn't happen. The lock is released only after the VM is started or fails to start. Signed-off-by: Michael Goldish --- client/tests/kvm_runtest_2/kvm_vm.py |

[KVM-AUTOTEST PATCH] VM.create(): always destroy() the VM before attempting to start it

2009-05-24 Thread Michael Goldish
Also, don't do it in kvm_preprocessing.py since it's now done in kvm_vm.py. Signed-off-by: Michael Goldish --- client/tests/kvm_runtest_2/kvm_preprocessing.py |1 - client/tests/kvm_runtest_2/kvm_vm.py|2 ++ 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/clien

[KVM-AUTOTEST PATCH] Use new function VM.get_name() to get the VM's name, instead of VM.name

2009-05-24 Thread Michael Goldish
kvm_vm.py: add function VM.get_name(). kvm_preprocessing.py: use VM.get_name() instead of directly accessing the .name attribute. Signed-off-by: Michael Goldish --- client/tests/kvm_runtest_2/kvm_preprocessing.py |6 +++--- client/tests/kvm_runtest_2/kvm_vm.py|4 2 files

[KVM-AUTOTEST PATCH] kvm_vm.py: choose a monitor filename in the constructor instead of VM.create()

2009-05-24 Thread Michael Goldish
This will reduce the number of monitor files left in /tmp, because the constructor is called fewer times than VM.create(). Signed-off-by: Michael Goldish --- client/tests/kvm_runtest_2/kvm_vm.py | 16 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/client/tests/

[KVM-AUTOTEST PATCH] stepeditor.py: get rid of some annoying keyboard shortcuts

2009-05-24 Thread Michael Goldish
Disable a few keyboard shortcuts that were initially assumed to be useful, but apparently override the default functionality of the involved keys (e.g. 'home', 'end', 'delete') regardless of the widget that has the keyboard focus. Also make some indentation changes to the UI description. Signed-o

[KVM-AUTOTEST PATCH] RHEL-5.3 step files: fix initial boot barriers and an inconsistent dialog

2009-05-24 Thread Michael Goldish
Fix the initial boot barriers to include the 'boot:' prompt. Also fix a barrier in 5.3 of a dialog that sometimes appears at an unexpected location. Signed-off-by: Michael Goldish --- .../tests/kvm_runtest_2/steps/RHEL-5.3-i386.steps | 12 ++-- .../kvm_runtest_2/steps/RHEL-5.3-x86_64.

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

2009-05-24 Thread Michael Goldish
Signed-off-by: Michael Goldish --- .../kvm_runtest_2/steps/WinXP-32-setupssh.steps| 10 -- client/tests/kvm_runtest_2/steps/WinXP-32.steps|4 +++- client/tests/kvm_runtest_2/steps/WinXP-64.steps|3 +-- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/c

[KVM-AUTOTEST PATCH] RHEL-4.7 step files: fix the initial boot barriers

2009-05-24 Thread Michael Goldish
Fix the first barrier to include the 'boot:' prompt. This is crucial because the guest accepts keyboard input only after this prompt appears. Signed-off-by: Michael Goldish --- .../tests/kvm_runtest_2/steps/RHEL-4.7-i386.steps |2 +- .../kvm_runtest_2/steps/RHEL-4.7-x86_64.steps |2

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

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: [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 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: [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][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: [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: 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: [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: [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 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: [libvirt] Re: BUG REPORT: -net tap, fd=X does not work correctly in kvm-86

2009-05-24 Thread Daniel P. Berrange
On Fri, May 22, 2009 at 09:12:55PM -0500, Anthony Liguori wrote: > Josh Wilsdon wrote: > >We are doing work with libvirt 0.6.3 through which we have started > >virtual machines. Using the same "create" command with the same > >storage, the same everything else this configuration works with both >

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

2009-05-24 Thread Tomasz Chmielewski
This system is running as a kvm-85 guest. When this happened, IO and CPU load were bigger than usually. The system is still running and I have some sysstat (sar) statistics for it, if anyone has some ideas about it. BUG: unable to handle kernel NULL pointer dereference at (null) IP: [] page

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 serie

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: [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: 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: 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: 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: 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: [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

  1   2   >