[COMMIT master] KVM: ia64: remove redundant kvm_get_exit_data() NULL tests

2010-01-18 Thread Avi Kivity
From: Roel Kluin roel.kl...@gmail.com kvm_get_exit_data() cannot return a NULL pointer. Signed-off-by: Roel Kluin roel.kl...@gmail.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/ia64/kvm/kvm_fw.c b/arch/ia64/kvm/kvm_fw.c index e4b8231..cb548ee 100644 ---

[COMMIT master] KVM: fix cleanup_srcu_struct use-after-free

2010-01-18 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com kvm_destroy_vm should free struct kvm after cleanup_srcu_struct. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 9843f3d..2b7cd6c 100644 ---

[COMMIT master] KVM: PPC: Add helper functions to call real mode loaders

2010-01-18 Thread Avi Kivity
From: Alexander Graf ag...@suse.de Linux contains quite some bits of code to load FPU, Altivec and VSX lazily for a task. It calls those bits in real mode, coming from an interrupt handler. For KVM we better reuse those, so let's wrap a bit of trampoline magic around them and then we can call

[COMMIT master] KVM: PPC: Add support for FPU/Altivec/VSX

2010-01-18 Thread Avi Kivity
From: Alexander Graf ag...@suse.de When our guest starts using either the FPU, Altivec or VSX we need to make sure Linux knows about it and sneak into its process switching code accordingly. This patch makes accesses to the above parts of the system work inside the VM. Signed-off-by: Alexander

[COMMIT master] KVM: PPC: Fix initial GPR settings

2010-01-18 Thread Avi Kivity
From: Alexander Graf ag...@suse.de Commit 7d01b4c3ed2bb33ceaf2d270cb4831a67a76b51b introduced PACA backed vcpu values. With this patch, when a userspace app was setting GPRs before it was actually first loaded, the set values get discarded. This is because vcpu_load loads them from the vcpu

[COMMIT master] eventfd - allow atomic read and waitqueue remove

2010-01-18 Thread Avi Kivity
From: Davide Libenzi davi...@xmailserver.org KVM needs a wait to atomically remove themselves from the eventfd -poll() wait queue head, in order to handle correctly their IRQfd deassign operation. This patch introduces such API, plus a way to read an eventfd from its context. Signed-off-by:

[COMMIT master] KVM: do not store wqh in irqfd

2010-01-18 Thread Avi Kivity
From: Michael S. Tsirkin m...@redhat.com wqh is unused, so we do not need to store it in irqfd anymore Signed-off-by: Michael S. Tsirkin m...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c index 486c604..7016319 100644 ---

[COMMIT master] KVM: Implement NotifyLongSpinWait HYPER-V hypercall

2010-01-18 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com Windows issues this hypercall after guest was spinning on a spinlock for too many iterations. Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Vadim Rozenfeld vroze...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git

[COMMIT master] KVM: Implement bare minimum of HYPER-V MSRs

2010-01-18 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com Minimum HYPER-V implementation should have GUEST_OS_ID, HYPERCALL and VP_INDEX MSRs. [avi: fix build on i386] Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Vadim Rozenfeld vroze...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com fix x86

Re: [PATCH v3 04/12] Add handle page fault PV helper.

2010-01-18 Thread H. Peter Anvin
On 01/17/2010 06:44 AM, Gleb Natapov wrote: On Thu, Jan 14, 2010 at 06:31:07PM +0100, Peter Zijlstra wrote: On Tue, 2010-01-05 at 16:12 +0200, Gleb Natapov wrote: Allow paravirtualized guest to do special handling for some page faults. The patch adds one 'if' to do_page_fault() function. The

Re: [PATCH v3 04/12] Add handle page fault PV helper.

2010-01-18 Thread Gleb Natapov
On Mon, Jan 18, 2010 at 12:34:16AM -0800, H. Peter Anvin wrote: On 01/17/2010 06:44 AM, Gleb Natapov wrote: On Thu, Jan 14, 2010 at 06:31:07PM +0100, Peter Zijlstra wrote: On Tue, 2010-01-05 at 16:12 +0200, Gleb Natapov wrote: Allow paravirtualized guest to do special handling for some page

Re: [PATCH] KVM: Add missing emulation failure report in kvm_mmu_page_fault()

2010-01-18 Thread Sheng Yang
On Sunday 17 January 2010 20:34:23 Avi Kivity wrote: On 01/15/2010 10:44 AM, Sheng Yang wrote: Currently we only have handle_invalid_guest_state() reported emulation failure... Signed-off-by: Sheng Yangsh...@linux.intel.com --- arch/x86/kvm/mmu.c |1 + 1 files changed, 1

[PATCH] KVM: rename is_writeble_pte() to is_writable_pte()

2010-01-18 Thread Takuya Yoshikawa
There are two spellings of writable in arch/x86/kvm/mmu.c and paging_tmpl.h . This patch renames is_writeble_pte() to is_writable_pte() and makes grepping easy. New name is consistent with the definition of itself: return pte PT_WRITABLE_MASK; Signed-off-by: Takuya Yoshikawa

Re: [PATCH v3 04/12] Add handle page fault PV helper.

2010-01-18 Thread Andi Kleen
Peter Zijlstra pet...@infradead.org writes: Whatever are we doing to end up in do_page_fault() as it stands? Surely we can tell the CPU to go elsewhere to handle faults? Isn't that as simple as calling set_intr_gate(14, my_page_fault) somewhere on the cpuinit instead of the regular

Re: [PATCH] KVM: rename is_writeble_pte() to is_writable_pte()

2010-01-18 Thread Avi Kivity
On 01/18/2010 11:45 AM, Takuya Yoshikawa wrote: There are two spellings of writable in arch/x86/kvm/mmu.c and paging_tmpl.h . This patch renames is_writeble_pte() to is_writable_pte() and makes grepping easy. New name is consistent with the definition of itself: return pte

Re: [PATCH] KVM: Add missing emulation failure report in kvm_mmu_page_fault()

2010-01-18 Thread Avi Kivity
On 01/18/2010 11:32 AM, Sheng Yang wrote: On Sunday 17 January 2010 20:34:23 Avi Kivity wrote: On 01/15/2010 10:44 AM, Sheng Yang wrote: Currently we only have handle_invalid_guest_state() reported emulation failure... This is intentional - instead of spamming dmesg, we exit

Re: [PATCH][STABLE-0.12] qemu-kvm: Disable cpu_set command to avoid segfault

2010-01-18 Thread Avi Kivity
On 01/11/2010 07:27 PM, Ryota Ozaki wrote: CPU hotplug feature is lost in this version. Even worse cpu_set qemu command may cause segfault. This patch fix the problem by just disabling it. It is enough for the stable branch. Signed-off-by: Ryota Ozakiozaki.ry...@gmail.com Cc: Gleb

Re: [PATCH][STABLE-0.12] qemu-kvm: Disable cpu_set command to avoid segfault

2010-01-18 Thread Daniel P. Berrange
On Mon, Jan 18, 2010 at 01:34:21PM +0200, Avi Kivity wrote: On 01/11/2010 07:27 PM, Ryota Ozaki wrote: CPU hotplug feature is lost in this version. Even worse cpu_set qemu command may cause segfault. This patch fix the problem by just disabling it. It is enough for the stable branch.

Re: [PATCH][STABLE-0.12] qemu-kvm: Disable cpu_set command to avoid segfault

2010-01-18 Thread Avi Kivity
On 01/18/2010 01:49 PM, Daniel P. Berrange wrote: Daniel, how is libvirt going to react to this? At this precise point in time it won't react since its not using it, but in a week's time when we have finished the libvirt code to use 'cpu_set' it'll be less happy ! Can't we actually fix

Re: [PATCH][STABLE-0.12] qemu-kvm: Disable cpu_set command to avoid segfault

2010-01-18 Thread Gleb Natapov
On Mon, Jan 18, 2010 at 01:57:04PM +0200, Avi Kivity wrote: On 01/18/2010 01:49 PM, Daniel P. Berrange wrote: Daniel, how is libvirt going to react to this? At this precise point in time it won't react since its not using it, but in a week's time when we have finished the libvirt code to use

Re: [PATCH][STABLE-0.12] qemu-kvm: Disable cpu_set command to avoid segfault

2010-01-18 Thread Avi Kivity
On 01/18/2010 02:03 PM, Gleb Natapov wrote: We should certainly fix it, but I doubt it's a good fit for the stable tree. Gleb, what would it take? I have no idea about what causes segfault, so can't really tell how invasive fix would be, but fixing segfault is not enough we will have

Re: [PATCH][STABLE-0.12] qemu-kvm: Disable cpu_set command to avoid segfault

2010-01-18 Thread Gleb Natapov
On Mon, Jan 18, 2010 at 02:08:40PM +0200, Avi Kivity wrote: On 01/18/2010 02:03 PM, Gleb Natapov wrote: We should certainly fix it, but I doubt it's a good fit for the stable tree. Gleb, what would it take? I have no idea about what causes segfault, so can't really tell how invasive fix

Re: [PATCH qemu-kvm] device assignment: default requires IOMMU

2010-01-18 Thread Alexander Graf
Chris Wright wrote: [ resend, fixing email header, sorry for duplicate ] The default mode for device assignment is to rely on an IOMMU for proper translations and a functioning device in the guest. The current logic makes this requirement advisory, and simply disables the request for IOMMU

[PATCH] KVM test: Make sure unattended install allways use user nw

2010-01-18 Thread Lucas Meneghel Rodrigues
I have just realized that unattended install wasn't depending on user mode networking, while it should. Fixing it. Signed-off-by: Lucas Meneghel Rodrigues l...@redhat.com --- client/tests/kvm/tests_base.cfg.sample |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git

Re: [PATCH qemu-kvm] device assignment: default requires IOMMU

2010-01-18 Thread Avi Kivity
On 01/18/2010 04:18 PM, Alexander Graf wrote: Chris Wright wrote: [ resend, fixing email header, sorry for duplicate ] The default mode for device assignment is to rely on an IOMMU for proper translations and a functioning device in the guest. The current logic makes this requirement

Re: [Autotest] [PATCH] KVM test: Add PCI device assignment support

2010-01-18 Thread Lucas Meneghel Rodrigues
Ok, after some consideration I have applied the patch: http://autotest.kernel.org/changeset/4144 Thank you for your work on this test! On Wed, Jan 13, 2010 at 12:19 AM, Yolkfull Chow yz...@redhat.com wrote: On Tue, Jan 12, 2010 at 04:28:13PM -0200, Lucas Meneghel Rodrigues wrote: Add support

[PATCH] Add definitions for current cpu models..

2010-01-18 Thread john cooper
This is a rework of the prior version which adds definitions for contemporary processors selected via -cpu model, as an alternative to the existing use of -cpu qemu64 augmented with a series of feature flags. The primary motivation was determination of a least common denominator within a given

Re: KVM: MMU: bail out pagewalk on kvm_read_guest error

2010-01-18 Thread Marcelo Tosatti
On Sun, Jan 17, 2010 at 10:23:37AM +0200, Avi Kivity wrote: On 01/14/2010 09:41 PM, Marcelo Tosatti wrote: Exit the guest pagetable walk loop if reading gpte failed. Otherwise its possible to enter an endless loop processing the previous present pte. Cc: sta...@kernel.org Signed-off-by:

Re: KVM: MMU: bail out pagewalk on kvm_read_guest error

2010-01-18 Thread Avi Kivity
On 01/18/2010 07:05 PM, Marcelo Tosatti wrote: On Sun, Jan 17, 2010 at 10:23:37AM +0200, Avi Kivity wrote: On 01/14/2010 09:41 PM, Marcelo Tosatti wrote: Exit the guest pagetable walk loop if reading gpte failed. Otherwise its possible to enter an endless loop processing the previous

Build problem strikes again

2010-01-18 Thread Lucas Meneghel Rodrigues
Today's git tests failed due to kvm-kmod problems again, please verify: ERROR kvm.qemu-kvm-git.build kvm.qemu-kvm-git.build timestamp=1263836706localtime=Jan 18 12:45:06 Command make -j 2 failed, rc=2, Command returned non-zero exit status *

understanding KVM versions

2010-01-18 Thread Shi Jin
Hi there, I am trying to understand the versions of KVM. From what I've learned so far, there are versions for KVM 1. qemu-kvm executable version, obtained for example /usr/libexec/qemu-kvm |head -n 1 2. kvm kernel module version, obtained for example modinfo kvm From

Re: Build problem strikes again

2010-01-18 Thread Gleb Natapov
On Mon, Jan 18, 2010 at 03:24:45PM -0200, Lucas Meneghel Rodrigues wrote: Today's git tests failed due to kvm-kmod problems again, please verify: kvm-kmod needs to copy arch/x86/include/asm/hyperv.h during sync now. ERROR kvm.qemu-kvm-git.build kvm.qemu-kvm-git.build

Re: Build problem strikes again

2010-01-18 Thread Jan Kiszka
Gleb Natapov wrote: On Mon, Jan 18, 2010 at 03:24:45PM -0200, Lucas Meneghel Rodrigues wrote: Today's git tests failed due to kvm-kmod problems again, please verify: kvm-kmod needs to copy arch/x86/include/asm/hyperv.h during sync now. Yep, already noticed this in my nightly buildbot run.

problem with vm-exit exit code

2010-01-18 Thread Matteo Signorini
Hi guys, I would like to intercept the vm-exit whenever the guest executes a lidt/sidt instruction. I know that lidt/sidt instructions cause a vm-exit if and only if these condition are satisfied:    -commands are executed in vmx non-root environment    -the descriptor-table exiting field of the

KVM call agenda for Jan 19

2010-01-18 Thread Chris Wright
Please send in any agenda items you are interested in covering in tomorrow's call. thanks, -chris -- 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.org/majordomo-info.html

Re: [PATCH v3 04/12] Add handle page fault PV helper.

2010-01-18 Thread H. Peter Anvin
On 01/18/2010 12:50 AM, Gleb Natapov wrote: On Mon, Jan 18, 2010 at 12:34:16AM -0800, H. Peter Anvin wrote: On 01/17/2010 06:44 AM, Gleb Natapov wrote: On Thu, Jan 14, 2010 at 06:31:07PM +0100, Peter Zijlstra wrote: On Tue, 2010-01-05 at 16:12 +0200, Gleb Natapov wrote: Allow paravirtualized

Re: [PATCH] KVM: Add missing emulation failure report in kvm_mmu_page_fault()

2010-01-18 Thread Sheng Yang
On Monday 18 January 2010 19:32:14 Avi Kivity wrote: On 01/18/2010 11:32 AM, Sheng Yang wrote: On Sunday 17 January 2010 20:34:23 Avi Kivity wrote: On 01/15/2010 10:44 AM, Sheng Yang wrote: Currently we only have handle_invalid_guest_state() reported emulation failure... This is

Re: [PATCH v3 04/12] Add handle page fault PV helper.

2010-01-18 Thread Gleb Natapov
On Mon, Jan 18, 2010 at 05:53:53PM -0800, H. Peter Anvin wrote: On 01/18/2010 12:50 AM, Gleb Natapov wrote: On Mon, Jan 18, 2010 at 12:34:16AM -0800, H. Peter Anvin wrote: On 01/17/2010 06:44 AM, Gleb Natapov wrote: On Thu, Jan 14, 2010 at 06:31:07PM +0100, Peter Zijlstra wrote: On Tue,

Re: [PATCH] KVM: Add missing emulation failure report in kvm_mmu_page_fault()

2010-01-18 Thread Avi Kivity
On 01/19/2010 05:06 AM, Sheng Yang wrote: There are two problems with the kernel failure report. First, it doesn't report enough data - registers, surrounding instructions, etc. that are needed to explain what is going on. Second, it can flood dmesg, which is a pretty bad thing to do.

Re: [PATCH] KVM: Add missing emulation failure report in kvm_mmu_page_fault()

2010-01-18 Thread Gleb Natapov
On Tue, Jan 19, 2010 at 09:54:44AM +0200, Avi Kivity wrote: On 01/19/2010 05:06 AM, Sheng Yang wrote: There are two problems with the kernel failure report. First, it doesn't report enough data - registers, surrounding instructions, etc. that are needed to explain what is going on. Second,

[Autotest PATCH] KVM-test: Fix a bug that pci_assignable type name mismatch

2010-01-18 Thread Yolkfull Chow
The pci_assignable type name is nic_vf/nic_pf in kvm_utils.py whereas in kvm_vm.py they are vf/pf. Weird that why I tested it pass last week. Hope that it will not bring in any trouble before this patch applied. Signed-off-by: Yolkfull Chow yz...@redhat.com --- client/tests/kvm/kvm_utils.py |